_ZN11flatbuffers10ReadScalarIjEET_PKv:
  426|  49.3M|T ReadScalar(const void *p) {
  427|  49.3M|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  49.3M|}
_ZN11flatbuffers12EndianScalarIjEET_S1_:
  415|  65.9M|template<typename T> T EndianScalar(T t) {
  416|  65.9M|  #if FLATBUFFERS_LITTLEENDIAN
  417|  65.9M|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  65.9M|}
_ZN11flatbuffers10ReadScalarIiEET_PKv:
  426|  53.5M|T ReadScalar(const void *p) {
  427|  53.5M|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  53.5M|}
_ZN11flatbuffers12EndianScalarIiEET_S1_:
  415|  53.5M|template<typename T> T EndianScalar(T t) {
  416|  53.5M|  #if FLATBUFFERS_LITTLEENDIAN
  417|  53.5M|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  53.5M|}
_ZN11flatbuffers10ReadScalarItEET_PKv:
  426|  96.7M|T ReadScalar(const void *p) {
  427|  96.7M|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  96.7M|}
_ZN11flatbuffers12EndianScalarItEET_S1_:
  415|  96.7M|template<typename T> T EndianScalar(T t) {
  416|  96.7M|  #if FLATBUFFERS_LITTLEENDIAN
  417|  96.7M|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  96.7M|}
_ZN11flatbuffers10ReadScalarIhEET_PKv:
  426|  3.75M|T ReadScalar(const void *p) {
  427|  3.75M|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  3.75M|}
_ZN11flatbuffers12EndianScalarIhEET_S1_:
  415|  3.75M|template<typename T> T EndianScalar(T t) {
  416|  3.75M|  #if FLATBUFFERS_LITTLEENDIAN
  417|  3.75M|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  3.75M|}
_ZN11flatbuffers10IsOutRangeIN10reflection8BaseTypeEEEbRKT_S5_S5_:
  484|   501k|inline bool IsOutRange(const T &v, const T &low, const T &high) {
  485|   501k|  return (v < low) || (high < v);
  ------------------
  |  Branch (485:10): [True: 0, False: 501k]
  |  Branch (485:23): [True: 0, False: 501k]
  ------------------
  486|   501k|}
_ZN11flatbuffers10ReadScalarIaEET_PKv:
  426|  6.09M|T ReadScalar(const void *p) {
  427|  6.09M|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  6.09M|}
_ZN11flatbuffers12EndianScalarIaEET_S1_:
  415|  6.09M|template<typename T> T EndianScalar(T t) {
  416|  6.09M|  #if FLATBUFFERS_LITTLEENDIAN
  417|  6.09M|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  6.09M|}
_ZN11flatbuffers10ReadScalarIlEET_PKv:
  426|  3.54k|T ReadScalar(const void *p) {
  427|  3.54k|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  3.54k|}
_ZN11flatbuffers12EndianScalarIlEET_S1_:
  415|  3.54k|template<typename T> T EndianScalar(T t) {
  416|  3.54k|  #if FLATBUFFERS_LITTLEENDIAN
  417|  3.54k|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  3.54k|}
_ZN11flatbuffers10ReadScalarIdEET_PKv:
  426|  61.8k|T ReadScalar(const void *p) {
  427|  61.8k|  return EndianScalar(*reinterpret_cast<const T *>(p));
  428|  61.8k|}
_ZN11flatbuffers12EndianScalarIdEET_S1_:
  415|  61.8k|template<typename T> T EndianScalar(T t) {
  416|  61.8k|  #if FLATBUFFERS_LITTLEENDIAN
  417|  61.8k|    return t;
  418|       |  #else
  419|       |    return EndianSwap(t);
  420|       |  #endif
  421|  61.8k|}

_ZN11flatbuffers19BufferHasIdentifierEPKvPKcb:
  168|  3.85k|                                bool size_prefixed = false) {
  169|  3.85k|  return strncmp(GetBufferIdentifier(buf, size_prefixed), identifier,
  170|  3.85k|                 flatbuffers::kFileIdentifierLength) == 0;
  171|  3.85k|}
_ZN11flatbuffers19GetBufferIdentifierEPKvb:
  161|  3.85k|                                       bool size_prefixed = false) {
  162|  3.85k|  return reinterpret_cast<const char *>(buf) +
  163|  3.85k|         ((size_prefixed) ? 2 * sizeof(uoffset_t) : sizeof(uoffset_t));
  ------------------
  |  Branch (163:11): [True: 0, False: 3.85k]
  ------------------
  164|  3.85k|}
_ZN11flatbuffers14IndirectHelperINS_6OffsetIN10reflection6ObjectEEEE4ReadEPKhj:
  115|   115k|  static return_type Read(const uint8_t *const p, const offset_type i) {
  116|       |    // Offsets are relative to themselves, so first update the pointer to
  117|       |    // point to the offset location.
  118|   115k|    const uint8_t *const offset_location = p + i * element_stride;
  119|       |
  120|       |    // Then read the scalar value of the offset (which may be 32 or 64-bits) and
  121|       |    // then determine the relative location from the offset location.
  122|   115k|    return reinterpret_cast<return_type>(
  123|   115k|        offset_location + ReadScalar<offset_type>(offset_location));
  124|   115k|  }
_ZN11flatbuffers14IndirectHelperINS_6OffsetIN10reflection5FieldEEEE4ReadEPKhj:
  115|  1.63M|  static return_type Read(const uint8_t *const p, const offset_type i) {
  116|       |    // Offsets are relative to themselves, so first update the pointer to
  117|       |    // point to the offset location.
  118|  1.63M|    const uint8_t *const offset_location = p + i * element_stride;
  119|       |
  120|       |    // Then read the scalar value of the offset (which may be 32 or 64-bits) and
  121|       |    // then determine the relative location from the offset location.
  122|  1.63M|    return reinterpret_cast<return_type>(
  123|  1.63M|        offset_location + ReadScalar<offset_type>(offset_location));
  124|  1.63M|  }
_ZN11flatbuffers14IndirectHelperINS_6OffsetIN10reflection4EnumEEEE4ReadEPKhj:
  115|  3.64M|  static return_type Read(const uint8_t *const p, const offset_type i) {
  116|       |    // Offsets are relative to themselves, so first update the pointer to
  117|       |    // point to the offset location.
  118|  3.64M|    const uint8_t *const offset_location = p + i * element_stride;
  119|       |
  120|       |    // Then read the scalar value of the offset (which may be 32 or 64-bits) and
  121|       |    // then determine the relative location from the offset location.
  122|  3.64M|    return reinterpret_cast<return_type>(
  123|  3.64M|        offset_location + ReadScalar<offset_type>(offset_location));
  124|  3.64M|  }
_ZN11flatbuffers14IndirectHelperINS_6OffsetIN10reflection7EnumValEEEE4ReadEPKhj:
  115|  79.5k|  static return_type Read(const uint8_t *const p, const offset_type i) {
  116|       |    // Offsets are relative to themselves, so first update the pointer to
  117|       |    // point to the offset location.
  118|  79.5k|    const uint8_t *const offset_location = p + i * element_stride;
  119|       |
  120|       |    // Then read the scalar value of the offset (which may be 32 or 64-bits) and
  121|       |    // then determine the relative location from the offset location.
  122|  79.5k|    return reinterpret_cast<return_type>(
  123|  79.5k|        offset_location + ReadScalar<offset_type>(offset_location));
  124|  79.5k|  }
_ZN11flatbuffers7GetRootIN10reflection6SchemaEEEPKT_PKv:
  188|  3.85k|template<typename T> const T *GetRoot(const void *buf) {
  189|  3.85k|  return GetMutableRoot<T>(const_cast<void *>(buf));
  190|  3.85k|}
_ZN11flatbuffers14GetMutableRootIN10reflection6SchemaEEEPT_Pv:
  175|  3.85k|template<typename T> T *GetMutableRoot(void *buf) {
  176|  3.85k|  if (!buf) return nullptr;
  ------------------
  |  Branch (176:7): [True: 0, False: 3.85k]
  ------------------
  177|  3.85k|  EndianCheck();
  178|  3.85k|  return reinterpret_cast<T *>(
  179|  3.85k|      reinterpret_cast<uint8_t *>(buf) +
  180|  3.85k|      EndianScalar(*reinterpret_cast<uoffset_t *>(buf)));
  181|  3.85k|}
_ZN11flatbuffers11EndianCheckEv:
   55|  3.85k|inline void EndianCheck() {
   56|  3.85k|  int endiantest = 1;
   57|       |  // If this fails, see FLATBUFFERS_LITTLEENDIAN above.
   58|  3.85k|  FLATBUFFERS_ASSERT(*reinterpret_cast<char *>(&endiantest) ==
   59|  3.85k|                     FLATBUFFERS_LITTLEENDIAN);
   60|      0|  (void)endiantest;
   61|  3.85k|}

_ZN11flatbuffers8IsScalarEN10reflection8BaseTypeE:
   33|   597k|inline bool IsScalar(reflection::BaseType t) {
   34|   597k|  return t >= reflection::UType && t <= reflection::Double;
  ------------------
  |  Branch (34:10): [True: 597k, False: 0]
  |  Branch (34:36): [True: 479k, False: 118k]
  ------------------
   35|   597k|}
_ZN11flatbuffers7IsFloatEN10reflection8BaseTypeE:
   39|  71.4k|inline bool IsFloat(reflection::BaseType t) {
   40|  71.4k|  return t == reflection::Float || t == reflection::Double;
  ------------------
  |  Branch (40:10): [True: 42.8k, False: 28.5k]
  |  Branch (40:36): [True: 18.9k, False: 9.64k]
  ------------------
   41|  71.4k|}
_ZN11flatbuffers11GetTypeSizeEN10reflection8BaseTypeE:
   47|   409k|inline size_t GetTypeSize(reflection::BaseType base_type) {
   48|       |  // This needs to correspond to the BaseType enum.
   49|   409k|  static size_t sizes[] = {
   50|   409k|    0,  // None
   51|   409k|    1,  // UType
   52|   409k|    1,  // Bool
   53|   409k|    1,  // Byte
   54|   409k|    1,  // UByte
   55|   409k|    2,  // Short
   56|   409k|    2,  // UShort
   57|   409k|    4,  // Int
   58|   409k|    4,  // UInt
   59|   409k|    8,  // Long
   60|   409k|    8,  // ULong
   61|   409k|    4,  // Float
   62|   409k|    8,  // Double
   63|   409k|    4,  // String
   64|   409k|    4,  // Vector
   65|   409k|    4,  // Obj
   66|   409k|    4,  // Union
   67|   409k|    0,  // Array. Only used in structs. 0 was chosen to prevent out-of-bounds
   68|       |        // errors.
   69|   409k|    8,  // Vector64
   70|       |
   71|   409k|    0  // MaxBaseType. This must be kept the last entry in this array.
   72|   409k|  };
   73|   409k|  static_assert(sizeof(sizes) / sizeof(size_t) == reflection::MaxBaseType + 1,
   74|   409k|                "Size of sizes[] array does not match the count of BaseType "
   75|   409k|                "enum values.");
   76|   409k|  return sizes[base_type];
   77|   409k|}

_ZN10reflection18VerifySchemaBufferERN11flatbuffers8VerifierE:
 1460|  3.85k|    ::flatbuffers::Verifier &verifier) {
 1461|  3.85k|  return verifier.VerifyBuffer<reflection::Schema>(SchemaIdentifier());
 1462|  3.85k|}
_ZNK10reflection6Schema6VerifyERN11flatbuffers8VerifierE:
 1321|  3.85k|  bool Verify(::flatbuffers::Verifier &verifier) const {
 1322|  3.85k|    return VerifyTableStart(verifier) &&
  ------------------
  |  Branch (1322:12): [True: 3.85k, False: 0]
  ------------------
 1323|  3.85k|           VerifyOffsetRequired(verifier, VT_OBJECTS) &&
  ------------------
  |  Branch (1323:12): [True: 3.85k, False: 0]
  ------------------
 1324|  3.85k|           verifier.VerifyVector(objects()) &&
  ------------------
  |  Branch (1324:12): [True: 3.85k, False: 0]
  ------------------
 1325|  3.85k|           verifier.VerifyVectorOfTables(objects()) &&
  ------------------
  |  Branch (1325:12): [True: 3.85k, False: 0]
  ------------------
 1326|  3.85k|           VerifyOffsetRequired(verifier, VT_ENUMS) &&
  ------------------
  |  Branch (1326:12): [True: 3.85k, False: 0]
  ------------------
 1327|  3.85k|           verifier.VerifyVector(enums()) &&
  ------------------
  |  Branch (1327:12): [True: 3.85k, False: 0]
  ------------------
 1328|  3.85k|           verifier.VerifyVectorOfTables(enums()) &&
  ------------------
  |  Branch (1328:12): [True: 3.85k, False: 0]
  ------------------
 1329|  3.85k|           VerifyOffset(verifier, VT_FILE_IDENT) &&
  ------------------
  |  Branch (1329:12): [True: 3.85k, False: 0]
  ------------------
 1330|  3.85k|           verifier.VerifyString(file_ident()) &&
  ------------------
  |  Branch (1330:12): [True: 3.85k, False: 0]
  ------------------
 1331|  3.85k|           VerifyOffset(verifier, VT_FILE_EXT) &&
  ------------------
  |  Branch (1331:12): [True: 3.85k, False: 0]
  ------------------
 1332|  3.85k|           verifier.VerifyString(file_ext()) &&
  ------------------
  |  Branch (1332:12): [True: 3.85k, False: 0]
  ------------------
 1333|  3.85k|           VerifyOffset(verifier, VT_ROOT_TABLE) &&
  ------------------
  |  Branch (1333:12): [True: 3.85k, False: 0]
  ------------------
 1334|  3.85k|           verifier.VerifyTable(root_table()) &&
  ------------------
  |  Branch (1334:12): [True: 3.85k, False: 0]
  ------------------
 1335|  3.85k|           VerifyOffset(verifier, VT_SERVICES) &&
  ------------------
  |  Branch (1335:12): [True: 3.85k, False: 0]
  ------------------
 1336|  3.85k|           verifier.VerifyVector(services()) &&
  ------------------
  |  Branch (1336:12): [True: 3.85k, False: 0]
  ------------------
 1337|  3.85k|           verifier.VerifyVectorOfTables(services()) &&
  ------------------
  |  Branch (1337:12): [True: 3.85k, False: 0]
  ------------------
 1338|  3.85k|           VerifyField<uint64_t>(verifier, VT_ADVANCED_FEATURES, 8) &&
  ------------------
  |  Branch (1338:12): [True: 3.85k, False: 0]
  ------------------
 1339|  3.85k|           VerifyOffset(verifier, VT_FBS_FILES) &&
  ------------------
  |  Branch (1339:12): [True: 3.85k, False: 0]
  ------------------
 1340|  3.85k|           verifier.VerifyVector(fbs_files()) &&
  ------------------
  |  Branch (1340:12): [True: 3.85k, False: 0]
  ------------------
 1341|  3.85k|           verifier.VerifyVectorOfTables(fbs_files()) &&
  ------------------
  |  Branch (1341:12): [True: 3.85k, False: 0]
  ------------------
 1342|  3.85k|           verifier.EndTable();
  ------------------
  |  Branch (1342:12): [True: 3.85k, False: 0]
  ------------------
 1343|  3.85k|  }
_ZNK10reflection6Schema7objectsEv:
 1295|  96.3k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Object>> *objects() const {
 1296|  96.3k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Object>> *>(VT_OBJECTS);
 1297|  96.3k|  }
_ZNK10reflection6Object6VerifyERN11flatbuffers8VerifierE:
  859|  30.8k|  bool Verify(::flatbuffers::Verifier &verifier) const {
  860|  30.8k|    return VerifyTableStart(verifier) &&
  ------------------
  |  Branch (860:12): [True: 30.8k, False: 0]
  ------------------
  861|  30.8k|           VerifyOffsetRequired(verifier, VT_NAME) &&
  ------------------
  |  Branch (861:12): [True: 30.8k, False: 0]
  ------------------
  862|  30.8k|           verifier.VerifyString(name()) &&
  ------------------
  |  Branch (862:12): [True: 30.8k, False: 0]
  ------------------
  863|  30.8k|           VerifyOffsetRequired(verifier, VT_FIELDS) &&
  ------------------
  |  Branch (863:12): [True: 30.8k, False: 0]
  ------------------
  864|  30.8k|           verifier.VerifyVector(fields()) &&
  ------------------
  |  Branch (864:12): [True: 30.8k, False: 0]
  ------------------
  865|  30.8k|           verifier.VerifyVectorOfTables(fields()) &&
  ------------------
  |  Branch (865:12): [True: 30.8k, False: 0]
  ------------------
  866|  30.8k|           VerifyField<uint8_t>(verifier, VT_IS_STRUCT, 1) &&
  ------------------
  |  Branch (866:12): [True: 30.8k, False: 0]
  ------------------
  867|  30.8k|           VerifyField<int32_t>(verifier, VT_MINALIGN, 4) &&
  ------------------
  |  Branch (867:12): [True: 30.8k, False: 0]
  ------------------
  868|  30.8k|           VerifyField<int32_t>(verifier, VT_BYTESIZE, 4) &&
  ------------------
  |  Branch (868:12): [True: 30.8k, False: 0]
  ------------------
  869|  30.8k|           VerifyOffset(verifier, VT_ATTRIBUTES) &&
  ------------------
  |  Branch (869:12): [True: 30.8k, False: 0]
  ------------------
  870|  30.8k|           verifier.VerifyVector(attributes()) &&
  ------------------
  |  Branch (870:12): [True: 30.8k, False: 0]
  ------------------
  871|  30.8k|           verifier.VerifyVectorOfTables(attributes()) &&
  ------------------
  |  Branch (871:12): [True: 30.8k, False: 0]
  ------------------
  872|  30.8k|           VerifyOffset(verifier, VT_DOCUMENTATION) &&
  ------------------
  |  Branch (872:12): [True: 30.8k, False: 0]
  ------------------
  873|  30.8k|           verifier.VerifyVector(documentation()) &&
  ------------------
  |  Branch (873:12): [True: 30.8k, False: 0]
  ------------------
  874|  30.8k|           verifier.VerifyVectorOfStrings(documentation()) &&
  ------------------
  |  Branch (874:12): [True: 30.8k, False: 0]
  ------------------
  875|  30.8k|           VerifyOffset(verifier, VT_DECLARATION_FILE) &&
  ------------------
  |  Branch (875:12): [True: 30.8k, False: 0]
  ------------------
  876|  30.8k|           verifier.VerifyString(declaration_file()) &&
  ------------------
  |  Branch (876:12): [True: 30.8k, False: 0]
  ------------------
  877|  30.8k|           verifier.EndTable();
  ------------------
  |  Branch (877:12): [True: 30.8k, False: 0]
  ------------------
  878|  30.8k|  }
_ZNK10reflection6Object4nameEv:
  828|  2.25M|  const ::flatbuffers::String *name() const {
  829|  2.25M|    return GetPointer<const ::flatbuffers::String *>(VT_NAME);
  830|  2.25M|  }
_ZNK10reflection6Object6fieldsEv:
  837|  2.64M|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Field>> *fields() const {
  838|  2.64M|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Field>> *>(VT_FIELDS);
  839|  2.64M|  }
_ZNK10reflection5Field6VerifyERN11flatbuffers8VerifierE:
  660|   258k|  bool Verify(::flatbuffers::Verifier &verifier) const {
  661|   258k|    return VerifyTableStart(verifier) &&
  ------------------
  |  Branch (661:12): [True: 258k, False: 0]
  ------------------
  662|   258k|           VerifyOffsetRequired(verifier, VT_NAME) &&
  ------------------
  |  Branch (662:12): [True: 258k, False: 0]
  ------------------
  663|   258k|           verifier.VerifyString(name()) &&
  ------------------
  |  Branch (663:12): [True: 258k, False: 0]
  ------------------
  664|   258k|           VerifyOffsetRequired(verifier, VT_TYPE) &&
  ------------------
  |  Branch (664:12): [True: 258k, False: 0]
  ------------------
  665|   258k|           verifier.VerifyTable(type()) &&
  ------------------
  |  Branch (665:12): [True: 258k, False: 0]
  ------------------
  666|   258k|           VerifyField<uint16_t>(verifier, VT_ID, 2) &&
  ------------------
  |  Branch (666:12): [True: 258k, False: 0]
  ------------------
  667|   258k|           VerifyField<uint16_t>(verifier, VT_OFFSET, 2) &&
  ------------------
  |  Branch (667:12): [True: 258k, False: 0]
  ------------------
  668|   258k|           VerifyField<int64_t>(verifier, VT_DEFAULT_INTEGER, 8) &&
  ------------------
  |  Branch (668:12): [True: 258k, False: 0]
  ------------------
  669|   258k|           VerifyField<double>(verifier, VT_DEFAULT_REAL, 8) &&
  ------------------
  |  Branch (669:12): [True: 258k, False: 0]
  ------------------
  670|   258k|           VerifyField<uint8_t>(verifier, VT_DEPRECATED, 1) &&
  ------------------
  |  Branch (670:12): [True: 258k, False: 0]
  ------------------
  671|   258k|           VerifyField<uint8_t>(verifier, VT_REQUIRED, 1) &&
  ------------------
  |  Branch (671:12): [True: 258k, False: 0]
  ------------------
  672|   258k|           VerifyField<uint8_t>(verifier, VT_KEY, 1) &&
  ------------------
  |  Branch (672:12): [True: 258k, False: 0]
  ------------------
  673|   258k|           VerifyOffset(verifier, VT_ATTRIBUTES) &&
  ------------------
  |  Branch (673:12): [True: 258k, False: 0]
  ------------------
  674|   258k|           verifier.VerifyVector(attributes()) &&
  ------------------
  |  Branch (674:12): [True: 258k, False: 0]
  ------------------
  675|   258k|           verifier.VerifyVectorOfTables(attributes()) &&
  ------------------
  |  Branch (675:12): [True: 258k, False: 0]
  ------------------
  676|   258k|           VerifyOffset(verifier, VT_DOCUMENTATION) &&
  ------------------
  |  Branch (676:12): [True: 258k, False: 0]
  ------------------
  677|   258k|           verifier.VerifyVector(documentation()) &&
  ------------------
  |  Branch (677:12): [True: 258k, False: 0]
  ------------------
  678|   258k|           verifier.VerifyVectorOfStrings(documentation()) &&
  ------------------
  |  Branch (678:12): [True: 258k, False: 0]
  ------------------
  679|   258k|           VerifyField<uint8_t>(verifier, VT_OPTIONAL, 1) &&
  ------------------
  |  Branch (679:12): [True: 258k, False: 0]
  ------------------
  680|   258k|           VerifyField<uint16_t>(verifier, VT_PADDING, 2) &&
  ------------------
  |  Branch (680:12): [True: 258k, False: 0]
  ------------------
  681|   258k|           VerifyField<uint8_t>(verifier, VT_OFFSET64, 1) &&
  ------------------
  |  Branch (681:12): [True: 258k, False: 0]
  ------------------
  682|   258k|           verifier.EndTable();
  ------------------
  |  Branch (682:12): [True: 258k, False: 0]
  ------------------
  683|   258k|  }
_ZNK10reflection5Field4nameEv:
  610|  1.32M|  const ::flatbuffers::String *name() const {
  611|  1.32M|    return GetPointer<const ::flatbuffers::String *>(VT_NAME);
  612|  1.32M|  }
_ZNK10reflection4Type6VerifyERN11flatbuffers8VerifierE:
  199|   323k|  bool Verify(::flatbuffers::Verifier &verifier) const {
  200|   323k|    return VerifyTableStart(verifier) &&
  ------------------
  |  Branch (200:12): [True: 323k, False: 0]
  ------------------
  201|   323k|           VerifyField<int8_t>(verifier, VT_BASE_TYPE, 1) &&
  ------------------
  |  Branch (201:12): [True: 323k, False: 0]
  ------------------
  202|   323k|           VerifyField<int8_t>(verifier, VT_ELEMENT, 1) &&
  ------------------
  |  Branch (202:12): [True: 323k, False: 0]
  ------------------
  203|   323k|           VerifyField<int32_t>(verifier, VT_INDEX, 4) &&
  ------------------
  |  Branch (203:12): [True: 323k, False: 0]
  ------------------
  204|   323k|           VerifyField<uint16_t>(verifier, VT_FIXED_LENGTH, 2) &&
  ------------------
  |  Branch (204:12): [True: 323k, False: 0]
  ------------------
  205|   323k|           VerifyField<uint32_t>(verifier, VT_BASE_SIZE, 4) &&
  ------------------
  |  Branch (205:12): [True: 323k, False: 0]
  ------------------
  206|   323k|           VerifyField<uint32_t>(verifier, VT_ELEMENT_SIZE, 4) &&
  ------------------
  |  Branch (206:12): [True: 323k, False: 0]
  ------------------
  207|   323k|           verifier.EndTable();
  ------------------
  |  Branch (207:12): [True: 323k, False: 0]
  ------------------
  208|   323k|  }
_ZNK10reflection5Field4typeEv:
  619|  10.0M|  const reflection::Type *type() const {
  620|  10.0M|    return GetPointer<const reflection::Type *>(VT_TYPE);
  621|  10.0M|  }
_ZNK10reflection5Field10attributesEv:
  643|   516k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
  644|   516k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
  645|   516k|  }
_ZNK10reflection5Field13documentationEv:
  646|   516k|  const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *documentation() const {
  647|   516k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *>(VT_DOCUMENTATION);
  648|   516k|  }
_ZNK10reflection6Object10attributesEv:
  849|  61.6k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
  850|  61.6k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
  851|  61.6k|  }
_ZNK10reflection6Object13documentationEv:
  852|  61.6k|  const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *documentation() const {
  853|  61.6k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *>(VT_DOCUMENTATION);
  854|  61.6k|  }
_ZNK10reflection6Object16declaration_fileEv:
  856|  30.8k|  const ::flatbuffers::String *declaration_file() const {
  857|  30.8k|    return GetPointer<const ::flatbuffers::String *>(VT_DECLARATION_FILE);
  858|  30.8k|  }
_ZNK10reflection6Schema5enumsEv:
 1298|  7.23M|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Enum>> *enums() const {
 1299|  7.23M|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Enum>> *>(VT_ENUMS);
 1300|  7.23M|  }
_ZNK10reflection4Enum6VerifyERN11flatbuffers8VerifierE:
  486|  15.4k|  bool Verify(::flatbuffers::Verifier &verifier) const {
  487|  15.4k|    return VerifyTableStart(verifier) &&
  ------------------
  |  Branch (487:12): [True: 15.4k, False: 0]
  ------------------
  488|  15.4k|           VerifyOffsetRequired(verifier, VT_NAME) &&
  ------------------
  |  Branch (488:12): [True: 15.4k, False: 0]
  ------------------
  489|  15.4k|           verifier.VerifyString(name()) &&
  ------------------
  |  Branch (489:12): [True: 15.4k, False: 0]
  ------------------
  490|  15.4k|           VerifyOffsetRequired(verifier, VT_VALUES) &&
  ------------------
  |  Branch (490:12): [True: 15.4k, False: 0]
  ------------------
  491|  15.4k|           verifier.VerifyVector(values()) &&
  ------------------
  |  Branch (491:12): [True: 15.4k, False: 0]
  ------------------
  492|  15.4k|           verifier.VerifyVectorOfTables(values()) &&
  ------------------
  |  Branch (492:12): [True: 15.4k, False: 0]
  ------------------
  493|  15.4k|           VerifyField<uint8_t>(verifier, VT_IS_UNION, 1) &&
  ------------------
  |  Branch (493:12): [True: 15.4k, False: 0]
  ------------------
  494|  15.4k|           VerifyOffsetRequired(verifier, VT_UNDERLYING_TYPE) &&
  ------------------
  |  Branch (494:12): [True: 15.4k, False: 0]
  ------------------
  495|  15.4k|           verifier.VerifyTable(underlying_type()) &&
  ------------------
  |  Branch (495:12): [True: 15.4k, False: 0]
  ------------------
  496|  15.4k|           VerifyOffset(verifier, VT_ATTRIBUTES) &&
  ------------------
  |  Branch (496:12): [True: 15.4k, False: 0]
  ------------------
  497|  15.4k|           verifier.VerifyVector(attributes()) &&
  ------------------
  |  Branch (497:12): [True: 15.4k, False: 0]
  ------------------
  498|  15.4k|           verifier.VerifyVectorOfTables(attributes()) &&
  ------------------
  |  Branch (498:12): [True: 15.4k, False: 0]
  ------------------
  499|  15.4k|           VerifyOffset(verifier, VT_DOCUMENTATION) &&
  ------------------
  |  Branch (499:12): [True: 15.4k, False: 0]
  ------------------
  500|  15.4k|           verifier.VerifyVector(documentation()) &&
  ------------------
  |  Branch (500:12): [True: 15.4k, False: 0]
  ------------------
  501|  15.4k|           verifier.VerifyVectorOfStrings(documentation()) &&
  ------------------
  |  Branch (501:12): [True: 15.4k, False: 0]
  ------------------
  502|  15.4k|           VerifyOffset(verifier, VT_DECLARATION_FILE) &&
  ------------------
  |  Branch (502:12): [True: 15.4k, False: 0]
  ------------------
  503|  15.4k|           verifier.VerifyString(declaration_file()) &&
  ------------------
  |  Branch (503:12): [True: 15.4k, False: 0]
  ------------------
  504|  15.4k|           verifier.EndTable();
  ------------------
  |  Branch (504:12): [True: 15.4k, False: 0]
  ------------------
  505|  15.4k|  }
_ZNK10reflection4Enum4nameEv:
  458|  15.4k|  const ::flatbuffers::String *name() const {
  459|  15.4k|    return GetPointer<const ::flatbuffers::String *>(VT_NAME);
  460|  15.4k|  }
_ZNK10reflection4Enum6valuesEv:
  467|  3.65M|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::EnumVal>> *values() const {
  468|  3.65M|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::EnumVal>> *>(VT_VALUES);
  469|  3.65M|  }
_ZNK10reflection7EnumVal6VerifyERN11flatbuffers8VerifierE:
  364|  50.1k|  bool Verify(::flatbuffers::Verifier &verifier) const {
  365|  50.1k|    return VerifyTableStart(verifier) &&
  ------------------
  |  Branch (365:12): [True: 50.1k, False: 0]
  ------------------
  366|  50.1k|           VerifyOffsetRequired(verifier, VT_NAME) &&
  ------------------
  |  Branch (366:12): [True: 50.1k, False: 0]
  ------------------
  367|  50.1k|           verifier.VerifyString(name()) &&
  ------------------
  |  Branch (367:12): [True: 50.1k, False: 0]
  ------------------
  368|  50.1k|           VerifyField<int64_t>(verifier, VT_VALUE, 8) &&
  ------------------
  |  Branch (368:12): [True: 50.1k, False: 0]
  ------------------
  369|  50.1k|           VerifyOffset(verifier, VT_UNION_TYPE) &&
  ------------------
  |  Branch (369:12): [True: 50.1k, False: 0]
  ------------------
  370|  50.1k|           verifier.VerifyTable(union_type()) &&
  ------------------
  |  Branch (370:12): [True: 50.1k, False: 0]
  ------------------
  371|  50.1k|           VerifyOffset(verifier, VT_DOCUMENTATION) &&
  ------------------
  |  Branch (371:12): [True: 50.1k, False: 0]
  ------------------
  372|  50.1k|           verifier.VerifyVector(documentation()) &&
  ------------------
  |  Branch (372:12): [True: 50.1k, False: 0]
  ------------------
  373|  50.1k|           verifier.VerifyVectorOfStrings(documentation()) &&
  ------------------
  |  Branch (373:12): [True: 50.1k, False: 0]
  ------------------
  374|  50.1k|           VerifyOffset(verifier, VT_ATTRIBUTES) &&
  ------------------
  |  Branch (374:12): [True: 50.1k, False: 0]
  ------------------
  375|  50.1k|           verifier.VerifyVector(attributes()) &&
  ------------------
  |  Branch (375:12): [True: 50.1k, False: 0]
  ------------------
  376|  50.1k|           verifier.VerifyVectorOfTables(attributes()) &&
  ------------------
  |  Branch (376:12): [True: 50.1k, False: 0]
  ------------------
  377|  50.1k|           verifier.EndTable();
  ------------------
  |  Branch (377:12): [True: 50.1k, False: 0]
  ------------------
  378|  50.1k|  }
_ZNK10reflection7EnumVal4nameEv:
  343|  79.5k|  const ::flatbuffers::String *name() const {
  344|  79.5k|    return GetPointer<const ::flatbuffers::String *>(VT_NAME);
  345|  79.5k|  }
_ZNK10reflection7EnumVal10union_typeEv:
  355|  73.5k|  const reflection::Type *union_type() const {
  356|  73.5k|    return GetPointer<const reflection::Type *>(VT_UNION_TYPE);
  357|  73.5k|  }
_ZNK10reflection7EnumVal13documentationEv:
  358|   100k|  const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *documentation() const {
  359|   100k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *>(VT_DOCUMENTATION);
  360|   100k|  }
_ZNK10reflection7EnumVal10attributesEv:
  361|   100k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
  362|   100k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
  363|   100k|  }
_ZNK10reflection4Enum15underlying_typeEv:
  473|  15.4k|  const reflection::Type *underlying_type() const {
  474|  15.4k|    return GetPointer<const reflection::Type *>(VT_UNDERLYING_TYPE);
  475|  15.4k|  }
_ZNK10reflection4Enum10attributesEv:
  476|  30.8k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *attributes() const {
  477|  30.8k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::KeyValue>> *>(VT_ATTRIBUTES);
  478|  30.8k|  }
_ZNK10reflection4Enum13documentationEv:
  479|  30.8k|  const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *documentation() const {
  480|  30.8k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<::flatbuffers::String>> *>(VT_DOCUMENTATION);
  481|  30.8k|  }
_ZNK10reflection4Enum16declaration_fileEv:
  483|  15.4k|  const ::flatbuffers::String *declaration_file() const {
  484|  15.4k|    return GetPointer<const ::flatbuffers::String *>(VT_DECLARATION_FILE);
  485|  15.4k|  }
_ZNK10reflection6Schema10file_identEv:
 1301|  3.85k|  const ::flatbuffers::String *file_ident() const {
 1302|  3.85k|    return GetPointer<const ::flatbuffers::String *>(VT_FILE_IDENT);
 1303|  3.85k|  }
_ZNK10reflection6Schema8file_extEv:
 1304|  3.85k|  const ::flatbuffers::String *file_ext() const {
 1305|  3.85k|    return GetPointer<const ::flatbuffers::String *>(VT_FILE_EXT);
 1306|  3.85k|  }
_ZNK10reflection6Schema10root_tableEv:
 1307|  11.4k|  const reflection::Object *root_table() const {
 1308|  11.4k|    return GetPointer<const reflection::Object *>(VT_ROOT_TABLE);
 1309|  11.4k|  }
_ZNK10reflection6Schema8servicesEv:
 1310|  7.71k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Service>> *services() const {
 1311|  7.71k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::Service>> *>(VT_SERVICES);
 1312|  7.71k|  }
_ZNK10reflection6Schema9fbs_filesEv:
 1318|  7.71k|  const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::SchemaFile>> *fbs_files() const {
 1319|  7.71k|    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<reflection::SchemaFile>> *>(VT_FBS_FILES);
 1320|  7.71k|  }
_ZN10reflection16SchemaIdentifierEv:
 1445|  3.85k|inline const char *SchemaIdentifier() {
 1446|  3.85k|  return "BFBS";
 1447|  3.85k|}
_ZN10reflection9GetSchemaEPKv:
 1437|  3.85k|inline const reflection::Schema *GetSchema(const void *buf) {
 1438|  3.85k|  return ::flatbuffers::GetRoot<reflection::Schema>(buf);
 1439|  3.85k|}
_ZNK10reflection4Type9base_typeEv:
  179|  2.21M|  reflection::BaseType base_type() const {
  180|  2.21M|    return static_cast<reflection::BaseType>(GetField<int8_t>(VT_BASE_TYPE, 0));
  181|  2.21M|  }
_ZNK10reflection4Type7elementEv:
  182|  3.90M|  reflection::BaseType element() const {
  183|  3.90M|    return static_cast<reflection::BaseType>(GetField<int8_t>(VT_ELEMENT, 0));
  184|  3.90M|  }
_ZNK10reflection4Type5indexEv:
  185|  3.72M|  int32_t index() const {
  186|  3.72M|    return GetField<int32_t>(VT_INDEX, -1);
  187|  3.72M|  }
_ZNK10reflection4Type12fixed_lengthEv:
  188|  11.4k|  uint16_t fixed_length() const {
  189|  11.4k|    return GetField<uint16_t>(VT_FIXED_LENGTH, 0);
  190|  11.4k|  }
_ZNK10reflection5Field2idEv:
  622|  1.64M|  uint16_t id() const {
  623|  1.64M|    return GetField<uint16_t>(VT_ID, 0);
  624|  1.64M|  }
_ZNK10reflection5Field15default_integerEv:
  628|  9.64k|  int64_t default_integer() const {
  629|  9.64k|    return GetField<int64_t>(VT_DEFAULT_INTEGER, 0);
  630|  9.64k|  }
_ZNK10reflection5Field12default_realEv:
  631|  61.8k|  double default_real() const {
  632|  61.8k|    return GetField<double>(VT_DEFAULT_REAL, 0.0);
  633|  61.8k|  }
_ZNK10reflection5Field8requiredEv:
  637|  92.3k|  bool required() const {
  638|  92.3k|    return GetField<uint8_t>(VT_REQUIRED, 0) != 0;
  639|  92.3k|  }
_ZNK10reflection5Field7paddingEv:
  653|   301k|  uint16_t padding() const {
  654|   301k|    return GetField<uint16_t>(VT_PADDING, 0);
  655|   301k|  }
_ZNK10reflection5Field8offset64Ev:
  657|  73.9k|  bool offset64() const {
  658|  73.9k|    return GetField<uint8_t>(VT_OFFSET64, 0) != 0;
  659|  73.9k|  }
_ZNK10reflection6Object9is_structEv:
  840|   234k|  bool is_struct() const {
  841|   234k|    return GetField<uint8_t>(VT_IS_STRUCT, 0) != 0;
  842|   234k|  }
_ZNK10reflection6Object8bytesizeEv:
  846|    213|  int32_t bytesize() const {
  847|    213|    return GetField<int32_t>(VT_BYTESIZE, 0);
  848|    213|  }
_ZN10reflection17EnumNamesBaseTypeEv:
   97|   501k|inline const char * const *EnumNamesBaseType() {
   98|   501k|  static const char * const names[21] = {
   99|   501k|    "None",
  100|   501k|    "UType",
  101|   501k|    "Bool",
  102|   501k|    "Byte",
  103|   501k|    "UByte",
  104|   501k|    "Short",
  105|   501k|    "UShort",
  106|   501k|    "Int",
  107|   501k|    "UInt",
  108|   501k|    "Long",
  109|   501k|    "ULong",
  110|   501k|    "Float",
  111|   501k|    "Double",
  112|   501k|    "String",
  113|   501k|    "Vector",
  114|   501k|    "Obj",
  115|   501k|    "Union",
  116|   501k|    "Array",
  117|   501k|    "Vector64",
  118|   501k|    "MaxBaseType",
  119|   501k|    nullptr
  120|   501k|  };
  121|   501k|  return names;
  122|   501k|}
_ZN10reflection16EnumNameBaseTypeENS_8BaseTypeE:
  124|   501k|inline const char *EnumNameBaseType(BaseType e) {
  125|   501k|  if (::flatbuffers::IsOutRange(e, None, MaxBaseType)) return "";
  ------------------
  |  Branch (125:7): [True: 0, False: 501k]
  ------------------
  126|   501k|  const size_t index = static_cast<size_t>(e);
  127|   501k|  return EnumNamesBaseType()[index];
  128|   501k|}

_ZNK11flatbuffers6String5c_strEv:
   26|  3.32M|  const char *c_str() const { return reinterpret_cast<const char *>(Data()); }
_ZNK11flatbuffers6String3strEv:
   27|  2.32M|  std::string str() const { return std::string(c_str(), size()); }

_ZNK11flatbuffers5Table16VerifyTableStartERNS_8VerifierE:
  119|   682k|  bool VerifyTableStart(Verifier &verifier) const {
  120|   682k|    return verifier.VerifyTableStart(data_);
  121|   682k|  }
_ZNK11flatbuffers5Table20VerifyOffsetRequiredIjEEbRKNS_8VerifierEt:
  151|   682k|  bool VerifyOffsetRequired(const Verifier &verifier, voffset_t field) const {
  152|   682k|    auto field_offset = GetOptionalFieldOffset(field);
  153|   682k|    return verifier.Check(field_offset != 0) &&
  ------------------
  |  Branch (153:12): [True: 682k, False: 0]
  ------------------
  154|   682k|           verifier.VerifyOffset<OffsetT>(data_, field_offset);
  ------------------
  |  Branch (154:12): [True: 682k, False: 0]
  ------------------
  155|   682k|  }
_ZNK11flatbuffers5Table22GetOptionalFieldOffsetEt:
   35|  47.4M|  voffset_t GetOptionalFieldOffset(voffset_t field) const {
   36|       |    // The vtable offset is always at the start.
   37|  47.4M|    auto vtable = GetVTable();
   38|       |    // The first element is the size of the vtable (fields + type id + itself).
   39|  47.4M|    auto vtsize = ReadScalar<voffset_t>(vtable);
   40|       |    // If the field we're accessing is outside the vtable, we're reading older
   41|       |    // data, so it's the same as if the offset was 0 (not present).
   42|  47.4M|    return field < vtsize ? ReadScalar<voffset_t>(vtable + field) : 0;
  ------------------
  |  Branch (42:12): [True: 44.7M, False: 2.73M]
  ------------------
   43|  47.4M|  }
_ZNK11flatbuffers5Table9GetVTableEv:
   29|  47.4M|  const uint8_t *GetVTable() const {
   30|  47.4M|    return data_ - ReadScalar<soffset_t>(data_);
   31|  47.4M|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection6ObjectEEEjEEjEET_t:
   58|  96.3k|  P GetPointer(voffset_t field) const {
   59|  96.3k|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  96.3k|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection6ObjectEEEjEEjEET_t:
   51|  96.3k|  P GetPointer(voffset_t field) {
   52|  96.3k|    auto field_offset = GetOptionalFieldOffset(field);
   53|  96.3k|    auto p = data_ + field_offset;
   54|  96.3k|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 96.3k, False: 0]
  ------------------
   55|  96.3k|                        : nullptr;
   56|  96.3k|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6StringEjEET_t:
   58|  3.73M|  P GetPointer(voffset_t field) const {
   59|  3.73M|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  3.73M|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6StringEjEET_t:
   51|  3.73M|  P GetPointer(voffset_t field) {
   52|  3.73M|    auto field_offset = GetOptionalFieldOffset(field);
   53|  3.73M|    auto p = data_ + field_offset;
   54|  3.73M|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 3.73M, False: 0]
  ------------------
   55|  3.73M|                        : nullptr;
   56|  3.73M|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection5FieldEEEjEEjEET_t:
   58|  2.64M|  P GetPointer(voffset_t field) const {
   59|  2.64M|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  2.64M|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection5FieldEEEjEEjEET_t:
   51|  2.64M|  P GetPointer(voffset_t field) {
   52|  2.64M|    auto field_offset = GetOptionalFieldOffset(field);
   53|  2.64M|    auto p = data_ + field_offset;
   54|  2.64M|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 2.64M, False: 0]
  ------------------
   55|  2.64M|                        : nullptr;
   56|  2.64M|  }
_ZNK11flatbuffers5Table11VerifyFieldIaEEbRKNS_8VerifierEtm:
  126|   647k|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|   647k|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|   647k|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 296k, False: 350k]
  |  Branch (131:29): [True: 350k, False: 0]
  ------------------
  132|   647k|  }
_ZNK11flatbuffers5Table11VerifyFieldIjEEbRKNS_8VerifierEtm:
  126|   647k|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|   647k|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|   647k|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 215k, False: 431k]
  |  Branch (131:29): [True: 431k, False: 0]
  ------------------
  132|   647k|  }
_ZNK11flatbuffers5Table10GetPointerIPKN10reflection4TypeEjEET_t:
   58|  10.1M|  P GetPointer(voffset_t field) const {
   59|  10.1M|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  10.1M|  }
_ZN11flatbuffers5Table10GetPointerIPKN10reflection4TypeEjEET_t:
   51|  10.1M|  P GetPointer(voffset_t field) {
   52|  10.1M|    auto field_offset = GetOptionalFieldOffset(field);
   53|  10.1M|    auto p = data_ + field_offset;
   54|  10.1M|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 10.1M, False: 0]
  ------------------
   55|  10.1M|                        : nullptr;
   56|  10.1M|  }
_ZNK11flatbuffers5Table11VerifyFieldItEEbRKNS_8VerifierEtm:
  126|  1.09M|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|  1.09M|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|  1.09M|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 616k, False: 481k]
  |  Branch (131:29): [True: 481k, False: 0]
  ------------------
  132|  1.09M|  }
_ZNK11flatbuffers5Table11VerifyFieldIlEEbRKNS_8VerifierEtm:
  126|   308k|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|   308k|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|   308k|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 246k, False: 61.6k]
  |  Branch (131:29): [True: 61.6k, False: 0]
  ------------------
  132|   308k|  }
_ZNK11flatbuffers5Table11VerifyFieldIdEEbRKNS_8VerifierEtm:
  126|   258k|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|   258k|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|   258k|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 242k, False: 15.4k]
  |  Branch (131:29): [True: 15.4k, False: 0]
  ------------------
  132|   258k|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection8KeyValueEEEjEEjEET_t:
   58|   709k|  P GetPointer(voffset_t field) const {
   59|   709k|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|   709k|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection8KeyValueEEEjEEjEET_t:
   51|   709k|  P GetPointer(voffset_t field) {
   52|   709k|    auto field_offset = GetOptionalFieldOffset(field);
   53|   709k|    auto p = data_ + field_offset;
   54|   709k|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 0, False: 709k]
  ------------------
   55|   709k|                        : nullptr;
   56|   709k|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetINS_6StringEEEjEEjEET_t:
   58|   709k|  P GetPointer(voffset_t field) const {
   59|   709k|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|   709k|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetINS_6StringEEEjEEjEET_t:
   51|   709k|  P GetPointer(voffset_t field) {
   52|   709k|    auto field_offset = GetOptionalFieldOffset(field);
   53|   709k|    auto p = data_ + field_offset;
   54|   709k|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 0, False: 709k]
  ------------------
   55|   709k|                        : nullptr;
   56|   709k|  }
_ZNK11flatbuffers5Table11VerifyFieldIhEEbRKNS_8VerifierEtm:
  126|  1.33M|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|  1.33M|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|  1.33M|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 1.16M, False: 173k]
  |  Branch (131:29): [True: 173k, False: 0]
  ------------------
  132|  1.33M|  }
_ZNK11flatbuffers5Table11VerifyFieldIiEEbRKNS_8VerifierEtm:
  126|   385k|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|   385k|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|   385k|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 177k, False: 208k]
  |  Branch (131:29): [True: 208k, False: 0]
  ------------------
  132|   385k|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection4EnumEEEjEEjEET_t:
   58|  7.23M|  P GetPointer(voffset_t field) const {
   59|  7.23M|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  7.23M|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection4EnumEEEjEEjEET_t:
   51|  7.23M|  P GetPointer(voffset_t field) {
   52|  7.23M|    auto field_offset = GetOptionalFieldOffset(field);
   53|  7.23M|    auto p = data_ + field_offset;
   54|  7.23M|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 7.23M, False: 0]
  ------------------
   55|  7.23M|                        : nullptr;
   56|  7.23M|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection7EnumValEEEjEEjEET_t:
   58|  3.65M|  P GetPointer(voffset_t field) const {
   59|  3.65M|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  3.65M|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection7EnumValEEEjEEjEET_t:
   51|  3.65M|  P GetPointer(voffset_t field) {
   52|  3.65M|    auto field_offset = GetOptionalFieldOffset(field);
   53|  3.65M|    auto p = data_ + field_offset;
   54|  3.65M|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 3.65M, False: 0]
  ------------------
   55|  3.65M|                        : nullptr;
   56|  3.65M|  }
_ZNK11flatbuffers5Table12VerifyOffsetIjEEbRKNS_8VerifierEt:
  145|   824k|  bool VerifyOffset(const Verifier &verifier, voffset_t field) const {
  146|   824k|    auto field_offset = GetOptionalFieldOffset(field);
  147|   824k|    return !field_offset || verifier.VerifyOffset<OffsetT>(data_, field_offset);
  ------------------
  |  Branch (147:12): [True: 713k, False: 111k]
  |  Branch (147:29): [True: 111k, False: 0]
  ------------------
  148|   824k|  }
_ZNK11flatbuffers5Table10GetPointerIPKN10reflection6ObjectEjEET_t:
   58|  11.4k|  P GetPointer(voffset_t field) const {
   59|  11.4k|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  11.4k|  }
_ZN11flatbuffers5Table10GetPointerIPKN10reflection6ObjectEjEET_t:
   51|  11.4k|  P GetPointer(voffset_t field) {
   52|  11.4k|    auto field_offset = GetOptionalFieldOffset(field);
   53|  11.4k|    auto p = data_ + field_offset;
   54|  11.4k|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 11.4k, False: 0]
  ------------------
   55|  11.4k|                        : nullptr;
   56|  11.4k|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection7ServiceEEEjEEjEET_t:
   58|  7.71k|  P GetPointer(voffset_t field) const {
   59|  7.71k|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  7.71k|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection7ServiceEEEjEEjEET_t:
   51|  7.71k|  P GetPointer(voffset_t field) {
   52|  7.71k|    auto field_offset = GetOptionalFieldOffset(field);
   53|  7.71k|    auto p = data_ + field_offset;
   54|  7.71k|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 7.71k, False: 0]
  ------------------
   55|  7.71k|                        : nullptr;
   56|  7.71k|  }
_ZNK11flatbuffers5Table11VerifyFieldImEEbRKNS_8VerifierEtm:
  126|  3.85k|                   size_t align) const {
  127|       |    // Calling GetOptionalFieldOffset should be safe now thanks to
  128|       |    // VerifyTable().
  129|  3.85k|    auto field_offset = GetOptionalFieldOffset(field);
  130|       |    // Check the actual field.
  131|  3.85k|    return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
  ------------------
  |  Branch (131:12): [True: 0, False: 3.85k]
  |  Branch (131:29): [True: 3.85k, False: 0]
  ------------------
  132|  3.85k|  }
_ZNK11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection10SchemaFileEEEjEEjEET_t:
   58|  7.71k|  P GetPointer(voffset_t field) const {
   59|  7.71k|    return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
   60|  7.71k|  }
_ZN11flatbuffers5Table10GetPointerIPKNS_6VectorINS_6OffsetIN10reflection10SchemaFileEEEjEEjEET_t:
   51|  7.71k|  P GetPointer(voffset_t field) {
   52|  7.71k|    auto field_offset = GetOptionalFieldOffset(field);
   53|  7.71k|    auto p = data_ + field_offset;
   54|  7.71k|    return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
  ------------------
  |  Branch (54:12): [True: 0, False: 7.71k]
  ------------------
   55|  7.71k|                        : nullptr;
   56|  7.71k|  }
_ZNK11flatbuffers5Table8GetFieldIaEET_tS2_:
   45|  6.11M|  template<typename T> T GetField(voffset_t field, T defaultval) const {
   46|  6.11M|    auto field_offset = GetOptionalFieldOffset(field);
   47|  6.11M|    return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
  ------------------
  |  Branch (47:12): [True: 6.09M, False: 22.2k]
  ------------------
   48|  6.11M|  }
_ZNK11flatbuffers5Table8GetFieldIiEET_tS2_:
   45|  3.72M|  template<typename T> T GetField(voffset_t field, T defaultval) const {
   46|  3.72M|    auto field_offset = GetOptionalFieldOffset(field);
   47|  3.72M|    return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
  ------------------
  |  Branch (47:12): [True: 3.72M, False: 0]
  ------------------
   48|  3.72M|  }
_ZNK11flatbuffers5Table8GetFieldItEET_tS2_:
   45|  1.95M|  template<typename T> T GetField(voffset_t field, T defaultval) const {
   46|  1.95M|    auto field_offset = GetOptionalFieldOffset(field);
   47|  1.95M|    return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
  ------------------
  |  Branch (47:12): [True: 1.12M, False: 833k]
  ------------------
   48|  1.95M|  }
_ZNK11flatbuffers5Table8GetFieldIlEET_tS2_:
   45|  9.64k|  template<typename T> T GetField(voffset_t field, T defaultval) const {
   46|  9.64k|    auto field_offset = GetOptionalFieldOffset(field);
   47|  9.64k|    return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
  ------------------
  |  Branch (47:12): [True: 3.54k, False: 6.10k]
  ------------------
   48|  9.64k|  }
_ZNK11flatbuffers5Table8GetFieldIhEET_tS2_:
   45|   401k|  template<typename T> T GetField(voffset_t field, T defaultval) const {
   46|   401k|    auto field_offset = GetOptionalFieldOffset(field);
   47|   401k|    return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
  ------------------
  |  Branch (47:12): [True: 155k, False: 245k]
  ------------------
   48|   401k|  }
_ZNK11flatbuffers5Table8GetFieldIdEET_tS2_:
   45|  61.8k|  template<typename T> T GetField(voffset_t field, T defaultval) const {
   46|  61.8k|    auto field_offset = GetOptionalFieldOffset(field);
   47|  61.8k|    return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
  ------------------
  |  Branch (47:12): [True: 61.8k, False: 0]
  ------------------
   48|  61.8k|  }

_ZN11flatbuffers11NumToStringImEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEET_:
  128|   144k|template<typename T> std::string NumToString(T t) {
  129|       |  // clang-format off
  130|       |
  131|   144k|  #ifndef FLATBUFFERS_PREFER_PRINTF
  132|   144k|    std::stringstream ss;
  133|   144k|    ss << t;
  134|   144k|    return ss.str();
  135|       |  #else // FLATBUFFERS_PREFER_PRINTF
  136|       |    auto v = static_cast<long long>(t);
  137|       |    return NumToStringImplWrapper(v, "%.*lld");
  138|       |  #endif // FLATBUFFERS_PREFER_PRINTF
  139|       |  // clang-format on
  140|   144k|}

_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection6ObjectEEEjE4sizeEv:
  164|   146k|  SizeT size() const { return EndianScalar(length_); }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection6ObjectEEEjE3GetEj:
  175|   115k|  return_type Get(SizeT i) const {
  176|   115k|    FLATBUFFERS_ASSERT(i < size());
  177|      0|    return IndirectHelper<T>::Read(Data(), i);
  178|   115k|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection6ObjectEEEjE4DataEv:
  253|   115k|  const uint8_t *Data() const {
  254|   115k|    return reinterpret_cast<const uint8_t *>(&length_ + 1);
  255|   115k|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection5FieldEEEjE4sizeEv:
  164|  3.13M|  SizeT size() const { return EndianScalar(length_); }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection5FieldEEEjE3GetEj:
  175|  1.63M|  return_type Get(SizeT i) const {
  176|  1.63M|    FLATBUFFERS_ASSERT(i < size());
  177|      0|    return IndirectHelper<T>::Read(Data(), i);
  178|  1.63M|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection5FieldEEEjE4DataEv:
  253|  1.63M|  const uint8_t *Data() const {
  254|  1.63M|    return reinterpret_cast<const uint8_t *>(&length_ + 1);
  255|  1.63M|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection4EnumEEEjE4sizeEv:
  164|  7.25M|  SizeT size() const { return EndianScalar(length_); }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection4EnumEEEjE3GetEj:
  175|  3.64M|  return_type Get(SizeT i) const {
  176|  3.64M|    FLATBUFFERS_ASSERT(i < size());
  177|      0|    return IndirectHelper<T>::Read(Data(), i);
  178|  3.64M|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection4EnumEEEjE4DataEv:
  253|  3.64M|  const uint8_t *Data() const {
  254|  3.64M|    return reinterpret_cast<const uint8_t *>(&length_ + 1);
  255|  3.64M|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection7EnumValEEEjE4sizeEv:
  164|  3.74M|  SizeT size() const { return EndianScalar(length_); }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection7EnumValEEEjE3GetEj:
  175|  79.5k|  return_type Get(SizeT i) const {
  176|  79.5k|    FLATBUFFERS_ASSERT(i < size());
  177|      0|    return IndirectHelper<T>::Read(Data(), i);
  178|  79.5k|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection7EnumValEEEjE4DataEv:
  253|  79.5k|  const uint8_t *Data() const {
  254|  79.5k|    return reinterpret_cast<const uint8_t *>(&length_ + 1);
  255|  79.5k|  }
_ZNK11flatbuffers6VectorINS_6OffsetIN10reflection7ServiceEEEjE4sizeEv:
  164|  3.85k|  SizeT size() const { return EndianScalar(length_); }
_ZNK11flatbuffers6VectorIcjE4DataEv:
  253|  3.32M|  const uint8_t *Data() const {
  254|  3.32M|    return reinterpret_cast<const uint8_t *>(&length_ + 1);
  255|  3.32M|  }
_ZNK11flatbuffers6VectorIcjE4sizeEv:
  164|  2.32M|  SizeT size() const { return EndianScalar(length_); }

_ZN11flatbuffers8VerifierC2EPKhmjjb:
   59|  3.85k|        }()) {}
_ZZN11flatbuffers8VerifierC1EPKhmjjbENKUlvE_clEv:
   53|  3.85k|      : Verifier(buf, buf_len, [&] {
   54|  3.85k|          Options opts;
   55|  3.85k|          opts.max_depth = max_depth;
   56|  3.85k|          opts.max_tables = max_tables;
   57|  3.85k|          opts.check_alignment = check_alignment;
   58|  3.85k|          return opts;
   59|  3.85k|        }()) {}
_ZN11flatbuffers8VerifierC2EPKhmRKNS0_7OptionsE:
   45|  3.85k|      : buf_(buf), size_(buf_len), opts_(opts) {
   46|  3.85k|    FLATBUFFERS_ASSERT(size_ < opts.max_size);
   47|  3.85k|  }
_ZN11flatbuffers8Verifier12VerifyBufferIN10reflection6SchemaEEEbPKc:
  242|  3.85k|  template<typename T> bool VerifyBuffer(const char *const identifier) {
  243|  3.85k|    return VerifyBufferFromStart<T>(identifier, 0);
  244|  3.85k|  }
_ZN11flatbuffers8Verifier21VerifyBufferFromStartIN10reflection6SchemaEEEbPKcm:
  199|  3.85k|  bool VerifyBufferFromStart(const char *const identifier, const size_t start) {
  200|       |    // Buffers have to be of some size to be valid. The reason it is a runtime
  201|       |    // check instead of static_assert, is that nested flatbuffers go through
  202|       |    // this call and their size is determined at runtime.
  203|  3.85k|    if (!Check(size_ >= FLATBUFFERS_MIN_BUFFER_SIZE)) return false;
  ------------------
  |  |  347|  3.85k|#define FLATBUFFERS_MIN_BUFFER_SIZE sizeof(uoffset_t) + sizeof(soffset_t) + \
  |  |  348|  3.85k|   sizeof(uint16_t) + sizeof(uint16_t)
  ------------------
  |  Branch (203:9): [True: 0, False: 3.85k]
  ------------------
  204|       |
  205|       |    // If an identifier is provided, check that we have a buffer
  206|  3.85k|    if (identifier && !Check((size_ >= 2 * sizeof(flatbuffers::uoffset_t) &&
  ------------------
  |  Branch (206:9): [True: 3.85k, False: 0]
  |  Branch (206:23): [True: 0, False: 3.85k]
  |  Branch (206:31): [True: 3.85k, False: 0]
  ------------------
  207|  3.85k|                              BufferHasIdentifier(buf_ + start, identifier)))) {
  ------------------
  |  Branch (207:31): [True: 3.85k, False: 0]
  ------------------
  208|      0|      return false;
  209|      0|    }
  210|       |
  211|       |    // Call T::Verify, which must be in the generated code for this type.
  212|  3.85k|    const auto o = VerifyOffset<uoffset_t>(start);
  213|  3.85k|    return Check(o != 0) &&
  ------------------
  |  Branch (213:12): [True: 3.85k, False: 0]
  ------------------
  214|  3.85k|           reinterpret_cast<const T *>(buf_ + start + o)->Verify(*this)
  ------------------
  |  Branch (214:12): [True: 3.85k, False: 0]
  ------------------
  215|       |    // clang-format off
  216|       |    #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
  217|       |           && GetComputedSize()
  218|       |    #endif
  219|  3.85k|        ;
  220|       |    // clang-format on
  221|  3.85k|  }
_ZNK11flatbuffers8Verifier5CheckEb:
   62|  16.2M|  bool Check(const bool ok) const {
   63|       |    // clang-format off
   64|       |    #ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
   65|       |       if (opts_.assert) { FLATBUFFERS_ASSERT(ok); }
   66|       |    #endif
   67|       |    #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
   68|       |      if (!ok)
   69|       |        upper_bound_ = 0;
   70|       |    #endif
   71|       |    // clang-format on
   72|  16.2M|    return ok;
   73|  16.2M|  }
_ZNK11flatbuffers8Verifier12VerifyOffsetIjiEEmm:
  256|   797k|  size_t VerifyOffset(const size_t start) const {
  257|   797k|    if (!Verify<OffsetT>(start)) return 0;
  ------------------
  |  Branch (257:9): [True: 0, False: 797k]
  ------------------
  258|   797k|    const auto o = ReadScalar<OffsetT>(buf_ + start);
  259|       |    // May not point to itself.
  260|   797k|    if (!Check(o != 0)) return 0;
  ------------------
  |  Branch (260:9): [True: 0, False: 797k]
  ------------------
  261|       |    // Can't wrap around larger than the max size.
  262|   797k|    if (!Check(static_cast<SOffsetT>(o) >= 0)) return 0;
  ------------------
  |  Branch (262:9): [True: 0, False: 797k]
  ------------------
  263|       |    // Must be inside the buffer to create a pointer from it (pointer outside
  264|       |    // buffer is UB).
  265|   797k|    if (!Verify(start + o, 1)) return 0;
  ------------------
  |  Branch (265:9): [True: 0, False: 797k]
  ------------------
  266|   797k|    return o;
  267|   797k|  }
_ZNK11flatbuffers8Verifier6VerifyIjEEbm:
   92|  1.26M|  template<typename T> bool Verify(const size_t elem) const {
   93|  1.26M|    return VerifyAlignment(elem, sizeof(T)) && Verify(elem, sizeof(T));
  ------------------
  |  Branch (93:12): [True: 1.26M, False: 0]
  |  Branch (93:48): [True: 1.26M, False: 0]
  ------------------
   94|  1.26M|  }
_ZNK11flatbuffers8Verifier15VerifyAlignmentEmm:
   87|  5.03M|  bool VerifyAlignment(const size_t elem, const size_t align) const {
   88|  5.03M|    return Check((elem & (align - 1)) == 0 || !opts_.check_alignment);
  ------------------
  |  Branch (88:18): [True: 5.03M, False: 0]
  |  Branch (88:47): [True: 0, False: 0]
  ------------------
   89|  5.03M|  }
_ZNK11flatbuffers8Verifier6VerifyEmm:
   76|  6.71M|  bool Verify(const size_t elem, const size_t elem_len) const {
   77|       |    // clang-format off
   78|       |    #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
   79|       |      auto upper_bound = elem + elem_len;
   80|       |      if (upper_bound_ < upper_bound)
   81|       |        upper_bound_ =  upper_bound;
   82|       |    #endif
   83|       |    // clang-format on
   84|  6.71M|    return Check(elem_len < size_ && elem <= size_ - elem_len);
  ------------------
  |  Branch (84:18): [True: 6.71M, False: 0]
  |  Branch (84:38): [True: 6.71M, False: 0]
  ------------------
   85|  6.71M|  }
_ZN11flatbuffers8Verifier16VerifyTableStartEPKh:
  181|   682k|  bool VerifyTableStart(const uint8_t *const table) {
  182|       |    // Check the vtable offset.
  183|   682k|    const auto tableo = static_cast<size_t>(table - buf_);
  184|   682k|    if (!Verify<soffset_t>(tableo)) return false;
  ------------------
  |  Branch (184:9): [True: 0, False: 682k]
  ------------------
  185|       |    // This offset may be signed, but doing the subtraction unsigned always
  186|       |    // gives the result we want.
  187|   682k|    const auto vtableo =
  188|   682k|        tableo - static_cast<size_t>(ReadScalar<soffset_t>(table));
  189|       |    // Check the vtable size field, then check vtable fits in its entirety.
  190|   682k|    if (!(VerifyComplexity() && Verify<voffset_t>(vtableo) &&
  ------------------
  |  Branch (190:11): [True: 682k, False: 0]
  |  Branch (190:33): [True: 682k, False: 0]
  ------------------
  191|   682k|          VerifyAlignment(ReadScalar<voffset_t>(buf_ + vtableo),
  ------------------
  |  Branch (191:11): [True: 682k, False: 0]
  ------------------
  192|   682k|                          sizeof(voffset_t))))
  193|      0|      return false;
  194|   682k|    const auto vsize = ReadScalar<voffset_t>(buf_ + vtableo);
  195|   682k|    return Check((vsize & 1) == 0) && Verify(vtableo, vsize);
  ------------------
  |  Branch (195:12): [True: 682k, False: 0]
  |  Branch (195:39): [True: 682k, False: 0]
  ------------------
  196|   682k|  }
_ZNK11flatbuffers8Verifier6VerifyIiEEbm:
   92|   682k|  template<typename T> bool Verify(const size_t elem) const {
   93|   682k|    return VerifyAlignment(elem, sizeof(T)) && Verify(elem, sizeof(T));
  ------------------
  |  Branch (93:12): [True: 682k, False: 0]
  |  Branch (93:48): [True: 682k, False: 0]
  ------------------
   94|   682k|  }
_ZN11flatbuffers8Verifier16VerifyComplexityEv:
  277|   682k|  bool VerifyComplexity() {
  278|   682k|    depth_++;
  279|   682k|    num_tables_++;
  280|   682k|    return Check(depth_ <= opts_.max_depth && num_tables_ <= opts_.max_tables);
  ------------------
  |  Branch (280:18): [True: 682k, False: 0]
  |  Branch (280:47): [True: 682k, False: 0]
  ------------------
  281|   682k|  }
_ZNK11flatbuffers8Verifier6VerifyItEEbm:
   92|   682k|  template<typename T> bool Verify(const size_t elem) const {
   93|   682k|    return VerifyAlignment(elem, sizeof(T)) && Verify(elem, sizeof(T));
  ------------------
  |  Branch (93:12): [True: 682k, False: 0]
  |  Branch (93:48): [True: 682k, False: 0]
  ------------------
   94|   682k|  }
_ZNK11flatbuffers8Verifier12VerifyOffsetIjEEmPKht:
  270|   794k|  size_t VerifyOffset(const uint8_t *const base, const voffset_t start) const {
  271|   794k|    return VerifyOffset<OffsetT>(static_cast<size_t>(base - buf_) + start);
  272|   794k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection6ObjectEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|  3.85k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|  3.85k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 0, False: 3.85k]
  |  Branch (122:20): [True: 3.85k, False: 0]
  ------------------
  123|  3.85k|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|  3.85k|  }
_ZNK11flatbuffers8Verifier20VerifyVectorOrStringIjEEbPKhmPm:
  144|   466k|                            size_t *const end = nullptr) const {
  145|   466k|    const auto vec_offset = static_cast<size_t>(vec - buf_);
  146|       |    // Check we can read the size field.
  147|   466k|    if (!Verify<LenT>(vec_offset)) return false;
  ------------------
  |  Branch (147:9): [True: 0, False: 466k]
  ------------------
  148|       |    // Check the whole array. If this is a string, the byte past the array must
  149|       |    // be 0.
  150|   466k|    const LenT size = ReadScalar<LenT>(vec);
  151|   466k|    const auto max_elems = opts_.max_size / elem_size;
  152|   466k|    if (!Check(size < max_elems))
  ------------------
  |  Branch (152:9): [True: 0, False: 466k]
  ------------------
  153|      0|      return false;  // Protect against byte_size overflowing.
  154|   466k|    const auto byte_size = sizeof(LenT) + elem_size * size;
  155|   466k|    if (end) *end = vec_offset + byte_size;
  ------------------
  |  Branch (155:9): [True: 408k, False: 57.8k]
  ------------------
  156|   466k|    return Verify(vec_offset, byte_size);
  157|   466k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection6ObjectEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|  3.85k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|  3.85k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 3.85k, False: 0]
  ------------------
  173|  30.8k|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 26.9k, False: 3.85k]
  ------------------
  174|  26.9k|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 26.9k]
  ------------------
  175|  26.9k|      }
  176|  3.85k|    }
  177|  3.85k|    return true;
  178|  3.85k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection5FieldEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|  30.8k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|  30.8k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 0, False: 30.8k]
  |  Branch (122:20): [True: 30.8k, False: 0]
  ------------------
  123|  30.8k|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|  30.8k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection5FieldEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|  30.8k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|  30.8k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 30.8k, False: 0]
  ------------------
  173|   289k|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 258k, False: 30.8k]
  ------------------
  174|   258k|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 258k]
  ------------------
  175|   258k|      }
  176|  30.8k|    }
  177|  30.8k|    return true;
  178|  30.8k|  }
_ZN11flatbuffers8Verifier11VerifyTableIN10reflection4TypeEEEbPKT_:
  115|   323k|  template<typename T> bool VerifyTable(const T *const table) {
  116|   323k|    return !table || table->Verify(*this);
  ------------------
  |  Branch (116:12): [True: 0, False: 323k]
  |  Branch (116:22): [True: 323k, False: 0]
  ------------------
  117|   323k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldIaEEbPKhtm:
  109|   350k|                   const size_t align) const {
  110|   350k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|   350k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 350k, False: 0]
  |  Branch (111:41): [True: 350k, False: 0]
  ------------------
  112|   350k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldIjEEbPKhtm:
  109|   431k|                   const size_t align) const {
  110|   431k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|   431k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 431k, False: 0]
  |  Branch (111:41): [True: 431k, False: 0]
  ------------------
  112|   431k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldItEEbPKhtm:
  109|   481k|                   const size_t align) const {
  110|   481k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|   481k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 481k, False: 0]
  |  Branch (111:41): [True: 481k, False: 0]
  ------------------
  112|   481k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldIlEEbPKhtm:
  109|  61.6k|                   const size_t align) const {
  110|  61.6k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|  61.6k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 61.6k, False: 0]
  |  Branch (111:41): [True: 61.6k, False: 0]
  ------------------
  112|  61.6k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldIdEEbPKhtm:
  109|  15.4k|                   const size_t align) const {
  110|  15.4k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|  15.4k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 15.4k, False: 0]
  |  Branch (111:41): [True: 15.4k, False: 0]
  ------------------
  112|  15.4k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldIhEEbPKhtm:
  109|   173k|                   const size_t align) const {
  110|   173k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|   173k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 173k, False: 0]
  |  Branch (111:41): [True: 173k, False: 0]
  ------------------
  112|   173k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldIiEEbPKhtm:
  109|   208k|                   const size_t align) const {
  110|   208k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|   208k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 208k, False: 0]
  |  Branch (111:41): [True: 208k, False: 0]
  ------------------
  112|   208k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection8KeyValueEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|   354k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|   354k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 354k, False: 0]
  |  Branch (122:20): [True: 0, False: 0]
  ------------------
  123|      0|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|   354k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection8KeyValueEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|   354k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|   354k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 0, False: 354k]
  ------------------
  173|      0|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 0, False: 0]
  ------------------
  174|      0|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|      }
  176|      0|    }
  177|   354k|    return true;
  178|   354k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetINS_6StringEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|   354k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|   354k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 354k, False: 0]
  |  Branch (122:20): [True: 0, False: 0]
  ------------------
  123|      0|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|   354k|  }
_ZNK11flatbuffers8Verifier21VerifyVectorOfStringsEPKNS_6VectorINS_6OffsetINS_6StringEEEjEE:
  160|   354k|  bool VerifyVectorOfStrings(const Vector<Offset<String>> *const vec) const {
  161|   354k|    if (vec) {
  ------------------
  |  Branch (161:9): [True: 0, False: 354k]
  ------------------
  162|      0|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (162:29): [True: 0, False: 0]
  ------------------
  163|      0|        if (!VerifyString(vec->Get(i))) return false;
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|      }
  165|      0|    }
  166|   354k|    return true;
  167|   354k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection4EnumEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|  3.85k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|  3.85k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 0, False: 3.85k]
  |  Branch (122:20): [True: 3.85k, False: 0]
  ------------------
  123|  3.85k|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|  3.85k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection4EnumEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|  3.85k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|  3.85k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 3.85k, False: 0]
  ------------------
  173|  19.2k|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 15.4k, False: 3.85k]
  ------------------
  174|  15.4k|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 15.4k]
  ------------------
  175|  15.4k|      }
  176|  3.85k|    }
  177|  3.85k|    return true;
  178|  3.85k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection7EnumValEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|  15.4k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|  15.4k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 0, False: 15.4k]
  |  Branch (122:20): [True: 15.4k, False: 0]
  ------------------
  123|  15.4k|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|  15.4k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection7EnumValEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|  15.4k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|  15.4k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 15.4k, False: 0]
  ------------------
  173|  65.5k|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 50.1k, False: 15.4k]
  ------------------
  174|  50.1k|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 50.1k]
  ------------------
  175|  50.1k|      }
  176|  15.4k|    }
  177|  15.4k|    return true;
  178|  15.4k|  }
_ZNK11flatbuffers8Verifier12VerifyStringEPKNS_6StringE:
  133|   408k|  bool VerifyString(const String *const str) const {
  134|   408k|    size_t end;
  135|   408k|    return !str || (VerifyVectorOrString<uoffset_t>(
  ------------------
  |  Branch (135:12): [True: 0, False: 408k]
  |  Branch (135:21): [True: 408k, False: 0]
  ------------------
  136|   408k|                        reinterpret_cast<const uint8_t *>(str), 1, &end) &&
  137|   408k|                    Verify(end, 1) &&           // Must have terminator
  ------------------
  |  Branch (137:21): [True: 408k, False: 0]
  ------------------
  138|   408k|                    Check(buf_[end] == '\0'));  // Terminating byte must be 0.
  ------------------
  |  Branch (138:21): [True: 408k, False: 0]
  ------------------
  139|   408k|  }
_ZN11flatbuffers8Verifier11VerifyTableIN10reflection6ObjectEEEbPKT_:
  115|  3.85k|  template<typename T> bool VerifyTable(const T *const table) {
  116|  3.85k|    return !table || table->Verify(*this);
  ------------------
  |  Branch (116:12): [True: 0, False: 3.85k]
  |  Branch (116:22): [True: 3.85k, False: 0]
  ------------------
  117|  3.85k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection7ServiceEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|  3.85k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|  3.85k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 0, False: 3.85k]
  |  Branch (122:20): [True: 3.85k, False: 0]
  ------------------
  123|  3.85k|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|  3.85k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection7ServiceEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|  3.85k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|  3.85k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 3.85k, False: 0]
  ------------------
  173|  3.85k|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 0, False: 3.85k]
  ------------------
  174|      0|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|      }
  176|  3.85k|    }
  177|  3.85k|    return true;
  178|  3.85k|  }
_ZNK11flatbuffers8Verifier11VerifyFieldImEEbPKhtm:
  109|  3.85k|                   const size_t align) const {
  110|  3.85k|    const auto f = static_cast<size_t>(base - buf_) + elem_off;
  111|  3.85k|    return VerifyAlignment(f, align) && Verify(f, sizeof(T));
  ------------------
  |  Branch (111:12): [True: 3.85k, False: 0]
  |  Branch (111:41): [True: 3.85k, False: 0]
  ------------------
  112|  3.85k|  }
_ZNK11flatbuffers8Verifier12VerifyVectorIJENS_6OffsetIN10reflection10SchemaFileEEEjEEbPKNS_6VectorIT0_T1_EE:
  121|  3.85k|  bool VerifyVector(const Vector<T, LenT> *const vec) const {
  122|  3.85k|    return !vec || VerifyVectorOrString<LenT>(
  ------------------
  |  Branch (122:12): [True: 3.85k, False: 0]
  |  Branch (122:20): [True: 0, False: 0]
  ------------------
  123|      0|                       reinterpret_cast<const uint8_t *>(vec), sizeof(T));
  124|  3.85k|  }
_ZN11flatbuffers8Verifier20VerifyVectorOfTablesIN10reflection10SchemaFileEEEbPKNS_6VectorINS_6OffsetIT_EEjEE:
  171|  3.85k|  bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
  172|  3.85k|    if (vec) {
  ------------------
  |  Branch (172:9): [True: 0, False: 3.85k]
  ------------------
  173|      0|      for (uoffset_t i = 0; i < vec->size(); i++) {
  ------------------
  |  Branch (173:29): [True: 0, False: 0]
  ------------------
  174|      0|        if (!vec->Get(i)->Verify(*this)) return false;
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|      }
  176|      0|    }
  177|  3.85k|    return true;
  178|  3.85k|  }
_ZN11flatbuffers8Verifier8EndTableEv:
  284|   682k|  bool EndTable() {
  285|   682k|    depth_--;
  286|   682k|    return true;
  287|   682k|  }

_ZN11flatbuffers15BinaryAnnotator8AnnotateEv:
  122|  3.85k|std::map<uint64_t, BinarySection> BinaryAnnotator::Annotate() {
  123|  3.85k|  flatbuffers::Verifier verifier(bfbs_, static_cast<size_t>(bfbs_length_));
  124|       |
  125|  3.85k|  if ((is_size_prefixed_ &&
  ------------------
  |  Branch (125:8): [True: 0, False: 3.85k]
  ------------------
  126|  3.85k|       !reflection::VerifySizePrefixedSchemaBuffer(verifier)) ||
  ------------------
  |  Branch (126:8): [True: 0, False: 0]
  ------------------
  127|  3.85k|      !reflection::VerifySchemaBuffer(verifier)) {
  ------------------
  |  Branch (127:7): [True: 0, False: 3.85k]
  ------------------
  128|      0|    return {};
  129|      0|  }
  130|       |
  131|       |  // The binary is too short to read as a flatbuffers.
  132|  3.85k|  if (binary_length_ < FLATBUFFERS_MIN_BUFFER_SIZE) { return {}; }
  ------------------
  |  |  347|  3.85k|#define FLATBUFFERS_MIN_BUFFER_SIZE sizeof(uoffset_t) + sizeof(soffset_t) + \
  |  |  348|  3.85k|   sizeof(uint16_t) + sizeof(uint16_t)
  ------------------
  |  Branch (132:7): [True: 5, False: 3.84k]
  ------------------
  133|       |
  134|       |  // Make sure we start with a clean slate.
  135|  3.84k|  vtables_.clear();
  136|  3.84k|  sections_.clear();
  137|       |
  138|       |  // First parse the header region which always start at offset 0.
  139|       |  // The returned offset will point to the root_table location.
  140|  3.84k|  const uint64_t root_table_offset = BuildHeader(0);
  141|       |
  142|  3.84k|  if (IsValidOffset(root_table_offset)) {
  ------------------
  |  Branch (142:7): [True: 3.75k, False: 97]
  ------------------
  143|       |    // Build the root table, and all else will be referenced from it.
  144|  3.75k|    BuildTable(root_table_offset, BinarySectionType::RootTable,
  145|  3.75k|               schema_->root_table());
  146|  3.75k|  }
  147|       |
  148|       |  // Now that all the sections are built, make sure the binary sections are
  149|       |  // contiguous.
  150|  3.84k|  FixMissingRegions();
  151|       |
  152|       |  // Then scan the area between BinarySections insert padding sections that are
  153|       |  // implied.
  154|  3.84k|  FixMissingSections();
  155|       |
  156|  3.84k|  return sections_;
  157|  3.85k|}
_ZN11flatbuffers15BinaryAnnotator11BuildHeaderEm:
  159|  3.84k|uint64_t BinaryAnnotator::BuildHeader(const uint64_t header_offset) {
  160|  3.84k|  uint64_t offset = header_offset;
  161|  3.84k|  std::vector<BinaryRegion> regions;
  162|       |
  163|       |  // If this binary is a size prefixed one, attempt to parse the size.
  164|  3.84k|  if (is_size_prefixed_) {
  ------------------
  |  Branch (164:7): [True: 0, False: 3.84k]
  ------------------
  165|      0|    BinaryRegionComment prefix_length_comment;
  166|      0|    prefix_length_comment.type = BinaryRegionCommentType::SizePrefix;
  167|       |
  168|      0|    bool has_prefix_value = false;
  169|      0|    const auto prefix_length = ReadScalar<uoffset64_t>(offset);
  170|      0|    if (*prefix_length <= binary_length_) {
  ------------------
  |  Branch (170:9): [True: 0, False: 0]
  ------------------
  171|      0|      regions.push_back(MakeBinaryRegion(offset, sizeof(uoffset64_t),
  172|      0|                                         BinaryRegionType::Uint64, 0, 0,
  173|      0|                                         prefix_length_comment));
  174|      0|      offset += sizeof(uoffset64_t);
  175|      0|      has_prefix_value = true;
  176|      0|    }
  177|       |
  178|      0|    if (!has_prefix_value) {
  ------------------
  |  Branch (178:9): [True: 0, False: 0]
  ------------------
  179|      0|      const auto prefix_length = ReadScalar<uoffset_t>(offset);
  180|      0|      if (*prefix_length <= binary_length_) {
  ------------------
  |  Branch (180:11): [True: 0, False: 0]
  ------------------
  181|      0|        regions.push_back(MakeBinaryRegion(offset, sizeof(uoffset_t),
  182|      0|                                           BinaryRegionType::Uint32, 0, 0,
  183|      0|                                           prefix_length_comment));
  184|      0|        offset += sizeof(uoffset_t);
  185|      0|        has_prefix_value = true;
  186|      0|      }
  187|      0|    }
  188|       |
  189|      0|    if (!has_prefix_value) {
  ------------------
  |  Branch (189:9): [True: 0, False: 0]
  ------------------
  190|      0|      SetError(prefix_length_comment, BinaryRegionStatus::ERROR);
  191|      0|    }
  192|      0|  }
  193|       |
  194|  3.84k|  const auto root_table_offset = ReadScalar<uint32_t>(offset);
  195|       |
  196|  3.84k|  if (!root_table_offset.has_value()) {
  ------------------
  |  Branch (196:7): [True: 0, False: 3.84k]
  ------------------
  197|       |    // This shouldn't occur, since we validate the min size of the buffer
  198|       |    // before. But for completion sake, we shouldn't read passed the binary end.
  199|      0|    return std::numeric_limits<uint64_t>::max();
  200|      0|  }
  201|       |
  202|  3.84k|  const auto root_table_loc = offset + *root_table_offset;
  203|       |
  204|  3.84k|  BinaryRegionComment root_offset_comment;
  205|  3.84k|  root_offset_comment.type = BinaryRegionCommentType::RootTableOffset;
  206|  3.84k|  root_offset_comment.name = schema_->root_table()->name()->str();
  207|       |
  208|  3.84k|  if (!IsValidOffset(root_table_loc)) {
  ------------------
  |  Branch (208:7): [True: 97, False: 3.75k]
  ------------------
  209|     97|    SetError(root_offset_comment,
  210|     97|             BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
  211|     97|  }
  212|       |
  213|  3.84k|  regions.push_back(MakeBinaryRegion(offset, sizeof(uint32_t),
  214|  3.84k|                                     BinaryRegionType::UOffset, 0,
  215|  3.84k|                                     root_table_loc, root_offset_comment));
  216|  3.84k|  offset += sizeof(uint32_t);
  217|       |
  218|  3.84k|  if (IsValidRead(offset, flatbuffers::kFileIdentifierLength) &&
  ------------------
  |  Branch (218:7): [True: 3.84k, False: 0]
  ------------------
  219|  3.84k|      IsPrintableRegion(offset, flatbuffers::kFileIdentifierLength, binary_)) {
  ------------------
  |  Branch (219:7): [True: 31, False: 3.81k]
  ------------------
  220|     31|    BinaryRegionComment comment;
  221|     31|    comment.type = BinaryRegionCommentType::FileIdentifier;
  222|       |    // Check if the file identifier region has non-zero data, and assume its
  223|       |    // the file identifier. Otherwise, it will get filled in with padding
  224|       |    // later.
  225|     31|    regions.push_back(MakeBinaryRegion(
  226|     31|        offset, flatbuffers::kFileIdentifierLength * sizeof(uint8_t),
  227|     31|        BinaryRegionType::Char, flatbuffers::kFileIdentifierLength, 0,
  228|     31|        comment));
  229|     31|  }
  230|       |
  231|  3.84k|  AddSection(header_offset, MakeBinarySection("", BinarySectionType::Header,
  232|  3.84k|                                              std::move(regions)));
  233|       |
  234|  3.84k|  return root_table_loc;
  235|  3.84k|}
_ZN11flatbuffers15BinaryAnnotator16GetOrBuildVTableEmPKN10reflection6ObjectEm:
  239|  1.42M|    const uint64_t offset_of_referring_table) {
  240|       |  // Get a list of vtables (if any) already defined at this offset.
  241|  1.42M|  std::list<VTable> &vtables = vtables_[vtable_offset];
  242|       |
  243|       |  // See if this vtable for the table type has been generated before.
  244|  1.42M|  for (VTable &vtable : vtables) {
  ------------------
  |  Branch (244:23): [True: 6.76k, False: 1.41M]
  ------------------
  245|  6.76k|    if (vtable.referring_table == table) { return &vtable; }
  ------------------
  |  Branch (245:9): [True: 4.40k, False: 2.35k]
  ------------------
  246|  6.76k|  }
  247|       |
  248|       |  // If we are trying to make a new vtable and it is already encompassed by
  249|       |  // another binary section, something is corrupted.
  250|  1.41M|  if (vtables.empty() && ContainsSection(vtable_offset)) { return nullptr; }
  ------------------
  |  Branch (250:7): [True: 1.41M, False: 1.66k]
  |  Branch (250:26): [True: 75.9k, False: 1.33M]
  ------------------
  251|       |
  252|  1.34M|  const std::string referring_table_name = table->name()->str();
  253|       |
  254|  1.34M|  BinaryRegionComment vtable_size_comment;
  255|  1.34M|  vtable_size_comment.type = BinaryRegionCommentType::VTableSize;
  256|       |
  257|  1.34M|  const auto vtable_length = ReadScalar<uint16_t>(vtable_offset);
  258|  1.34M|  if (!vtable_length.has_value()) {
  ------------------
  |  Branch (258:7): [True: 26, False: 1.34M]
  ------------------
  259|     26|    const uint64_t remaining = RemainingBytes(vtable_offset);
  260|       |
  261|     26|    SetError(vtable_size_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  262|     26|             "2");
  263|       |
  264|     26|    AddSection(vtable_offset,
  265|     26|               MakeSingleRegionBinarySection(
  266|     26|                   referring_table_name, BinarySectionType::VTable,
  267|     26|                   MakeBinaryRegion(vtable_offset, remaining,
  268|     26|                                    BinaryRegionType::Unknown, remaining, 0,
  269|     26|                                    vtable_size_comment)));
  270|     26|    return nullptr;
  271|     26|  }
  272|       |
  273|       |  // Vtables start with the size of the vtable
  274|  1.34M|  const uint16_t vtable_size = vtable_length.value();
  275|       |
  276|  1.34M|  if (!IsValidOffset(vtable_offset + vtable_size - 1)) {
  ------------------
  |  Branch (276:7): [True: 12.1k, False: 1.32M]
  ------------------
  277|  12.1k|    SetError(vtable_size_comment, BinaryRegionStatus::ERROR_LENGTH_TOO_LONG);
  278|       |    // The vtable_size points to off the end of the binary.
  279|  12.1k|    AddSection(vtable_offset,
  280|  12.1k|               MakeSingleRegionBinarySection(
  281|  12.1k|                   referring_table_name, BinarySectionType::VTable,
  282|  12.1k|                   MakeBinaryRegion(vtable_offset, sizeof(uint16_t),
  283|  12.1k|                                    BinaryRegionType::Uint16, 0, 0,
  284|  12.1k|                                    vtable_size_comment)));
  285|       |
  286|  12.1k|    return nullptr;
  287|  1.32M|  } else if (vtable_size < 2 * sizeof(uint16_t)) {
  ------------------
  |  Branch (287:14): [True: 1.22M, False: 103k]
  ------------------
  288|  1.22M|    SetError(vtable_size_comment, BinaryRegionStatus::ERROR_LENGTH_TOO_SHORT,
  289|  1.22M|             "4");
  290|       |    // The size includes itself and the table size which are both uint16_t.
  291|  1.22M|    AddSection(vtable_offset,
  292|  1.22M|               MakeSingleRegionBinarySection(
  293|  1.22M|                   referring_table_name, BinarySectionType::VTable,
  294|  1.22M|                   MakeBinaryRegion(vtable_offset, sizeof(uint16_t),
  295|  1.22M|                                    BinaryRegionType::Uint16, 0, 0,
  296|  1.22M|                                    vtable_size_comment)));
  297|  1.22M|    return nullptr;
  298|  1.22M|  }
  299|       |
  300|   103k|  std::vector<BinaryRegion> regions;
  301|       |
  302|   103k|  regions.push_back(MakeBinaryRegion(vtable_offset, sizeof(uint16_t),
  303|   103k|                                     BinaryRegionType::Uint16, 0, 0,
  304|   103k|                                     vtable_size_comment));
  305|   103k|  uint64_t offset = vtable_offset + sizeof(uint16_t);
  306|       |
  307|   103k|  BinaryRegionComment ref_table_len_comment;
  308|   103k|  ref_table_len_comment.type =
  309|   103k|      BinaryRegionCommentType::VTableRefferingTableLength;
  310|       |
  311|       |  // Ensure we can read the next uint16_t field, which is the size of the
  312|       |  // referring table.
  313|   103k|  const auto table_length = ReadScalar<uint16_t>(offset);
  314|       |
  315|   103k|  if (!table_length.has_value()) {
  ------------------
  |  Branch (315:7): [True: 0, False: 103k]
  ------------------
  316|      0|    const uint64_t remaining = RemainingBytes(offset);
  317|      0|    SetError(ref_table_len_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  318|      0|             "2");
  319|       |
  320|      0|    AddSection(offset, MakeSingleRegionBinarySection(
  321|      0|                           referring_table_name, BinarySectionType::VTable,
  322|      0|                           MakeBinaryRegion(
  323|      0|                               offset, remaining, BinaryRegionType::Unknown,
  324|      0|                               remaining, 0, ref_table_len_comment)));
  325|      0|    return nullptr;
  326|      0|  }
  327|       |
  328|       |  // Then they have the size of the table they reference.
  329|   103k|  const uint16_t table_size = table_length.value();
  330|       |
  331|   103k|  if (!IsValidOffset(offset_of_referring_table + table_size - 1)) {
  ------------------
  |  Branch (331:7): [True: 5.97k, False: 97.9k]
  ------------------
  332|  5.97k|    SetError(ref_table_len_comment, BinaryRegionStatus::ERROR_LENGTH_TOO_LONG);
  333|  97.9k|  } else if (table_size < 4) {
  ------------------
  |  Branch (333:14): [True: 65.3k, False: 32.6k]
  ------------------
  334|  65.3k|    SetError(ref_table_len_comment, BinaryRegionStatus::ERROR_LENGTH_TOO_SHORT,
  335|  65.3k|             "4");
  336|  65.3k|  }
  337|       |
  338|   103k|  regions.push_back(MakeBinaryRegion(offset, sizeof(uint16_t),
  339|   103k|                                     BinaryRegionType::Uint16, 0, 0,
  340|   103k|                                     ref_table_len_comment));
  341|   103k|  offset += sizeof(uint16_t);
  342|       |
  343|   103k|  const uint64_t offset_start = offset;
  344|       |
  345|       |  // A mapping between field (and its id) to the relative offset (uin16_t) from
  346|       |  // the start of the table.
  347|   103k|  std::map<uint16_t, VTable::Entry> fields;
  348|       |
  349|       |  // Counter for determining if the binary has more vtable entries than the
  350|       |  // schema provided. This can occur if the binary was created at a newer schema
  351|       |  // version and is being processed with an older one.
  352|   103k|  uint16_t fields_processed = 0;
  353|       |
  354|       |  // Loop over all the fields.
  355|   103k|  ForAllFields(table, /*reverse=*/false, [&](const reflection::Field *field) {
  356|   103k|    const uint64_t field_offset = offset_start + field->id() * sizeof(uint16_t);
  357|       |
  358|   103k|    if (field_offset >= vtable_offset + vtable_size) {
  359|       |      // This field_offset is too large for this vtable, so it must come from a
  360|       |      // newer schema than the binary was create with or the binary writer did
  361|       |      // not write it. For either case, it is safe to ignore.
  362|       |
  363|       |      // TODO(dbaileychess): We could show which fields are not set an their
  364|       |      // default values if we want. We just need a way to make it obvious that
  365|       |      // it isn't part of the buffer.
  366|   103k|      return;
  367|   103k|    }
  368|       |
  369|   103k|    BinaryRegionComment field_comment;
  370|   103k|    field_comment.type = BinaryRegionCommentType::VTableFieldOffset;
  371|   103k|    field_comment.name = std::string(field->name()->c_str()) +
  372|   103k|                         "` (id: " + std::to_string(field->id()) + ")";
  373|       |
  374|   103k|    const auto offset_from_table = ReadScalar<uint16_t>(field_offset);
  375|       |
  376|   103k|    if (!offset_from_table.has_value()) {
  377|   103k|      const uint64_t remaining = RemainingBytes(field_offset);
  378|       |
  379|   103k|      SetError(field_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "2");
  380|   103k|      regions.push_back(MakeBinaryRegion(field_offset, remaining,
  381|   103k|                                         BinaryRegionType::Unknown, remaining,
  382|   103k|                                         0, field_comment));
  383|       |
  384|   103k|      return;
  385|   103k|    }
  386|       |
  387|   103k|    if (!IsValidOffset(offset_of_referring_table + offset_from_table.value() -
  388|   103k|                       1)) {
  389|   103k|      SetError(field_comment, BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
  390|   103k|      regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  391|   103k|                                         BinaryRegionType::VOffset, 0, 0,
  392|   103k|                                         field_comment));
  393|   103k|      return;
  394|   103k|    }
  395|       |
  396|   103k|    VTable::Entry entry;
  397|   103k|    entry.field = field;
  398|   103k|    entry.offset_from_table = offset_from_table.value();
  399|   103k|    fields.insert(std::make_pair(field->id(), entry));
  400|       |
  401|   103k|    std::string default_label;
  402|   103k|    if (offset_from_table.value() == 0) {
  403|       |      // Not present, so could be default or be optional.
  404|   103k|      if (field->required()) {
  405|   103k|        SetError(field_comment,
  406|   103k|                 BinaryRegionStatus::ERROR_REQUIRED_FIELD_NOT_PRESENT);
  407|       |        // If this is a required field, make it known this is an error.
  408|   103k|        regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  409|   103k|                                           BinaryRegionType::VOffset, 0, 0,
  410|   103k|                                           field_comment));
  411|   103k|        return;
  412|   103k|      } else {
  413|       |        // Its an optional field, so get the default value and interpret and
  414|       |        // provided an annotation for it.
  415|   103k|        if (IsScalar(field->type()->base_type())) {
  416|   103k|          default_label += "<defaults to ";
  417|   103k|          default_label += IsFloat(field->type()->base_type())
  418|   103k|                               ? std::to_string(field->default_real())
  419|   103k|                               : std::to_string(field->default_integer());
  420|   103k|          default_label += "> (";
  421|   103k|        } else {
  422|   103k|          default_label += "<null> (";
  423|   103k|        }
  424|   103k|        default_label +=
  425|   103k|            reflection::EnumNameBaseType(field->type()->base_type());
  426|   103k|        default_label += ")";
  427|   103k|      }
  428|   103k|    }
  429|   103k|    field_comment.default_value = default_label;
  430|       |
  431|   103k|    regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  432|   103k|                                       BinaryRegionType::VOffset, 0, 0,
  433|   103k|                                       field_comment));
  434|       |
  435|   103k|    fields_processed++;
  436|   103k|  });
  437|       |
  438|       |  // Check if we covered all the expectant fields. If not, we need to add them
  439|       |  // as unknown fields.
  440|   103k|  uint16_t expectant_vtable_fields =
  441|   103k|      (vtable_size - sizeof(uint16_t) - sizeof(uint16_t)) / sizeof(uint16_t);
  442|       |
  443|       |  // Prevent a bad binary from declaring a really large vtable_size, that we can
  444|       |  // not independently verify.
  445|   103k|  expectant_vtable_fields = std::min(
  446|   103k|      static_cast<uint16_t>(fields_processed * 3), expectant_vtable_fields);
  447|       |
  448|   488k|  for (uint16_t id = fields_processed; id < expectant_vtable_fields; ++id) {
  ------------------
  |  Branch (448:40): [True: 384k, False: 103k]
  ------------------
  449|   384k|    const uint64_t field_offset = offset_start + id * sizeof(uint16_t);
  450|       |
  451|   384k|    const auto offset_from_table = ReadScalar<uint16_t>(field_offset);
  452|       |
  453|   384k|    BinaryRegionComment field_comment;
  454|   384k|    field_comment.type = BinaryRegionCommentType::VTableUnknownFieldOffset;
  455|   384k|    field_comment.index = id;
  456|       |
  457|   384k|    if (!offset_from_table.has_value()) {
  ------------------
  |  Branch (457:9): [True: 0, False: 384k]
  ------------------
  458|      0|      const uint64_t remaining = RemainingBytes(field_offset);
  459|      0|      SetError(field_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "2");
  460|      0|      regions.push_back(MakeBinaryRegion(field_offset, remaining,
  461|      0|                                         BinaryRegionType::Unknown, remaining,
  462|      0|                                         0, field_comment));
  463|      0|      continue;
  464|      0|    }
  465|       |
  466|   384k|    VTable::Entry entry;
  467|   384k|    entry.field = nullptr;  // No field to reference.
  468|   384k|    entry.offset_from_table = offset_from_table.value();
  469|   384k|    fields.insert(std::make_pair(id, entry));
  470|       |
  471|   384k|    regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  472|   384k|                                       BinaryRegionType::VOffset, 0, 0,
  473|   384k|                                       field_comment));
  474|   384k|  }
  475|       |
  476|       |  // If we have never added this vtable before record the Binary section.
  477|   103k|  if (vtables.empty()) {
  ------------------
  |  Branch (477:7): [True: 102k, False: 1.66k]
  ------------------
  478|   102k|    sections_[vtable_offset] = MakeBinarySection(
  479|   102k|        referring_table_name, BinarySectionType::VTable, std::move(regions));
  480|   102k|  } else {
  481|       |    // Add the current table name to the name of the section.
  482|  1.66k|    sections_[vtable_offset].name += ", " + referring_table_name;
  483|  1.66k|  }
  484|       |
  485|   103k|  VTable vtable;
  486|   103k|  vtable.referring_table = table;
  487|   103k|  vtable.fields = std::move(fields);
  488|   103k|  vtable.table_size = table_size;
  489|   103k|  vtable.vtable_size = vtable_size;
  490|       |
  491|       |  // Add this vtable to the collection of vtables at this offset.
  492|   103k|  vtables.push_back(std::move(vtable));
  493|       |
  494|       |  // Return the vtable we just added.
  495|   103k|  return &vtables.back();
  496|   103k|}
_ZN11flatbuffers15BinaryAnnotator10BuildTableEmNS_17BinarySectionTypeEPKN10reflection6ObjectE:
  500|  4.61M|                                 const reflection::Object *const table) {
  501|  4.61M|  if (ContainsSection(table_offset)) { return; }
  ------------------
  |  Branch (501:7): [True: 2.92M, False: 1.68M]
  ------------------
  502|       |
  503|  1.68M|  BinaryRegionComment vtable_offset_comment;
  504|  1.68M|  vtable_offset_comment.type = BinaryRegionCommentType::TableVTableOffset;
  505|       |
  506|  1.68M|  const auto vtable_soffset = ReadScalar<int32_t>(table_offset);
  507|       |
  508|  1.68M|  if (!vtable_soffset.has_value()) {
  ------------------
  |  Branch (508:7): [True: 317, False: 1.68M]
  ------------------
  509|    317|    const uint64_t remaining = RemainingBytes(table_offset);
  510|    317|    SetError(vtable_offset_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  511|    317|             "4");
  512|       |
  513|    317|    AddSection(
  514|    317|        table_offset,
  515|    317|        MakeSingleRegionBinarySection(
  516|    317|            table->name()->str(), type,
  517|    317|            MakeBinaryRegion(table_offset, remaining, BinaryRegionType::Unknown,
  518|    317|                             remaining, 0, vtable_offset_comment)));
  519|       |
  520|       |    // If there aren't enough bytes left to read the vtable offset, there is
  521|       |    // nothing we can do.
  522|    317|    return;
  523|    317|  }
  524|       |
  525|       |  // Tables start with the vtable
  526|  1.68M|  const uint64_t vtable_offset = table_offset - vtable_soffset.value();
  527|       |
  528|  1.68M|  if (!IsValidOffset(vtable_offset)) {
  ------------------
  |  Branch (528:7): [True: 263k, False: 1.42M]
  ------------------
  529|   263k|    SetError(vtable_offset_comment,
  530|   263k|             BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
  531|       |
  532|   263k|    AddSection(table_offset,
  533|   263k|               MakeSingleRegionBinarySection(
  534|   263k|                   table->name()->str(), type,
  535|   263k|                   MakeBinaryRegion(table_offset, sizeof(int32_t),
  536|   263k|                                    BinaryRegionType::SOffset, 0, vtable_offset,
  537|   263k|                                    vtable_offset_comment)));
  538|       |
  539|       |    // There isn't much to do with an invalid vtable offset, as we won't be able
  540|       |    // to intepret the rest of the table fields.
  541|   263k|    return;
  542|   263k|  }
  543|       |
  544|  1.42M|  std::vector<BinaryRegion> regions;
  545|  1.42M|  regions.push_back(MakeBinaryRegion(table_offset, sizeof(int32_t),
  546|  1.42M|                                     BinaryRegionType::SOffset, 0,
  547|  1.42M|                                     vtable_offset, vtable_offset_comment));
  548|       |
  549|       |  // Parse the vtable first so we know what the rest of the fields in the table
  550|       |  // are.
  551|  1.42M|  const VTable *const vtable =
  552|  1.42M|      GetOrBuildVTable(vtable_offset, table, table_offset);
  553|       |
  554|  1.42M|  if (vtable == nullptr) {
  ------------------
  |  Branch (554:7): [True: 1.31M, False: 108k]
  ------------------
  555|       |    // There is no valid vtable for this table, so we cannot process the rest of
  556|       |    // the table entries.
  557|  1.31M|    return;
  558|  1.31M|  }
  559|       |
  560|       |  // This is the size and length of this table.
  561|   108k|  const uint16_t table_size = vtable->table_size;
  562|   108k|  uint64_t table_end_offset = table_offset + table_size;
  563|       |
  564|   108k|  if (!IsValidOffset(table_end_offset - 1)) {
  ------------------
  |  Branch (564:7): [True: 6.55k, False: 101k]
  ------------------
  565|       |    // We already validated the table size in BuildVTable, but we have to make
  566|       |    // sure we don't use a bad value here.
  567|  6.55k|    table_end_offset = binary_length_;
  568|  6.55k|  }
  569|       |
  570|       |  // We need to iterate over the vtable fields by their offset in the binary,
  571|       |  // not by their IDs. So copy them over to another vector that we can sort on
  572|       |  // the offset_from_table property.
  573|   108k|  std::vector<VTable::Entry> fields;
  574|   663k|  for (const auto &vtable_field : vtable->fields) {
  ------------------
  |  Branch (574:33): [True: 663k, False: 108k]
  ------------------
  575|   663k|    fields.push_back(vtable_field.second);
  576|   663k|  }
  577|       |
  578|   108k|  std::stable_sort(fields.begin(), fields.end(),
  579|   108k|                   [](const VTable::Entry &a, const VTable::Entry &b) {
  580|   108k|                     return a.offset_from_table < b.offset_from_table;
  581|   108k|                   });
  582|       |
  583|       |  // Iterate over all the fields by order of their offset.
  584|   771k|  for (size_t i = 0; i < fields.size(); ++i) {
  ------------------
  |  Branch (584:22): [True: 663k, False: 108k]
  ------------------
  585|   663k|    const reflection::Field *field = fields[i].field;
  586|   663k|    const uint16_t offset_from_table = fields[i].offset_from_table;
  587|       |
  588|   663k|    if (offset_from_table == 0) {
  ------------------
  |  Branch (588:9): [True: 220k, False: 442k]
  ------------------
  589|       |      // Skip non-present fields.
  590|   220k|      continue;
  591|   220k|    }
  592|       |
  593|       |    // The field offsets are relative to the start of the table.
  594|   442k|    const uint64_t field_offset = table_offset + offset_from_table;
  595|       |
  596|   442k|    if (!IsValidOffset(field_offset)) {
  ------------------
  |  Branch (596:9): [True: 33.1k, False: 409k]
  ------------------
  597|       |      // The field offset is larger than the binary, nothing we can do.
  598|  33.1k|      continue;
  599|  33.1k|    }
  600|       |
  601|       |    // We have a vtable entry for a non-existant field, that means its a binary
  602|       |    // generated by a newer schema than we are currently processing.
  603|   409k|    if (field == nullptr) {
  ------------------
  |  Branch (603:9): [True: 228k, False: 181k]
  ------------------
  604|       |      // Calculate the length of this unknown field.
  605|   228k|      const uint64_t unknown_field_length =
  606|       |          // Check if there is another unknown field after this one.
  607|   228k|          ((i + 1 < fields.size())
  ------------------
  |  Branch (607:12): [True: 191k, False: 37.4k]
  ------------------
  608|   228k|               ? table_offset + fields[i + 1].offset_from_table
  609|       |               // Otherwise use the known end of the table.
  610|   228k|               : table_end_offset) -
  611|   228k|          field_offset;
  612|       |
  613|   228k|      if (unknown_field_length == 0) { continue; }
  ------------------
  |  Branch (613:11): [True: 65.4k, False: 163k]
  ------------------
  614|       |
  615|   163k|      std::string hint;
  616|       |
  617|   163k|      if (unknown_field_length == 4) {
  ------------------
  |  Branch (617:11): [True: 9.06k, False: 154k]
  ------------------
  618|  9.06k|        const auto relative_offset = ReadScalar<uint32_t>(field_offset);
  619|  9.06k|        if (relative_offset.has_value()) {
  ------------------
  |  Branch (619:13): [True: 9.05k, False: 14]
  ------------------
  620|       |          // The field is 4 in length, so it could be an offset? Provide a hint.
  621|  9.05k|          hint += "<possibly an offset? Check Loc: +0x";
  622|  9.05k|          hint += ToHex(field_offset + relative_offset.value());
  623|  9.05k|          hint += ">";
  624|  9.05k|        }
  625|  9.06k|      }
  626|       |
  627|   163k|      BinaryRegionComment unknown_field_comment;
  628|   163k|      unknown_field_comment.type = BinaryRegionCommentType::TableUnknownField;
  629|       |
  630|   163k|      if (!IsValidRead(field_offset, unknown_field_length)) {
  ------------------
  |  Branch (630:11): [True: 29.9k, False: 133k]
  ------------------
  631|  29.9k|        const uint64_t remaining = RemainingBytes(field_offset);
  632|       |
  633|  29.9k|        SetError(unknown_field_comment,
  634|  29.9k|                 BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  635|  29.9k|                 std::to_string(unknown_field_length));
  636|       |
  637|  29.9k|        regions.push_back(MakeBinaryRegion(field_offset, remaining,
  638|  29.9k|                                           BinaryRegionType::Unknown, remaining,
  639|  29.9k|                                           0, unknown_field_comment));
  640|  29.9k|        continue;
  641|  29.9k|      }
  642|       |
  643|   133k|      unknown_field_comment.default_value = hint;
  644|       |
  645|   133k|      regions.push_back(MakeBinaryRegion(
  646|   133k|          field_offset, unknown_field_length, BinaryRegionType::Unknown,
  647|   133k|          unknown_field_length, 0, unknown_field_comment));
  648|   133k|      continue;
  649|   163k|    }
  650|       |
  651|   181k|    if (IsScalar(field->type()->base_type())) {
  ------------------
  |  Branch (651:9): [True: 107k, False: 73.9k]
  ------------------
  652|       |      // These are the raw values store in the table.
  653|   107k|      const uint64_t type_size = GetTypeSize(field->type()->base_type());
  654|   107k|      const BinaryRegionType region_type =
  655|   107k|          GetRegionType(field->type()->base_type());
  656|       |
  657|   107k|      BinaryRegionComment scalar_field_comment;
  658|   107k|      scalar_field_comment.type = BinaryRegionCommentType::TableField;
  659|   107k|      scalar_field_comment.name =
  660|   107k|          std::string(field->name()->c_str()) + "` (" +
  661|   107k|          reflection::EnumNameBaseType(field->type()->base_type()) + ")";
  662|       |
  663|   107k|      if (!IsValidRead(field_offset, type_size)) {
  ------------------
  |  Branch (663:11): [True: 360, False: 106k]
  ------------------
  664|    360|        const uint64_t remaining = RemainingBytes(field_offset);
  665|    360|        SetError(scalar_field_comment,
  666|    360|                 BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  667|    360|                 std::to_string(type_size));
  668|       |
  669|    360|        regions.push_back(MakeBinaryRegion(field_offset, remaining,
  670|    360|                                           BinaryRegionType::Unknown, remaining,
  671|    360|                                           0, scalar_field_comment));
  672|    360|        continue;
  673|    360|      }
  674|       |
  675|   106k|      if (IsUnionType(field)) {
  ------------------
  |  Branch (675:11): [True: 2.44k, False: 104k]
  ------------------
  676|       |        // This is a type for a union. Validate the value
  677|  2.44k|        const auto enum_value = ReadScalar<uint8_t>(field_offset);
  678|       |
  679|       |        // This should always have a value, due to the IsValidRead check above.
  680|  2.44k|        if (!IsValidUnionValue(field, enum_value.value())) {
  ------------------
  |  Branch (680:13): [True: 1.14k, False: 1.30k]
  ------------------
  681|  1.14k|          SetError(scalar_field_comment,
  682|  1.14k|                   BinaryRegionStatus::ERROR_INVALID_UNION_TYPE);
  683|       |
  684|  1.14k|          regions.push_back(MakeBinaryRegion(field_offset, type_size,
  685|  1.14k|                                             region_type, 0, 0,
  686|  1.14k|                                             scalar_field_comment));
  687|  1.14k|          continue;
  688|  1.14k|        }
  689|  2.44k|      }
  690|       |
  691|   105k|      regions.push_back(MakeBinaryRegion(field_offset, type_size, region_type,
  692|   105k|                                         0, 0, scalar_field_comment));
  693|   105k|      continue;
  694|   106k|    }
  695|       |
  696|       |    // Read the offset
  697|  73.9k|    uint64_t offset = 0;
  698|  73.9k|    uint64_t length = sizeof(uint32_t);
  699|  73.9k|    BinaryRegionType region_type = BinaryRegionType::UOffset;
  700|       |
  701|  73.9k|    if (field->offset64()) {
  ------------------
  |  Branch (701:9): [True: 0, False: 73.9k]
  ------------------
  702|      0|      length = sizeof(uint64_t);
  703|      0|      region_type = BinaryRegionType::UOffset64;
  704|      0|      offset = ReadScalar<uint64_t>(field_offset).value_or(0);
  705|  73.9k|    } else {
  706|  73.9k|      offset = ReadScalar<uint32_t>(field_offset).value_or(0);
  707|  73.9k|    }
  708|       |    // const auto offset_from_field = ReadScalar<uint32_t>(field_offset);
  709|  73.9k|    uint64_t offset_of_next_item = 0;
  710|  73.9k|    BinaryRegionComment offset_field_comment;
  711|  73.9k|    offset_field_comment.type = BinaryRegionCommentType::TableOffsetField;
  712|  73.9k|    offset_field_comment.name = field->name()->c_str();
  713|  73.9k|    const std::string offset_prefix =
  714|  73.9k|        "offset to field `" + std::string(field->name()->c_str()) + "`";
  715|       |
  716|       |    // Validate any field that isn't inline (i.e., non-structs).
  717|  73.9k|    if (!IsInlineField(field)) {
  ------------------
  |  Branch (717:9): [True: 72.4k, False: 1.48k]
  ------------------
  718|  72.4k|      if (offset == 0) {
  ------------------
  |  Branch (718:11): [True: 11.3k, False: 61.1k]
  ------------------
  719|  11.3k|        const uint64_t remaining = RemainingBytes(field_offset);
  720|       |
  721|  11.3k|        SetError(offset_field_comment,
  722|  11.3k|                 BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "4");
  723|       |
  724|  11.3k|        regions.push_back(MakeBinaryRegion(field_offset, remaining,
  725|  11.3k|                                           BinaryRegionType::Unknown, remaining,
  726|  11.3k|                                           0, offset_field_comment));
  727|  11.3k|        continue;
  728|  11.3k|      }
  729|       |
  730|  61.1k|      offset_of_next_item = field_offset + offset;
  731|       |
  732|  61.1k|      if (!IsValidOffset(offset_of_next_item)) {
  ------------------
  |  Branch (732:11): [True: 37.3k, False: 23.7k]
  ------------------
  733|  37.3k|        SetError(offset_field_comment,
  734|  37.3k|                 BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
  735|  37.3k|        regions.push_back(MakeBinaryRegion(field_offset, length, region_type, 0,
  736|  37.3k|                                           offset_of_next_item,
  737|  37.3k|                                           offset_field_comment));
  738|  37.3k|        continue;
  739|  37.3k|      }
  740|  61.1k|    }
  741|       |
  742|  25.2k|    switch (field->type()->base_type()) {
  743|  18.5k|      case reflection::BaseType::Obj: {
  ------------------
  |  Branch (743:7): [True: 18.5k, False: 6.69k]
  ------------------
  744|  18.5k|        const reflection::Object *next_object =
  745|  18.5k|            schema_->objects()->Get(field->type()->index());
  746|       |
  747|  18.5k|        if (next_object->is_struct()) {
  ------------------
  |  Branch (747:13): [True: 1.48k, False: 17.1k]
  ------------------
  748|       |          // Structs are stored inline.
  749|  1.48k|          BuildStruct(field_offset, regions, field->name()->c_str(),
  750|  1.48k|                      next_object);
  751|  17.1k|        } else {
  752|  17.1k|          offset_field_comment.default_value = "(table)";
  753|       |
  754|  17.1k|          regions.push_back(MakeBinaryRegion(field_offset, length, region_type,
  755|  17.1k|                                             0, offset_of_next_item,
  756|  17.1k|                                             offset_field_comment));
  757|       |
  758|  17.1k|          BuildTable(offset_of_next_item, BinarySectionType::Table,
  759|  17.1k|                     next_object);
  760|  17.1k|        }
  761|  18.5k|      } break;
  762|       |
  763|  1.09k|      case reflection::BaseType::String: {
  ------------------
  |  Branch (763:7): [True: 1.09k, False: 24.1k]
  ------------------
  764|  1.09k|        offset_field_comment.default_value = "(string)";
  765|  1.09k|        regions.push_back(MakeBinaryRegion(field_offset, length, region_type, 0,
  766|  1.09k|                                           offset_of_next_item,
  767|  1.09k|                                           offset_field_comment));
  768|  1.09k|        BuildString(offset_of_next_item, table, field);
  769|  1.09k|      } break;
  770|       |
  771|  4.51k|      case reflection::BaseType::Vector: {
  ------------------
  |  Branch (771:7): [True: 4.51k, False: 20.7k]
  ------------------
  772|  4.51k|        offset_field_comment.default_value = "(vector)";
  773|  4.51k|        regions.push_back(MakeBinaryRegion(field_offset, length, region_type, 0,
  774|  4.51k|                                           offset_of_next_item,
  775|  4.51k|                                           offset_field_comment));
  776|  4.51k|        BuildVector(offset_of_next_item, table, field, table_offset,
  777|  4.51k|                    vtable->fields);
  778|  4.51k|      } break;
  779|      0|      case reflection::BaseType::Vector64: {
  ------------------
  |  Branch (779:7): [True: 0, False: 25.2k]
  ------------------
  780|      0|        offset_field_comment.default_value = "(vector64)";
  781|      0|        regions.push_back(MakeBinaryRegion(field_offset, length, region_type, 0,
  782|      0|                                           offset_of_next_item,
  783|      0|                                           offset_field_comment));
  784|      0|        BuildVector(offset_of_next_item, table, field, table_offset,
  785|      0|                    vtable->fields);
  786|      0|      } break;
  787|       |
  788|  1.08k|      case reflection::BaseType::Union: {
  ------------------
  |  Branch (788:7): [True: 1.08k, False: 24.1k]
  ------------------
  789|  1.08k|        const uint64_t union_offset = offset_of_next_item;
  790|       |
  791|       |        // The union type field is always one less than the union itself.
  792|  1.08k|        const uint16_t union_type_id = field->id() - 1;
  793|       |
  794|  1.08k|        auto vtable_field = vtable->fields.find(union_type_id);
  795|  1.08k|        if (vtable_field == vtable->fields.end()) {
  ------------------
  |  Branch (795:13): [True: 61, False: 1.02k]
  ------------------
  796|       |          // TODO(dbaileychess): need to capture this error condition.
  797|     61|          break;
  798|     61|        }
  799|  1.02k|        offset_field_comment.default_value = "(union)";
  800|       |
  801|  1.02k|        const uint64_t type_offset =
  802|  1.02k|            table_offset + vtable_field->second.offset_from_table;
  803|       |
  804|  1.02k|        const auto realized_type = ReadScalar<uint8_t>(type_offset);
  805|  1.02k|        if (!realized_type.has_value()) {
  ------------------
  |  Branch (805:13): [True: 191, False: 835]
  ------------------
  806|    191|          const uint64_t remaining = RemainingBytes(type_offset);
  807|    191|          SetError(offset_field_comment,
  808|    191|                   BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "1");
  809|    191|          regions.push_back(MakeBinaryRegion(
  810|    191|              type_offset, remaining, BinaryRegionType::Unknown, remaining, 0,
  811|    191|              offset_field_comment));
  812|    191|          continue;
  813|    191|        }
  814|       |
  815|    835|        if (!IsValidUnionValue(field, realized_type.value())) {
  ------------------
  |  Branch (815:13): [True: 489, False: 346]
  ------------------
  816|       |          // We already export an error in the union type field, so just skip
  817|       |          // building the union itself and it will default to an unreference
  818|       |          // Binary section.
  819|    489|          continue;
  820|    489|        }
  821|       |
  822|    346|        const std::string enum_type =
  823|    346|            BuildUnion(union_offset, realized_type.value(), field);
  824|       |
  825|    346|        offset_field_comment.default_value =
  826|    346|            "(union of type `" + enum_type + "`)";
  827|       |
  828|    346|        regions.push_back(MakeBinaryRegion(field_offset, length, region_type, 0,
  829|    346|                                           union_offset, offset_field_comment));
  830|       |
  831|    346|      } break;
  832|       |
  833|      0|      default: break;
  ------------------
  |  Branch (833:7): [True: 0, False: 25.2k]
  ------------------
  834|  25.2k|    }
  835|  25.2k|  }
  836|       |
  837|       |  // Handle the case where there is padding after the last known binary
  838|       |  // region. Calculate where we left off towards the expected end of the
  839|       |  // table.
  840|   108k|  const uint64_t i = regions.back().offset + regions.back().length + 1;
  841|       |
  842|   108k|  if (i < table_end_offset) {
  ------------------
  |  Branch (842:7): [True: 11.0k, False: 97.3k]
  ------------------
  843|  11.0k|    const uint64_t pad_bytes = table_end_offset - i + 1;
  844|       |
  845|  11.0k|    BinaryRegionComment padding_comment;
  846|  11.0k|    padding_comment.type = BinaryRegionCommentType::Padding;
  847|       |
  848|  11.0k|    regions.push_back(MakeBinaryRegion(i - 1, pad_bytes * sizeof(uint8_t),
  849|  11.0k|                                       BinaryRegionType::Uint8, pad_bytes, 0,
  850|  11.0k|                                       padding_comment));
  851|  11.0k|  }
  852|       |
  853|   108k|  AddSection(table_offset,
  854|   108k|             MakeBinarySection(table->name()->str(), type, std::move(regions)));
  855|   108k|}
_ZN11flatbuffers15BinaryAnnotator11BuildStructEmRNSt3__16vectorINS_12BinaryRegionENS1_9allocatorIS3_EEEENS1_12basic_stringIcNS1_11char_traitsIcEENS4_IcEEEEPKN10reflection6ObjectE:
  860|   152k|                                      const reflection::Object *const object) {
  861|   152k|  if (!object->is_struct()) { return struct_offset; }
  ------------------
  |  Branch (861:7): [True: 0, False: 152k]
  ------------------
  862|   152k|  uint64_t offset = struct_offset;
  863|       |
  864|       |  // Loop over all the fields in increasing order
  865|   152k|  ForAllFields(object, /*reverse=*/false, [&](const reflection::Field *field) {
  866|   152k|    if (IsScalar(field->type()->base_type())) {
  867|       |      // Structure Field value
  868|   152k|      const uint64_t type_size = GetTypeSize(field->type()->base_type());
  869|   152k|      const BinaryRegionType region_type =
  870|   152k|          GetRegionType(field->type()->base_type());
  871|       |
  872|   152k|      BinaryRegionComment comment;
  873|   152k|      comment.type = BinaryRegionCommentType::StructField;
  874|   152k|      comment.name = referring_field_name + "." + field->name()->str();
  875|   152k|      comment.default_value = "of '" + object->name()->str() + "' (" +
  876|   152k|                              std::string(reflection::EnumNameBaseType(
  877|   152k|                                  field->type()->base_type())) +
  878|   152k|                              ")";
  879|       |
  880|   152k|      if (!IsValidRead(offset, type_size)) {
  881|   152k|        const uint64_t remaining = RemainingBytes(offset);
  882|   152k|        SetError(comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  883|   152k|                 std::to_string(type_size));
  884|   152k|        regions.push_back(MakeBinaryRegion(offset, remaining,
  885|   152k|                                           BinaryRegionType::Unknown, remaining,
  886|   152k|                                           0, comment));
  887|       |
  888|       |        // TODO(dbaileychess): Should I bail out here? This sets offset to the
  889|       |        // end of the binary. So all other reads in the loop should fail.
  890|   152k|        offset += remaining;
  891|   152k|        return;
  892|   152k|      }
  893|       |
  894|   152k|      regions.push_back(
  895|   152k|          MakeBinaryRegion(offset, type_size, region_type, 0, 0, comment));
  896|   152k|      offset += type_size;
  897|   152k|    } else if (field->type()->base_type() == reflection::BaseType::Obj) {
  898|       |      // Structs are stored inline, even when nested.
  899|   152k|      offset = BuildStruct(offset, regions,
  900|   152k|                           referring_field_name + "." + field->name()->str(),
  901|   152k|                           schema_->objects()->Get(field->type()->index()));
  902|   152k|    } else if (field->type()->base_type() == reflection::BaseType::Array) {
  903|   152k|      const bool is_scalar = IsScalar(field->type()->element());
  904|   152k|      const uint64_t type_size = GetTypeSize(field->type()->element());
  905|   152k|      const BinaryRegionType region_type =
  906|   152k|          GetRegionType(field->type()->element());
  907|       |
  908|       |      // Arrays are just repeated structures.
  909|   152k|      for (uint16_t i = 0; i < field->type()->fixed_length(); ++i) {
  910|   152k|        if (is_scalar) {
  911|   152k|          BinaryRegionComment array_comment;
  912|   152k|          array_comment.type = BinaryRegionCommentType::ArrayField;
  913|   152k|          array_comment.name =
  914|   152k|              referring_field_name + "." + field->name()->str();
  915|   152k|          array_comment.index = i;
  916|   152k|          array_comment.default_value =
  917|   152k|              "of '" + object->name()->str() + "' (" +
  918|   152k|              std::string(
  919|   152k|                  reflection::EnumNameBaseType(field->type()->element())) +
  920|   152k|              ")";
  921|       |
  922|   152k|          if (!IsValidRead(offset, type_size)) {
  923|   152k|            const uint64_t remaining = RemainingBytes(offset);
  924|       |
  925|   152k|            SetError(array_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  926|   152k|                     std::to_string(type_size));
  927|       |
  928|   152k|            regions.push_back(MakeBinaryRegion(offset, remaining,
  929|   152k|                                               BinaryRegionType::Unknown,
  930|   152k|                                               remaining, 0, array_comment));
  931|       |
  932|       |            // TODO(dbaileychess): Should I bail out here? This sets offset to
  933|       |            // the end of the binary. So all other reads in the loop should
  934|       |            // fail.
  935|   152k|            offset += remaining;
  936|   152k|            break;
  937|   152k|          }
  938|       |
  939|   152k|          regions.push_back(MakeBinaryRegion(offset, type_size, region_type, 0,
  940|   152k|                                             0, array_comment));
  941|       |
  942|   152k|          offset += type_size;
  943|   152k|        } else {
  944|       |          // Array of Structs.
  945|       |          //
  946|       |          // TODO(dbaileychess): This works, but the comments on the fields lose
  947|       |          // some context. Need to figure a way how to plumb the nested arrays
  948|       |          // comments together that isn't too confusing.
  949|   152k|          offset =
  950|   152k|              BuildStruct(offset, regions,
  951|   152k|                          referring_field_name + "." + field->name()->str(),
  952|   152k|                          schema_->objects()->Get(field->type()->index()));
  953|   152k|        }
  954|   152k|      }
  955|   152k|    }
  956|       |
  957|       |    // Insert any padding after this field.
  958|   152k|    const uint16_t padding = field->padding();
  959|   152k|    if (padding > 0 && IsValidOffset(offset + padding)) {
  960|   152k|      BinaryRegionComment padding_comment;
  961|   152k|      padding_comment.type = BinaryRegionCommentType::Padding;
  962|       |
  963|   152k|      regions.push_back(MakeBinaryRegion(offset, padding,
  964|   152k|                                         BinaryRegionType::Uint8, padding, 0,
  965|   152k|                                         padding_comment));
  966|   152k|      offset += padding;
  967|   152k|    }
  968|   152k|  });
  969|       |
  970|   152k|  return offset;
  971|   152k|}
_ZN11flatbuffers15BinaryAnnotator11BuildStringEmPKN10reflection6ObjectEPKNS1_5FieldE:
  975|  1.01M|                                  const reflection::Field *const field) {
  976|       |  // Check if we have already generated this string section, and this is a
  977|       |  // shared string instance.
  978|  1.01M|  if (ContainsSection(string_offset)) { return; }
  ------------------
  |  Branch (978:7): [True: 811k, False: 203k]
  ------------------
  979|       |
  980|   203k|  std::vector<BinaryRegion> regions;
  981|   203k|  const auto string_length = ReadScalar<uint32_t>(string_offset);
  982|       |
  983|   203k|  BinaryRegionComment string_length_comment;
  984|   203k|  string_length_comment.type = BinaryRegionCommentType::StringLength;
  985|       |
  986|   203k|  if (!string_length.has_value()) {
  ------------------
  |  Branch (986:7): [True: 155, False: 203k]
  ------------------
  987|    155|    const uint64_t remaining = RemainingBytes(string_offset);
  988|       |
  989|    155|    SetError(string_length_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  990|    155|             "4");
  991|       |
  992|    155|    regions.push_back(MakeBinaryRegion(string_offset, remaining,
  993|    155|                                       BinaryRegionType::Unknown, remaining, 0,
  994|    155|                                       string_length_comment));
  995|       |
  996|   203k|  } else {
  997|   203k|    const uint32_t string_size = string_length.value();
  998|   203k|    const uint64_t string_end =
  999|   203k|        string_offset + sizeof(uint32_t) + string_size + sizeof(char);
 1000|       |
 1001|   203k|    if (!IsValidOffset(string_end - 1)) {
  ------------------
  |  Branch (1001:9): [True: 59.7k, False: 143k]
  ------------------
 1002|  59.7k|      SetError(string_length_comment,
 1003|  59.7k|               BinaryRegionStatus::ERROR_LENGTH_TOO_LONG);
 1004|       |
 1005|  59.7k|      regions.push_back(MakeBinaryRegion(string_offset, sizeof(uint32_t),
 1006|  59.7k|                                         BinaryRegionType::Uint32, 0, 0,
 1007|  59.7k|                                         string_length_comment));
 1008|   143k|    } else {
 1009|   143k|      regions.push_back(MakeBinaryRegion(string_offset, sizeof(uint32_t),
 1010|   143k|                                         BinaryRegionType::Uint32, 0, 0,
 1011|   143k|                                         string_length_comment));
 1012|       |
 1013|   143k|      BinaryRegionComment string_comment;
 1014|   143k|      string_comment.type = BinaryRegionCommentType::StringValue;
 1015|       |
 1016|   143k|      regions.push_back(MakeBinaryRegion(string_offset + sizeof(uint32_t),
 1017|   143k|                                         string_size, BinaryRegionType::Char,
 1018|   143k|                                         string_size, 0, string_comment));
 1019|       |
 1020|   143k|      BinaryRegionComment string_terminator_comment;
 1021|   143k|      string_terminator_comment.type =
 1022|   143k|          BinaryRegionCommentType::StringTerminator;
 1023|       |
 1024|   143k|      regions.push_back(MakeBinaryRegion(
 1025|   143k|          string_offset + sizeof(uint32_t) + string_size, sizeof(char),
 1026|   143k|          BinaryRegionType::Char, 0, 0, string_terminator_comment));
 1027|   143k|    }
 1028|   203k|  }
 1029|       |
 1030|   203k|  AddSection(string_offset,
 1031|   203k|             MakeBinarySection(std::string(table->name()->c_str()) + "." +
 1032|   203k|                                   field->name()->c_str(),
 1033|   203k|                               BinarySectionType::String, std::move(regions)));
 1034|   203k|}
_ZN11flatbuffers15BinaryAnnotator11BuildVectorEmPKN10reflection6ObjectEPKNS1_5FieldEmNSt3__13mapItNS0_6VTable5EntryENS8_4lessItEENS8_9allocatorINS8_4pairIKtSB_EEEEEE:
 1039|  4.51k|    const std::map<uint16_t, VTable::Entry> vtable_fields) {
 1040|  4.51k|  if (ContainsSection(vector_offset)) { return; }
  ------------------
  |  Branch (1040:7): [True: 952, False: 3.56k]
  ------------------
 1041|       |
 1042|  3.56k|  BinaryRegionComment vector_length_comment;
 1043|  3.56k|  vector_length_comment.type = BinaryRegionCommentType::VectorLength;
 1044|       |
 1045|  3.56k|  const bool is_64_bit_vector =
 1046|  3.56k|      field->type()->base_type() == reflection::BaseType::Vector64;
 1047|       |
 1048|  3.56k|  flatbuffers::Optional<uint64_t> vector_length;
 1049|  3.56k|  uint32_t vector_length_size_type = 0;
 1050|  3.56k|  BinaryRegionType region_type = BinaryRegionType::Uint32;
 1051|  3.56k|  BinarySectionType section_type = BinarySectionType::Vector;
 1052|       |
 1053|  3.56k|  if (is_64_bit_vector) {
  ------------------
  |  Branch (1053:7): [True: 0, False: 3.56k]
  ------------------
 1054|      0|    auto v = ReadScalar<uint64_t>(vector_offset);
 1055|      0|    if (v.has_value()) { vector_length = v.value(); }
  ------------------
  |  Branch (1055:9): [True: 0, False: 0]
  ------------------
 1056|      0|    vector_length_size_type = sizeof(uint64_t);
 1057|      0|    region_type = BinaryRegionType::Uint64;
 1058|      0|    section_type = BinarySectionType::Vector64;
 1059|  3.56k|  } else {
 1060|  3.56k|    auto v = ReadScalar<uint32_t>(vector_offset);
 1061|  3.56k|    if (v.has_value()) { vector_length = v.value(); }
  ------------------
  |  Branch (1061:9): [True: 3.45k, False: 115]
  ------------------
 1062|  3.56k|    vector_length_size_type = sizeof(uint32_t);
 1063|  3.56k|    region_type = BinaryRegionType::Uint32;
 1064|  3.56k|    section_type = BinarySectionType::Vector;
 1065|  3.56k|  }
 1066|       |
 1067|  3.56k|  if (!vector_length.has_value()) {
  ------------------
  |  Branch (1067:7): [True: 115, False: 3.45k]
  ------------------
 1068|    115|    const uint64_t remaining = RemainingBytes(vector_offset);
 1069|    115|    SetError(vector_length_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
 1070|    115|             "4");
 1071|       |
 1072|    115|    AddSection(
 1073|    115|        vector_offset,
 1074|    115|        MakeSingleRegionBinarySection(
 1075|    115|            std::string(table->name()->c_str()) + "." + field->name()->c_str(),
 1076|    115|            BinarySectionType::Vector,
 1077|    115|            MakeBinaryRegion(vector_offset, remaining,
 1078|    115|                             BinaryRegionType::Unknown, remaining, 0,
 1079|    115|                             vector_length_comment)));
 1080|    115|    return;
 1081|    115|  }
 1082|       |
 1083|       |  // Validate there are enough bytes left in the binary to process all the
 1084|       |  // items.
 1085|  3.45k|  const uint64_t last_item_offset =
 1086|  3.45k|      vector_offset + vector_length_size_type +
 1087|  3.45k|      vector_length.value() * GetElementSize(field);
 1088|       |
 1089|  3.45k|  if (!IsValidOffset(last_item_offset - 1)) {
  ------------------
  |  Branch (1089:7): [True: 464, False: 2.98k]
  ------------------
 1090|    464|    SetError(vector_length_comment, BinaryRegionStatus::ERROR_LENGTH_TOO_LONG);
 1091|    464|    AddSection(
 1092|    464|        vector_offset,
 1093|    464|        MakeSingleRegionBinarySection(
 1094|    464|            std::string(table->name()->c_str()) + "." + field->name()->c_str(),
 1095|    464|            BinarySectionType::Vector,
 1096|    464|            MakeBinaryRegion(vector_offset, vector_length_size_type,
 1097|    464|                             region_type, 0, 0, vector_length_comment)));
 1098|       |
 1099|    464|    return;
 1100|    464|  }
 1101|       |
 1102|  2.98k|  std::vector<BinaryRegion> regions;
 1103|       |
 1104|  2.98k|  regions.push_back(MakeBinaryRegion(vector_offset, vector_length_size_type,
 1105|  2.98k|                                     region_type, 0, 0, vector_length_comment));
 1106|       |  // Consume the vector length offset.
 1107|  2.98k|  uint64_t offset = vector_offset + vector_length_size_type;
 1108|       |
 1109|  2.98k|  switch (field->type()->element()) {
 1110|  1.52k|    case reflection::BaseType::Obj: {
  ------------------
  |  Branch (1110:5): [True: 1.52k, False: 1.46k]
  ------------------
 1111|  1.52k|      const reflection::Object *object =
 1112|  1.52k|          schema_->objects()->Get(field->type()->index());
 1113|       |
 1114|  1.52k|      if (object->is_struct()) {
  ------------------
  |  Branch (1114:11): [True: 152, False: 1.37k]
  ------------------
 1115|       |        // Vector of structs
 1116|   144k|        for (size_t i = 0; i < vector_length.value(); ++i) {
  ------------------
  |  Branch (1116:28): [True: 144k, False: 152]
  ------------------
 1117|       |          // Structs are inline to the vector.
 1118|   144k|          const uint64_t next_offset =
 1119|   144k|              BuildStruct(offset, regions, "[" + NumToString(i) + "]", object);
 1120|   144k|          if (next_offset == offset) { break; }
  ------------------
  |  Branch (1120:15): [True: 0, False: 144k]
  ------------------
 1121|   144k|          offset = next_offset;
 1122|   144k|        }
 1123|  1.37k|      } else {
 1124|       |        // Vector of objects
 1125|  9.33M|        for (size_t i = 0; i < vector_length.value(); ++i) {
  ------------------
  |  Branch (1125:28): [True: 9.33M, False: 1.37k]
  ------------------
 1126|  9.33M|          BinaryRegionComment vector_object_comment;
 1127|  9.33M|          vector_object_comment.type =
 1128|  9.33M|              BinaryRegionCommentType::VectorTableValue;
 1129|  9.33M|          vector_object_comment.index = i;
 1130|       |
 1131|  9.33M|          const auto table_relative_offset = ReadScalar<uint32_t>(offset);
 1132|  9.33M|          if (!table_relative_offset.has_value()) {
  ------------------
  |  Branch (1132:15): [True: 0, False: 9.33M]
  ------------------
 1133|      0|            const uint64_t remaining = RemainingBytes(offset);
 1134|      0|            SetError(vector_object_comment,
 1135|      0|                     BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "4");
 1136|       |
 1137|      0|            regions.push_back(
 1138|      0|                MakeBinaryRegion(offset, remaining, BinaryRegionType::Unknown,
 1139|      0|                                 remaining, 0, vector_object_comment));
 1140|      0|            break;
 1141|      0|          }
 1142|       |
 1143|       |          // The table offset is relative from the offset location itself.
 1144|  9.33M|          const uint64_t table_offset = offset + table_relative_offset.value();
 1145|       |
 1146|  9.33M|          if (!IsValidOffset(table_offset)) {
  ------------------
  |  Branch (1146:15): [True: 4.74M, False: 4.59M]
  ------------------
 1147|  4.74M|            SetError(vector_object_comment,
 1148|  4.74M|                     BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
 1149|  4.74M|            regions.push_back(MakeBinaryRegion(
 1150|  4.74M|                offset, sizeof(uint32_t), BinaryRegionType::UOffset, 0,
 1151|  4.74M|                table_offset, vector_object_comment));
 1152|       |
 1153|  4.74M|            offset += sizeof(uint32_t);
 1154|  4.74M|            continue;
 1155|  4.74M|          }
 1156|       |
 1157|  4.59M|          if (table_offset == parent_table_offset) {
  ------------------
  |  Branch (1157:15): [True: 0, False: 4.59M]
  ------------------
 1158|      0|            SetError(vector_object_comment,
 1159|      0|                     BinaryRegionStatus::ERROR_CYCLE_DETECTED);
 1160|       |            // A cycle detected where a table vector field is pointing to
 1161|       |            // itself. This should only happen in corrupted files.
 1162|      0|            regions.push_back(MakeBinaryRegion(
 1163|      0|                offset, sizeof(uint32_t), BinaryRegionType::UOffset, 0,
 1164|      0|                table_offset, vector_object_comment));
 1165|       |
 1166|      0|            offset += sizeof(uint32_t);
 1167|      0|            continue;
 1168|      0|          }
 1169|       |
 1170|  4.59M|          regions.push_back(MakeBinaryRegion(
 1171|  4.59M|              offset, sizeof(uint32_t), BinaryRegionType::UOffset, 0,
 1172|  4.59M|              table_offset, vector_object_comment));
 1173|       |
 1174|       |          // Consume the offset to the table.
 1175|  4.59M|          offset += sizeof(uint32_t);
 1176|       |
 1177|  4.59M|          BuildTable(table_offset, BinarySectionType::Table, object);
 1178|  4.59M|        }
 1179|  1.37k|      }
 1180|  1.52k|    } break;
 1181|    425|    case reflection::BaseType::String: {
  ------------------
  |  Branch (1181:5): [True: 425, False: 2.56k]
  ------------------
 1182|       |      // Vector of strings
 1183|  2.18M|      for (size_t i = 0; i < vector_length.value(); ++i) {
  ------------------
  |  Branch (1183:26): [True: 2.18M, False: 425]
  ------------------
 1184|  2.18M|        BinaryRegionComment vector_object_comment;
 1185|  2.18M|        vector_object_comment.type = BinaryRegionCommentType::VectorStringValue;
 1186|  2.18M|        vector_object_comment.index = i;
 1187|       |
 1188|  2.18M|        const auto string_relative_offset = ReadScalar<uint32_t>(offset);
 1189|  2.18M|        if (!string_relative_offset.has_value()) {
  ------------------
  |  Branch (1189:13): [True: 0, False: 2.18M]
  ------------------
 1190|      0|          const uint64_t remaining = RemainingBytes(offset);
 1191|       |
 1192|      0|          SetError(vector_object_comment,
 1193|      0|                   BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "4");
 1194|       |
 1195|      0|          regions.push_back(
 1196|      0|              MakeBinaryRegion(offset, remaining, BinaryRegionType::Unknown,
 1197|      0|                               remaining, 0, vector_object_comment));
 1198|      0|          break;
 1199|      0|        }
 1200|       |
 1201|       |        // The string offset is relative from the offset location itself.
 1202|  2.18M|        const uint64_t string_offset = offset + string_relative_offset.value();
 1203|       |
 1204|  2.18M|        if (!IsValidOffset(string_offset)) {
  ------------------
  |  Branch (1204:13): [True: 1.16M, False: 1.01M]
  ------------------
 1205|  1.16M|          SetError(vector_object_comment,
 1206|  1.16M|                   BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
 1207|  1.16M|          regions.push_back(MakeBinaryRegion(
 1208|  1.16M|              offset, sizeof(uint32_t), BinaryRegionType::UOffset, 0,
 1209|  1.16M|              string_offset, vector_object_comment));
 1210|       |
 1211|  1.16M|          offset += sizeof(uint32_t);
 1212|  1.16M|          continue;
 1213|  1.16M|        }
 1214|       |
 1215|  1.01M|        regions.push_back(MakeBinaryRegion(
 1216|  1.01M|            offset, sizeof(uint32_t), BinaryRegionType::UOffset, 0,
 1217|  1.01M|            string_offset, vector_object_comment));
 1218|       |
 1219|  1.01M|        BuildString(string_offset, table, field);
 1220|       |
 1221|  1.01M|        offset += sizeof(uint32_t);
 1222|  1.01M|      }
 1223|    425|    } break;
 1224|    663|    case reflection::BaseType::Union: {
  ------------------
  |  Branch (1224:5): [True: 663, False: 2.32k]
  ------------------
 1225|       |      // Vector of unions
 1226|       |      // Unions have both their realized type (uint8_t for now) that are
 1227|       |      // stored separately. These are stored in the field->index() - 1
 1228|       |      // location.
 1229|    663|      const uint16_t union_type_vector_id = field->id() - 1;
 1230|       |
 1231|    663|      auto vtable_entry = vtable_fields.find(union_type_vector_id);
 1232|    663|      if (vtable_entry == vtable_fields.end()) {
  ------------------
  |  Branch (1232:11): [True: 3, False: 660]
  ------------------
 1233|       |        // TODO(dbaileychess): need to capture this error condition.
 1234|      3|        break;
 1235|      3|      }
 1236|       |
 1237|    660|      const uint64_t union_type_vector_field_offset =
 1238|    660|          parent_table_offset + vtable_entry->second.offset_from_table;
 1239|       |
 1240|    660|      const auto union_type_vector_field_relative_offset =
 1241|    660|          ReadScalar<uint16_t>(union_type_vector_field_offset);
 1242|       |
 1243|    660|      if (!union_type_vector_field_relative_offset.has_value()) {
  ------------------
  |  Branch (1243:11): [True: 80, False: 580]
  ------------------
 1244|     80|        const uint64_t remaining = RemainingBytes(offset);
 1245|     80|        BinaryRegionComment vector_union_comment;
 1246|     80|        vector_union_comment.type = BinaryRegionCommentType::VectorUnionValue;
 1247|     80|        SetError(vector_union_comment,
 1248|     80|                 BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "2");
 1249|       |
 1250|     80|        regions.push_back(MakeBinaryRegion(offset, remaining,
 1251|     80|                                           BinaryRegionType::Unknown, remaining,
 1252|     80|                                           0, vector_union_comment));
 1253|       |
 1254|     80|        break;
 1255|     80|      }
 1256|       |
 1257|       |      // Get the offset to the first type (the + sizeof(uint32_t) is to skip
 1258|       |      // over the vector length which we already know). Validation happens
 1259|       |      // within the loop below.
 1260|    580|      const uint64_t union_type_vector_data_offset =
 1261|    580|          union_type_vector_field_offset +
 1262|    580|          union_type_vector_field_relative_offset.value() + sizeof(uint32_t);
 1263|       |
 1264|  3.26M|      for (size_t i = 0; i < vector_length.value(); ++i) {
  ------------------
  |  Branch (1264:26): [True: 3.26M, False: 580]
  ------------------
 1265|  3.26M|        BinaryRegionComment comment;
 1266|  3.26M|        comment.type = BinaryRegionCommentType::VectorUnionValue;
 1267|  3.26M|        comment.index = i;
 1268|       |
 1269|  3.26M|        const auto union_relative_offset = ReadScalar<uint32_t>(offset);
 1270|  3.26M|        if (!union_relative_offset.has_value()) {
  ------------------
  |  Branch (1270:13): [True: 0, False: 3.26M]
  ------------------
 1271|      0|          const uint64_t remaining = RemainingBytes(offset);
 1272|       |
 1273|      0|          SetError(comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "4");
 1274|       |
 1275|      0|          regions.push_back(MakeBinaryRegion(offset, remaining,
 1276|      0|                                             BinaryRegionType::Unknown,
 1277|      0|                                             remaining, 0, comment));
 1278|       |
 1279|      0|          break;
 1280|      0|        }
 1281|       |
 1282|       |        // The union offset is relative from the offset location itself.
 1283|  3.26M|        const uint64_t union_offset = offset + union_relative_offset.value();
 1284|       |
 1285|  3.26M|        if (!IsValidOffset(union_offset)) {
  ------------------
  |  Branch (1285:13): [True: 3.20M, False: 66.8k]
  ------------------
 1286|  3.20M|          SetError(comment, BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
 1287|       |
 1288|  3.20M|          regions.push_back(MakeBinaryRegion(offset, sizeof(uint32_t),
 1289|  3.20M|                                             BinaryRegionType::UOffset, 0,
 1290|  3.20M|                                             union_offset, comment));
 1291|  3.20M|          continue;
 1292|  3.20M|        }
 1293|       |
 1294|  66.8k|        const auto realized_type =
 1295|  66.8k|            ReadScalar<uint8_t>(union_type_vector_data_offset + i);
 1296|       |
 1297|  66.8k|        if (!realized_type.has_value()) {
  ------------------
  |  Branch (1297:13): [True: 19.7k, False: 47.1k]
  ------------------
 1298|  19.7k|          SetError(comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "1");
 1299|  19.7k|          regions.push_back(MakeBinaryRegion(
 1300|  19.7k|              offset, 0, BinaryRegionType::Unknown, 0, 0, comment));
 1301|  19.7k|          continue;
 1302|  19.7k|        }
 1303|       |
 1304|  47.1k|        if (!IsValidUnionValue(vtable_entry->second.field->type()->index(),
  ------------------
  |  Branch (1304:13): [True: 18.0k, False: 29.1k]
  ------------------
 1305|  47.1k|                               realized_type.value())) {
 1306|       |          // We already export an error in the union type field, so just skip
 1307|       |          // building the union itself and it will default to an unreference
 1308|       |          // Binary section.
 1309|  18.0k|          offset += sizeof(uint32_t);
 1310|  18.0k|          continue;
 1311|  18.0k|        }
 1312|       |
 1313|  29.1k|        const std::string enum_type =
 1314|  29.1k|            BuildUnion(union_offset, realized_type.value(), field);
 1315|       |
 1316|  29.1k|        comment.default_value = "(`" + enum_type + "`)";
 1317|  29.1k|        regions.push_back(MakeBinaryRegion(offset, sizeof(uint32_t),
 1318|  29.1k|                                           BinaryRegionType::UOffset, 0,
 1319|  29.1k|                                           union_offset, comment));
 1320|       |
 1321|  29.1k|        offset += sizeof(uint32_t);
 1322|  29.1k|      }
 1323|    580|    } break;
 1324|    372|    default: {
  ------------------
  |  Branch (1324:5): [True: 372, False: 2.61k]
  ------------------
 1325|    372|      if (IsScalar(field->type()->element())) {
  ------------------
  |  Branch (1325:11): [True: 372, False: 0]
  ------------------
 1326|    372|        const BinaryRegionType binary_region_type =
 1327|    372|            GetRegionType(field->type()->element());
 1328|       |
 1329|    372|        const uint64_t type_size = GetTypeSize(field->type()->element());
 1330|       |
 1331|       |        // TODO(dbaileychess): It might be nicer to user the
 1332|       |        // BinaryRegion.array_length field to indicate this.
 1333|  3.88M|        for (size_t i = 0; i < vector_length.value(); ++i) {
  ------------------
  |  Branch (1333:28): [True: 3.88M, False: 372]
  ------------------
 1334|  3.88M|          BinaryRegionComment vector_scalar_comment;
 1335|  3.88M|          vector_scalar_comment.type = BinaryRegionCommentType::VectorValue;
 1336|  3.88M|          vector_scalar_comment.index = i;
 1337|       |
 1338|  3.88M|          if (!IsValidRead(offset, type_size)) {
  ------------------
  |  Branch (1338:15): [True: 0, False: 3.88M]
  ------------------
 1339|      0|            const uint64_t remaining = RemainingBytes(offset);
 1340|       |
 1341|      0|            SetError(vector_scalar_comment,
 1342|      0|                     BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
 1343|      0|                     std::to_string(type_size));
 1344|       |
 1345|      0|            regions.push_back(
 1346|      0|                MakeBinaryRegion(offset, remaining, BinaryRegionType::Unknown,
 1347|      0|                                 remaining, 0, vector_scalar_comment));
 1348|      0|            break;
 1349|      0|          }
 1350|       |
 1351|  3.88M|          if (IsUnionType(field->type()->element())) {
  ------------------
  |  Branch (1351:15): [True: 3.54M, False: 332k]
  ------------------
 1352|       |            // This is a type for a union. Validate the value
 1353|  3.54M|            const auto enum_value = ReadScalar<uint8_t>(offset);
 1354|       |
 1355|       |            // This should always have a value, due to the IsValidRead check
 1356|       |            // above.
 1357|  3.54M|            if (!IsValidUnionValue(field->type()->index(),
  ------------------
  |  Branch (1357:17): [True: 1.35M, False: 2.18M]
  ------------------
 1358|  3.54M|                                   enum_value.value())) {
 1359|  1.35M|              SetError(vector_scalar_comment,
 1360|  1.35M|                       BinaryRegionStatus::ERROR_INVALID_UNION_TYPE);
 1361|  1.35M|              regions.push_back(MakeBinaryRegion(offset, type_size,
 1362|  1.35M|                                                 binary_region_type, 0, 0,
 1363|  1.35M|                                                 vector_scalar_comment));
 1364|  1.35M|              offset += type_size;
 1365|  1.35M|              continue;
 1366|  1.35M|            }
 1367|  3.54M|          }
 1368|       |
 1369|  2.52M|          regions.push_back(MakeBinaryRegion(offset, type_size,
 1370|  2.52M|                                             binary_region_type, 0, 0,
 1371|  2.52M|                                             vector_scalar_comment));
 1372|  2.52M|          offset += type_size;
 1373|  2.52M|        }
 1374|    372|      }
 1375|    372|    } break;
 1376|  2.98k|  }
 1377|  2.98k|  AddSection(vector_offset,
 1378|  2.98k|             MakeBinarySection(std::string(table->name()->c_str()) + "." +
 1379|  2.98k|                                   field->name()->c_str(),
 1380|  2.98k|                               section_type, std::move(regions)));
 1381|  2.98k|}
_ZN11flatbuffers15BinaryAnnotator10BuildUnionEmhPKN10reflection5FieldE:
 1385|  29.4k|                                        const reflection::Field *const field) {
 1386|  29.4k|  const reflection::Enum *next_enum =
 1387|  29.4k|      schema_->enums()->Get(field->type()->index());
 1388|       |
 1389|  29.4k|  const reflection::EnumVal *enum_val = next_enum->values()->Get(realized_type);
 1390|       |
 1391|  29.4k|  if (ContainsSection(union_offset)) { return enum_val->name()->c_str(); }
  ------------------
  |  Branch (1391:7): [True: 6.03k, False: 23.4k]
  ------------------
 1392|       |
 1393|  23.4k|  const reflection::Type *union_type = enum_val->union_type();
 1394|       |
 1395|  23.4k|  if (union_type->base_type() == reflection::BaseType::Obj) {
  ------------------
  |  Branch (1395:7): [True: 1.16k, False: 22.2k]
  ------------------
 1396|  1.16k|    const reflection::Object *object =
 1397|  1.16k|        schema_->objects()->Get(union_type->index());
 1398|       |
 1399|  1.16k|    if (object->is_struct()) {
  ------------------
  |  Branch (1399:9): [True: 47, False: 1.12k]
  ------------------
 1400|       |      // Union of vectors point to a new Binary section
 1401|     47|      std::vector<BinaryRegion> regions;
 1402|       |
 1403|     47|      BuildStruct(union_offset, regions, field->name()->c_str(), object);
 1404|       |
 1405|     47|      AddSection(
 1406|     47|          union_offset,
 1407|     47|          MakeBinarySection(std::string(object->name()->c_str()) + "." +
 1408|     47|                                field->name()->c_str(),
 1409|     47|                            BinarySectionType::Union, std::move(regions)));
 1410|  1.12k|    } else {
 1411|  1.12k|      BuildTable(union_offset, BinarySectionType::Table, object);
 1412|  1.12k|    }
 1413|  1.16k|  }
 1414|       |  // TODO(dbaileychess): handle the other union types.
 1415|       |
 1416|  23.4k|  return enum_val->name()->c_str();
 1417|  29.4k|}
_ZN11flatbuffers15BinaryAnnotator17FixMissingRegionsEv:
 1419|  3.84k|void BinaryAnnotator::FixMissingRegions() {
 1420|  3.84k|  std::vector<BinaryRegion> regions_to_insert;
 1421|  1.92M|  for (auto &current_section : sections_) {
  ------------------
  |  Branch (1421:30): [True: 1.92M, False: 3.84k]
  ------------------
 1422|  1.92M|    BinarySection &section = current_section.second;
 1423|  1.92M|    if (section.regions.empty()) {
  ------------------
  |  Branch (1423:9): [True: 0, False: 1.92M]
  ------------------
 1424|       |      // TODO(dbaileychess): is this possible?
 1425|      0|      continue;
 1426|      0|    }
 1427|       |
 1428|  1.92M|    uint64_t offset = section.regions[0].offset + section.regions[0].length;
 1429|  22.2M|    for (size_t i = 1; i < section.regions.size(); ++i) {
  ------------------
  |  Branch (1429:24): [True: 20.2M, False: 1.92M]
  ------------------
 1430|  20.2M|      BinaryRegion &region = section.regions[i];
 1431|       |
 1432|  20.2M|      const uint64_t next_offset = region.offset;
 1433|  20.2M|      if (!IsValidOffset(next_offset)) {
  ------------------
  |  Branch (1433:11): [True: 1.32k, False: 20.2M]
  ------------------
 1434|       |        // TODO(dbaileychess): figure out how we get into this situation.
 1435|  1.32k|        continue;
 1436|  1.32k|      }
 1437|       |
 1438|  20.2M|      if (offset < next_offset) {
  ------------------
  |  Branch (1438:11): [True: 127k, False: 20.1M]
  ------------------
 1439|   127k|        const uint64_t padding_bytes = next_offset - offset;
 1440|       |
 1441|   127k|        BinaryRegionComment comment;
 1442|   127k|        comment.type = BinaryRegionCommentType::Padding;
 1443|       |
 1444|   127k|        if (IsNonZeroRegion(offset, padding_bytes, binary_)) {
  ------------------
  |  Branch (1444:13): [True: 111k, False: 16.2k]
  ------------------
 1445|   111k|          SetError(comment, BinaryRegionStatus::WARN_NO_REFERENCES);
 1446|   111k|          regions_to_insert.push_back(
 1447|   111k|              MakeBinaryRegion(offset, padding_bytes, BinaryRegionType::Unknown,
 1448|   111k|                               padding_bytes, 0, comment));
 1449|   111k|        } else {
 1450|  16.2k|          regions_to_insert.push_back(
 1451|  16.2k|              MakeBinaryRegion(offset, padding_bytes, BinaryRegionType::Uint8,
 1452|  16.2k|                               padding_bytes, 0, comment));
 1453|  16.2k|        }
 1454|   127k|      }
 1455|  20.2M|      offset = next_offset + region.length;
 1456|  20.2M|    }
 1457|       |
 1458|  1.92M|    if (!regions_to_insert.empty()) {
  ------------------
  |  Branch (1458:9): [True: 68.1k, False: 1.85M]
  ------------------
 1459|  68.1k|      section.regions.insert(section.regions.end(), regions_to_insert.begin(),
 1460|  68.1k|                             regions_to_insert.end());
 1461|  68.1k|      std::stable_sort(section.regions.begin(), section.regions.end(),
 1462|  68.1k|                       BinaryRegionSort);
 1463|  68.1k|      regions_to_insert.clear();
 1464|  68.1k|    }
 1465|  1.92M|  }
 1466|  3.84k|}
_ZN11flatbuffers15BinaryAnnotator18FixMissingSectionsEv:
 1468|  3.84k|void BinaryAnnotator::FixMissingSections() {
 1469|  3.84k|  uint64_t offset = 0;
 1470|       |
 1471|  3.84k|  std::vector<BinarySection> sections_to_insert;
 1472|       |
 1473|  1.92M|  for (auto &current_section : sections_) {
  ------------------
  |  Branch (1473:30): [True: 1.92M, False: 3.84k]
  ------------------
 1474|  1.92M|    BinarySection &section = current_section.second;
 1475|  1.92M|    const uint64_t section_start_offset = current_section.first;
 1476|  1.92M|    const uint64_t section_end_offset =
 1477|  1.92M|        section.regions.back().offset + section.regions.back().length;
 1478|       |
 1479|  1.92M|    if (offset < section_start_offset) {
  ------------------
  |  Branch (1479:9): [True: 1.56M, False: 355k]
  ------------------
 1480|       |      // We are at an offset that is less then the current section.
 1481|  1.56M|      const uint64_t pad_bytes = section_start_offset - offset + 1;
 1482|       |
 1483|  1.56M|      sections_to_insert.push_back(
 1484|  1.56M|          GenerateMissingSection(offset - 1, pad_bytes, binary_));
 1485|  1.56M|    }
 1486|  1.92M|    offset = section_end_offset + 1;
 1487|  1.92M|  }
 1488|       |
 1489|       |  // Handle the case where there are still bytes left in the binary that are
 1490|       |  // unaccounted for.
 1491|  3.84k|  if (offset < binary_length_) {
  ------------------
  |  Branch (1491:7): [True: 1.97k, False: 1.86k]
  ------------------
 1492|  1.97k|    const uint64_t pad_bytes = binary_length_ - offset + 1;
 1493|  1.97k|    sections_to_insert.push_back(
 1494|  1.97k|        GenerateMissingSection(offset - 1, pad_bytes, binary_));
 1495|  1.97k|  }
 1496|       |
 1497|  1.56M|  for (const BinarySection &section_to_insert : sections_to_insert) {
  ------------------
  |  Branch (1497:47): [True: 1.56M, False: 3.84k]
  ------------------
 1498|  1.56M|    AddSection(section_to_insert.regions[0].offset, section_to_insert);
 1499|  1.56M|  }
 1500|  3.84k|}
_ZN11flatbuffers15BinaryAnnotator15ContainsSectionEm:
 1502|  7.07M|bool BinaryAnnotator::ContainsSection(const uint64_t offset) {
 1503|  7.07M|  auto it = sections_.lower_bound(offset);
 1504|       |  // If the section is found, check that it is exactly equal its offset.
 1505|  7.07M|  if (it != sections_.end() && it->first == offset) { return true; }
  ------------------
  |  Branch (1505:7): [True: 6.79M, False: 286k]
  |  Branch (1505:7): [True: 172k, False: 6.90M]
  |  Branch (1505:32): [True: 172k, False: 6.62M]
  ------------------
 1506|       |
 1507|       |  // If this was the first section, there are no other previous sections to
 1508|       |  // check.
 1509|  6.90M|  if (it == sections_.begin()) { return false; }
  ------------------
  |  Branch (1509:7): [True: 0, False: 6.90M]
  ------------------
 1510|       |
 1511|       |  // Go back one section.
 1512|  6.90M|  --it;
 1513|       |
 1514|       |  // And check that if the offset is covered by the section.
 1515|  6.90M|  return offset >= it->first && offset < it->second.regions.back().offset +
  ------------------
  |  Branch (1515:10): [True: 6.90M, False: 0]
  |  Branch (1515:33): [True: 3.65M, False: 3.25M]
  ------------------
 1516|  6.90M|                                             it->second.regions.back().length;
 1517|  6.90M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_116MakeBinaryRegionEmmNS_16BinaryRegionTypeEmmNS_19BinaryRegionCommentE:
   32|  25.3M|    BinaryRegionComment comment = {}) {
   33|  25.3M|  BinaryRegion region;
   34|  25.3M|  region.offset = offset;
   35|  25.3M|  region.length = length;
   36|  25.3M|  region.type = type;
   37|  25.3M|  region.array_length = array_length;
   38|  25.3M|  region.points_to_offset = points_to_offset;
   39|  25.3M|  region.comment = std::move(comment);
   40|  25.3M|  return region;
   41|  25.3M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_18SetErrorERNS_19BinaryRegionCommentENS_18BinaryRegionStatusENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
   23|  12.9M|                     std::string message = "") {
   24|  12.9M|  comment.status = status;
   25|  12.9M|  comment.status_message = message;
   26|  12.9M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_117IsPrintableRegionEmmPKh:
   70|  3.84k|                              const uint8_t *const binary) {
   71|  4.91k|  for (uint64_t i = offset; i < offset + length; ++i) {
  ------------------
  |  Branch (71:29): [True: 4.87k, False: 31]
  ------------------
   72|  4.87k|    if (!isprint(binary[i])) { return false; }
  ------------------
  |  Branch (72:9): [True: 3.81k, False: 1.06k]
  ------------------
   73|  4.87k|  }
   74|     31|  return true;
   75|  3.84k|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_117MakeBinarySectionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17BinarySectionTypeENS1_6vectorINS_12BinaryRegionENS5_ISC_EEEE:
   45|  3.49M|                                       std::vector<BinaryRegion> regions) {
   46|  3.49M|  BinarySection section;
   47|  3.49M|  section.name = name;
   48|  3.49M|  section.type = type;
   49|  3.49M|  section.regions = std::move(regions);
   50|  3.49M|  return section;
   51|  3.49M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_129MakeSingleRegionBinarySectionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_17BinarySectionTypeERKNS_12BinaryRegionE:
   55|  1.50M|                                                   const BinaryRegion &region) {
   56|  1.50M|  std::vector<BinaryRegion> regions;
   57|  1.50M|  regions.push_back(region);
   58|  1.50M|  return MakeBinarySection(name, type, std::move(regions));
   59|  1.50M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_115IsNonZeroRegionEmmPKh:
   62|  1.69M|                            const uint8_t *const binary) {
   63|  11.2M|  for (uint64_t i = offset; i < offset + length; ++i) {
  ------------------
  |  Branch (63:29): [True: 10.2M, False: 1.01M]
  ------------------
   64|  10.2M|    if (binary[i] != 0) { return true; }
  ------------------
  |  Branch (64:9): [True: 685k, False: 9.54M]
  ------------------
   65|  10.2M|  }
   66|  1.01M|  return false;
   67|  1.69M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_116BinaryRegionSortERKNS_12BinaryRegionES3_:
   18|  21.3M|static bool BinaryRegionSort(const BinaryRegion &a, const BinaryRegion &b) {
   19|  21.3M|  return a.offset < b.offset;
   20|  21.3M|}
binary_annotator.cpp:_ZN11flatbuffers12_GLOBAL__N_122GenerateMissingSectionEmmPKh:
   79|  1.56M|                                            const uint8_t *const binary) {
   80|  1.56M|  std::vector<BinaryRegion> regions;
   81|       |
   82|       |  // Check if the region is all zeros or not, as that can tell us if it is
   83|       |  // padding or not.
   84|  1.56M|  if (IsNonZeroRegion(offset, length, binary)) {
  ------------------
  |  Branch (84:7): [True: 573k, False: 994k]
  ------------------
   85|       |    // Some of the padding bytes are non-zero, so this might be an unknown
   86|       |    // section of the binary.
   87|       |    // TODO(dbaileychess): We could be a bit smarter with different sized
   88|       |    // alignments. For now, the 8 byte check encompasses all the smaller
   89|       |    // alignments.
   90|   573k|    BinaryRegionComment comment;
   91|   573k|    comment.type = BinaryRegionCommentType::Unknown;
   92|   573k|    if (length >= 8) {
  ------------------
  |  Branch (92:9): [True: 368k, False: 205k]
  ------------------
   93|   368k|      SetError(comment, BinaryRegionStatus::WARN_NO_REFERENCES);
   94|   368k|    } else {
   95|   205k|      SetError(comment, BinaryRegionStatus::WARN_CORRUPTED_PADDING);
   96|   205k|    }
   97|       |
   98|   573k|    regions.push_back(MakeBinaryRegion(offset, length * sizeof(uint8_t),
   99|   573k|                                       BinaryRegionType::Unknown, length, 0,
  100|   573k|                                       comment));
  101|       |
  102|   573k|    return MakeBinarySection("no known references", BinarySectionType::Unknown,
  103|   573k|                             std::move(regions));
  104|   573k|  }
  105|       |
  106|   994k|  BinaryRegionComment comment;
  107|   994k|  comment.type = BinaryRegionCommentType::Padding;
  108|   994k|  if (length >= 8) {
  ------------------
  |  Branch (108:7): [True: 6.48k, False: 988k]
  ------------------
  109|  6.48k|    SetError(comment, BinaryRegionStatus::WARN_PADDING_LENGTH);
  110|  6.48k|  }
  111|       |
  112|       |  // This region is most likely padding.
  113|   994k|  regions.push_back(MakeBinaryRegion(offset, length * sizeof(uint8_t),
  114|   994k|                                     BinaryRegionType::Uint8, length, 0,
  115|   994k|                                     comment));
  116|       |
  117|   994k|  return MakeBinarySection("", BinarySectionType::Padding, std::move(regions));
  118|  1.56M|}
binary_annotator.cpp:_ZZN11flatbuffers15BinaryAnnotator16GetOrBuildVTableEmPKN10reflection6ObjectEmENK3$_0clEPKNS1_5FieldE:
  355|   387k|  ForAllFields(table, /*reverse=*/false, [&](const reflection::Field *field) {
  356|   387k|    const uint64_t field_offset = offset_start + field->id() * sizeof(uint16_t);
  357|       |
  358|   387k|    if (field_offset >= vtable_offset + vtable_size) {
  ------------------
  |  Branch (358:9): [True: 92.9k, False: 295k]
  ------------------
  359|       |      // This field_offset is too large for this vtable, so it must come from a
  360|       |      // newer schema than the binary was create with or the binary writer did
  361|       |      // not write it. For either case, it is safe to ignore.
  362|       |
  363|       |      // TODO(dbaileychess): We could show which fields are not set an their
  364|       |      // default values if we want. We just need a way to make it obvious that
  365|       |      // it isn't part of the buffer.
  366|  92.9k|      return;
  367|  92.9k|    }
  368|       |
  369|   295k|    BinaryRegionComment field_comment;
  370|   295k|    field_comment.type = BinaryRegionCommentType::VTableFieldOffset;
  371|   295k|    field_comment.name = std::string(field->name()->c_str()) +
  372|   295k|                         "` (id: " + std::to_string(field->id()) + ")";
  373|       |
  374|   295k|    const auto offset_from_table = ReadScalar<uint16_t>(field_offset);
  375|       |
  376|   295k|    if (!offset_from_table.has_value()) {
  ------------------
  |  Branch (376:9): [True: 114, False: 294k]
  ------------------
  377|    114|      const uint64_t remaining = RemainingBytes(field_offset);
  378|       |
  379|    114|      SetError(field_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY, "2");
  380|    114|      regions.push_back(MakeBinaryRegion(field_offset, remaining,
  381|    114|                                         BinaryRegionType::Unknown, remaining,
  382|    114|                                         0, field_comment));
  383|       |
  384|    114|      return;
  385|    114|    }
  386|       |
  387|   294k|    if (!IsValidOffset(offset_of_referring_table + offset_from_table.value() -
  ------------------
  |  Branch (387:9): [True: 29.5k, False: 265k]
  ------------------
  388|   294k|                       1)) {
  389|  29.5k|      SetError(field_comment, BinaryRegionStatus::ERROR_OFFSET_OUT_OF_BINARY);
  390|  29.5k|      regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  391|  29.5k|                                         BinaryRegionType::VOffset, 0, 0,
  392|  29.5k|                                         field_comment));
  393|  29.5k|      return;
  394|  29.5k|    }
  395|       |
  396|   265k|    VTable::Entry entry;
  397|   265k|    entry.field = field;
  398|   265k|    entry.offset_from_table = offset_from_table.value();
  399|   265k|    fields.insert(std::make_pair(field->id(), entry));
  400|       |
  401|   265k|    std::string default_label;
  402|   265k|    if (offset_from_table.value() == 0) {
  ------------------
  |  Branch (402:9): [True: 92.3k, False: 172k]
  ------------------
  403|       |      // Not present, so could be default or be optional.
  404|  92.3k|      if (field->required()) {
  ------------------
  |  Branch (404:11): [True: 0, False: 92.3k]
  ------------------
  405|      0|        SetError(field_comment,
  406|      0|                 BinaryRegionStatus::ERROR_REQUIRED_FIELD_NOT_PRESENT);
  407|       |        // If this is a required field, make it known this is an error.
  408|      0|        regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  409|      0|                                           BinaryRegionType::VOffset, 0, 0,
  410|      0|                                           field_comment));
  411|      0|        return;
  412|  92.3k|      } else {
  413|       |        // Its an optional field, so get the default value and interpret and
  414|       |        // provided an annotation for it.
  415|  92.3k|        if (IsScalar(field->type()->base_type())) {
  ------------------
  |  Branch (415:13): [True: 71.4k, False: 20.8k]
  ------------------
  416|  71.4k|          default_label += "<defaults to ";
  417|  71.4k|          default_label += IsFloat(field->type()->base_type())
  ------------------
  |  Branch (417:28): [True: 61.8k, False: 9.64k]
  ------------------
  418|  71.4k|                               ? std::to_string(field->default_real())
  419|  71.4k|                               : std::to_string(field->default_integer());
  420|  71.4k|          default_label += "> (";
  421|  71.4k|        } else {
  422|  20.8k|          default_label += "<null> (";
  423|  20.8k|        }
  424|  92.3k|        default_label +=
  425|  92.3k|            reflection::EnumNameBaseType(field->type()->base_type());
  426|  92.3k|        default_label += ")";
  427|  92.3k|      }
  428|  92.3k|    }
  429|   265k|    field_comment.default_value = default_label;
  430|       |
  431|   265k|    regions.push_back(MakeBinaryRegion(field_offset, sizeof(uint16_t),
  432|   265k|                                       BinaryRegionType::VOffset, 0, 0,
  433|   265k|                                       field_comment));
  434|       |
  435|   265k|    fields_processed++;
  436|   265k|  });
binary_annotator.cpp:_ZZN11flatbuffers15BinaryAnnotator10BuildTableEmNS_17BinarySectionTypeEPKN10reflection6ObjectEENK3$_1clERKNS0_6VTable5EntryESA_:
  579|  1.75M|                   [](const VTable::Entry &a, const VTable::Entry &b) {
  580|  1.75M|                     return a.offset_from_table < b.offset_from_table;
  581|  1.75M|                   });
binary_annotator.cpp:_ZZN11flatbuffers15BinaryAnnotator11BuildStructEmRNSt3__16vectorINS_12BinaryRegionENS1_9allocatorIS3_EEEENS1_12basic_stringIcNS1_11char_traitsIcEENS4_IcEEEEPKN10reflection6ObjectEENK3$_2clEPKNSD_5FieldE:
  865|   302k|  ForAllFields(object, /*reverse=*/false, [&](const reflection::Field *field) {
  866|   302k|    if (IsScalar(field->type()->base_type())) {
  ------------------
  |  Branch (866:9): [True: 298k, False: 4.50k]
  ------------------
  867|       |      // Structure Field value
  868|   298k|      const uint64_t type_size = GetTypeSize(field->type()->base_type());
  869|   298k|      const BinaryRegionType region_type =
  870|   298k|          GetRegionType(field->type()->base_type());
  871|       |
  872|   298k|      BinaryRegionComment comment;
  873|   298k|      comment.type = BinaryRegionCommentType::StructField;
  874|   298k|      comment.name = referring_field_name + "." + field->name()->str();
  875|   298k|      comment.default_value = "of '" + object->name()->str() + "' (" +
  876|   298k|                              std::string(reflection::EnumNameBaseType(
  877|   298k|                                  field->type()->base_type())) +
  878|   298k|                              ")";
  879|       |
  880|   298k|      if (!IsValidRead(offset, type_size)) {
  ------------------
  |  Branch (880:11): [True: 1.07k, False: 297k]
  ------------------
  881|  1.07k|        const uint64_t remaining = RemainingBytes(offset);
  882|  1.07k|        SetError(comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  883|  1.07k|                 std::to_string(type_size));
  884|  1.07k|        regions.push_back(MakeBinaryRegion(offset, remaining,
  885|  1.07k|                                           BinaryRegionType::Unknown, remaining,
  886|  1.07k|                                           0, comment));
  887|       |
  888|       |        // TODO(dbaileychess): Should I bail out here? This sets offset to the
  889|       |        // end of the binary. So all other reads in the loop should fail.
  890|  1.07k|        offset += remaining;
  891|  1.07k|        return;
  892|  1.07k|      }
  893|       |
  894|   297k|      regions.push_back(
  895|   297k|          MakeBinaryRegion(offset, type_size, region_type, 0, 0, comment));
  896|   297k|      offset += type_size;
  897|   297k|    } else if (field->type()->base_type() == reflection::BaseType::Obj) {
  ------------------
  |  Branch (897:16): [True: 1.48k, False: 3.02k]
  ------------------
  898|       |      // Structs are stored inline, even when nested.
  899|  1.48k|      offset = BuildStruct(offset, regions,
  900|  1.48k|                           referring_field_name + "." + field->name()->str(),
  901|  1.48k|                           schema_->objects()->Get(field->type()->index()));
  902|  3.02k|    } else if (field->type()->base_type() == reflection::BaseType::Array) {
  ------------------
  |  Branch (902:16): [True: 3.02k, False: 0]
  ------------------
  903|  3.02k|      const bool is_scalar = IsScalar(field->type()->element());
  904|  3.02k|      const uint64_t type_size = GetTypeSize(field->type()->element());
  905|  3.02k|      const BinaryRegionType region_type =
  906|  3.02k|          GetRegionType(field->type()->element());
  907|       |
  908|       |      // Arrays are just repeated structures.
  909|  11.4k|      for (uint16_t i = 0; i < field->type()->fixed_length(); ++i) {
  ------------------
  |  Branch (909:28): [True: 8.68k, False: 2.77k]
  ------------------
  910|  8.68k|        if (is_scalar) {
  ------------------
  |  Branch (910:13): [True: 4.14k, False: 4.53k]
  ------------------
  911|  4.14k|          BinaryRegionComment array_comment;
  912|  4.14k|          array_comment.type = BinaryRegionCommentType::ArrayField;
  913|  4.14k|          array_comment.name =
  914|  4.14k|              referring_field_name + "." + field->name()->str();
  915|  4.14k|          array_comment.index = i;
  916|  4.14k|          array_comment.default_value =
  917|  4.14k|              "of '" + object->name()->str() + "' (" +
  918|  4.14k|              std::string(
  919|  4.14k|                  reflection::EnumNameBaseType(field->type()->element())) +
  920|  4.14k|              ")";
  921|       |
  922|  4.14k|          if (!IsValidRead(offset, type_size)) {
  ------------------
  |  Branch (922:15): [True: 252, False: 3.89k]
  ------------------
  923|    252|            const uint64_t remaining = RemainingBytes(offset);
  924|       |
  925|    252|            SetError(array_comment, BinaryRegionStatus::ERROR_INCOMPLETE_BINARY,
  926|    252|                     std::to_string(type_size));
  927|       |
  928|    252|            regions.push_back(MakeBinaryRegion(offset, remaining,
  929|    252|                                               BinaryRegionType::Unknown,
  930|    252|                                               remaining, 0, array_comment));
  931|       |
  932|       |            // TODO(dbaileychess): Should I bail out here? This sets offset to
  933|       |            // the end of the binary. So all other reads in the loop should
  934|       |            // fail.
  935|    252|            offset += remaining;
  936|    252|            break;
  937|    252|          }
  938|       |
  939|  3.89k|          regions.push_back(MakeBinaryRegion(offset, type_size, region_type, 0,
  940|  3.89k|                                             0, array_comment));
  941|       |
  942|  3.89k|          offset += type_size;
  943|  4.53k|        } else {
  944|       |          // Array of Structs.
  945|       |          //
  946|       |          // TODO(dbaileychess): This works, but the comments on the fields lose
  947|       |          // some context. Need to figure a way how to plumb the nested arrays
  948|       |          // comments together that isn't too confusing.
  949|  4.53k|          offset =
  950|  4.53k|              BuildStruct(offset, regions,
  951|  4.53k|                          referring_field_name + "." + field->name()->str(),
  952|  4.53k|                          schema_->objects()->Get(field->type()->index()));
  953|  4.53k|        }
  954|  8.68k|      }
  955|  3.02k|    }
  956|       |
  957|       |    // Insert any padding after this field.
  958|   301k|    const uint16_t padding = field->padding();
  959|   301k|    if (padding > 0 && IsValidOffset(offset + padding)) {
  ------------------
  |  Branch (959:9): [True: 1.51k, False: 300k]
  |  Branch (959:24): [True: 1.21k, False: 294]
  ------------------
  960|  1.21k|      BinaryRegionComment padding_comment;
  961|  1.21k|      padding_comment.type = BinaryRegionCommentType::Padding;
  962|       |
  963|  1.21k|      regions.push_back(MakeBinaryRegion(offset, padding,
  964|  1.21k|                                         BinaryRegionType::Uint8, padding, 0,
  965|  1.21k|                                         padding_comment));
  966|  1.21k|      offset += padding;
  967|  1.21k|    }
  968|   301k|  });

_ZN11flatbuffers15BinaryAnnotatorC2EPKhmS2_mb:
  255|  3.85k|        is_size_prefixed_(is_size_prefixed) {}
_ZNK11flatbuffers15BinaryAnnotator13IsValidOffsetEm:
  304|  66.3M|  inline bool IsValidOffset(const uint64_t offset) const {
  305|  66.3M|    return offset < binary_length_;
  306|  66.3M|  }
_ZNK11flatbuffers15BinaryAnnotator11IsValidReadEmm:
  314|  26.9M|  inline bool IsValidRead(const uint64_t offset, const uint64_t length) const {
  315|  26.9M|    return length < binary_length_ && IsValidOffset(offset + length - 1);
  ------------------
  |  Branch (315:12): [True: 26.9M, False: 26.8k]
  |  Branch (315:39): [True: 26.9M, False: 25.8k]
  ------------------
  316|  26.9M|  }
_ZNK11flatbuffers15BinaryAnnotator14RemainingBytesEm:
  320|  43.9k|  uint64_t RemainingBytes(const uint64_t offset) const {
  321|  43.9k|    return IsValidOffset(offset) ? binary_length_ - offset : 0;
  ------------------
  |  Branch (321:12): [True: 42.6k, False: 1.33k]
  ------------------
  322|  43.9k|  }
_ZN11flatbuffers15BinaryAnnotator10AddSectionEmRKNS_13BinarySectionE:
  334|  3.38M|  void AddSection(const uint64_t offset, const BinarySection &section) {
  335|  3.38M|    sections_.insert(std::make_pair(offset, section));
  336|  3.38M|  }
_ZN11flatbuffers15BinaryAnnotator13IsInlineFieldEPKN10reflection5FieldE:
  338|  73.9k|  bool IsInlineField(const reflection::Field *const field) {
  339|  73.9k|    if (field->type()->base_type() == reflection::BaseType::Obj) {
  ------------------
  |  Branch (339:9): [True: 59.6k, False: 14.3k]
  ------------------
  340|  59.6k|      return schema_->objects()->Get(field->type()->index())->is_struct();
  341|  59.6k|    }
  342|  14.3k|    return IsScalar(field->type()->base_type());
  343|  73.9k|  }
_ZN11flatbuffers15BinaryAnnotator11IsUnionTypeEN10reflection8BaseTypeE:
  345|  3.99M|  bool IsUnionType(const reflection::BaseType type) {
  346|  3.99M|    return (type == reflection::BaseType::UType ||
  ------------------
  |  Branch (346:13): [True: 3.55M, False: 437k]
  ------------------
  347|  3.99M|            type == reflection::BaseType::Union);
  ------------------
  |  Branch (347:13): [True: 835, False: 436k]
  ------------------
  348|  3.99M|  }
_ZN11flatbuffers15BinaryAnnotator11IsUnionTypeEPKN10reflection5FieldE:
  350|   109k|  bool IsUnionType(const reflection::Field *const field) {
  351|   109k|    return IsUnionType(field->type()->base_type()) &&
  ------------------
  |  Branch (351:12): [True: 5.72k, False: 104k]
  ------------------
  352|   109k|           field->type()->index() >= 0;
  ------------------
  |  Branch (352:12): [True: 5.72k, False: 0]
  ------------------
  353|   109k|  }
_ZN11flatbuffers15BinaryAnnotator17IsValidUnionValueEPKN10reflection5FieldEh:
  356|  3.28k|                         const uint8_t value) {
  357|  3.28k|    return IsUnionType(field) &&
  ------------------
  |  Branch (357:12): [True: 3.28k, False: 0]
  ------------------
  358|  3.28k|           IsValidUnionValue(field->type()->index(), value);
  ------------------
  |  Branch (358:12): [True: 1.64k, False: 1.63k]
  ------------------
  359|  3.28k|  }
_ZN11flatbuffers15BinaryAnnotator17IsValidUnionValueEjh:
  361|  3.59M|  bool IsValidUnionValue(const uint32_t enum_id, const uint8_t value) {
  362|  3.59M|    if (enum_id >= schema_->enums()->size()) { return false; }
  ------------------
  |  Branch (362:9): [True: 0, False: 3.59M]
  ------------------
  363|       |
  364|  3.59M|    const reflection::Enum *enum_def = schema_->enums()->Get(enum_id);
  365|       |
  366|  3.59M|    if (enum_def == nullptr) { return false; }
  ------------------
  |  Branch (366:9): [True: 0, False: 3.59M]
  ------------------
  367|       |
  368|  3.59M|    return value < enum_def->values()->size();
  369|  3.59M|  }
_ZN11flatbuffers15BinaryAnnotator14GetElementSizeEPKN10reflection5FieldE:
  371|  3.45k|  uint64_t GetElementSize(const reflection::Field *const field) {
  372|  3.45k|    if (IsScalar(field->type()->element())) {
  ------------------
  |  Branch (372:9): [True: 535, False: 2.91k]
  ------------------
  373|    535|      return GetTypeSize(field->type()->element());
  374|    535|    }
  375|       |
  376|  2.91k|    switch (field->type()->element()) {
  377|  1.72k|      case reflection::BaseType::Obj: {
  ------------------
  |  Branch (377:7): [True: 1.72k, False: 1.19k]
  ------------------
  378|  1.72k|        auto obj = schema_->objects()->Get(field->type()->index());
  379|  1.72k|        return obj->is_struct() ? obj->bytesize() : sizeof(uint32_t);
  ------------------
  |  Branch (379:16): [True: 213, False: 1.50k]
  ------------------
  380|      0|      }
  381|  1.19k|      default: return sizeof(uint32_t);
  ------------------
  |  Branch (381:7): [True: 1.19k, False: 1.72k]
  ------------------
  382|  2.91k|    }
  383|  2.91k|  }
binary_annotator.cpp:_ZN11flatbuffersL13GetRegionTypeEN10reflection8BaseTypeE:
  200|   408k|inline static BinaryRegionType GetRegionType(reflection::BaseType base_type) {
  201|   408k|  switch (base_type) {
  202|  2.69k|    case reflection::UType: return BinaryRegionType::UType;
  ------------------
  |  Branch (202:5): [True: 2.69k, False: 405k]
  ------------------
  203|    572|    case reflection::Bool: return BinaryRegionType::Uint8;
  ------------------
  |  Branch (203:5): [True: 572, False: 408k]
  ------------------
  204|  4.23k|    case reflection::Byte: return BinaryRegionType::Uint8;
  ------------------
  |  Branch (204:5): [True: 4.23k, False: 404k]
  ------------------
  205|  4.55k|    case reflection::UByte: return BinaryRegionType::Uint8;
  ------------------
  |  Branch (205:5): [True: 4.55k, False: 404k]
  ------------------
  206|      0|    case reflection::Short: return BinaryRegionType::Int16;
  ------------------
  |  Branch (206:5): [True: 0, False: 408k]
  ------------------
  207|    118|    case reflection::UShort: return BinaryRegionType::Uint16;
  ------------------
  |  Branch (207:5): [True: 118, False: 408k]
  ------------------
  208|  10.8k|    case reflection::Int: return BinaryRegionType::Uint32;
  ------------------
  |  Branch (208:5): [True: 10.8k, False: 397k]
  ------------------
  209|      0|    case reflection::UInt: return BinaryRegionType::Uint32;
  ------------------
  |  Branch (209:5): [True: 0, False: 408k]
  ------------------
  210|  1.88k|    case reflection::Long: return BinaryRegionType::Int64;
  ------------------
  |  Branch (210:5): [True: 1.88k, False: 406k]
  ------------------
  211|      0|    case reflection::ULong: return BinaryRegionType::Uint64;
  ------------------
  |  Branch (211:5): [True: 0, False: 408k]
  ------------------
  212|  32.0k|    case reflection::Float: return BinaryRegionType::Float;
  ------------------
  |  Branch (212:5): [True: 32.0k, False: 376k]
  ------------------
  213|   350k|    case reflection::Double: return BinaryRegionType::Double;
  ------------------
  |  Branch (213:5): [True: 350k, False: 58.4k]
  ------------------
  214|  1.51k|    default: return BinaryRegionType::Unknown;
  ------------------
  |  Branch (214:5): [True: 1.51k, False: 407k]
  ------------------
  215|   408k|  }
  216|   408k|}
_ZNK11flatbuffers15BinaryAnnotator10ReadScalarIjEENSt3__18optionalIT_EEm:
  325|  15.0M|  flatbuffers::Optional<T> ReadScalar(const uint64_t offset) const {
  326|  15.0M|    if (!IsValidRead<T>(offset)) { return flatbuffers::nullopt; }
  ------------------
  |  Branch (326:9): [True: 640, False: 15.0M]
  ------------------
  327|       |
  328|  15.0M|    return flatbuffers::ReadScalar<T>(binary_ + offset);
  329|  15.0M|  }
_ZNK11flatbuffers15BinaryAnnotator11IsValidReadIjEEbm:
  310|  15.0M|  template<typename T> inline bool IsValidRead(const uint64_t offset) const {
  311|  15.0M|    return IsValidRead(offset, sizeof(T));
  312|  15.0M|  }
_ZNK11flatbuffers15BinaryAnnotator10ReadScalarItEENSt3__18optionalIT_EEm:
  325|  2.12M|  flatbuffers::Optional<T> ReadScalar(const uint64_t offset) const {
  326|  2.12M|    if (!IsValidRead<T>(offset)) { return flatbuffers::nullopt; }
  ------------------
  |  Branch (326:9): [True: 220, False: 2.12M]
  ------------------
  327|       |
  328|  2.12M|    return flatbuffers::ReadScalar<T>(binary_ + offset);
  329|  2.12M|  }
_ZNK11flatbuffers15BinaryAnnotator11IsValidReadItEEbm:
  310|  2.12M|  template<typename T> inline bool IsValidRead(const uint64_t offset) const {
  311|  2.12M|    return IsValidRead(offset, sizeof(T));
  312|  2.12M|  }
_ZNK11flatbuffers15BinaryAnnotator10ReadScalarIiEENSt3__18optionalIT_EEm:
  325|  1.68M|  flatbuffers::Optional<T> ReadScalar(const uint64_t offset) const {
  326|  1.68M|    if (!IsValidRead<T>(offset)) { return flatbuffers::nullopt; }
  ------------------
  |  Branch (326:9): [True: 317, False: 1.68M]
  ------------------
  327|       |
  328|  1.68M|    return flatbuffers::ReadScalar<T>(binary_ + offset);
  329|  1.68M|  }
_ZNK11flatbuffers15BinaryAnnotator11IsValidReadIiEEbm:
  310|  1.68M|  template<typename T> inline bool IsValidRead(const uint64_t offset) const {
  311|  1.68M|    return IsValidRead(offset, sizeof(T));
  312|  1.68M|  }
binary_annotator.cpp:_ZN11flatbuffersL5ToHexImEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEET_m:
   55|  9.05k|static inline std::string ToHex(T i, size_t width = sizeof(T)) {
   56|  9.05k|  std::stringstream stream;
   57|  9.05k|  stream << std::hex << std::uppercase << std::setfill('0')
   58|  9.05k|         << std::setw(static_cast<int>(width)) << i;
   59|  9.05k|  return stream.str();
   60|  9.05k|}
_ZNK11flatbuffers15BinaryAnnotator10ReadScalarIhEENSt3__18optionalIT_EEm:
  325|  3.61M|  flatbuffers::Optional<T> ReadScalar(const uint64_t offset) const {
  326|  3.61M|    if (!IsValidRead<T>(offset)) { return flatbuffers::nullopt; }
  ------------------
  |  Branch (326:9): [True: 19.8k, False: 3.59M]
  ------------------
  327|       |
  328|  3.59M|    return flatbuffers::ReadScalar<T>(binary_ + offset);
  329|  3.61M|  }
_ZNK11flatbuffers15BinaryAnnotator11IsValidReadIhEEbm:
  310|  3.61M|  template<typename T> inline bool IsValidRead(const uint64_t offset) const {
  311|  3.61M|    return IsValidRead(offset, sizeof(T));
  312|  3.61M|  }

_ZN11flatbuffers12ForAllFieldsEPKN10reflection6ObjectEbNSt3__18functionIFvPKNS0_5FieldEEEE:
  361|   256k|                  std::function<void(const reflection::Field *)> func) {
  362|   256k|  std::vector<uint32_t> field_to_id_map;
  363|   256k|  field_to_id_map.resize(object->fields()->size());
  364|       |
  365|       |  // Create the mapping of field ID to the index into the vector.
  366|   946k|  for (uint32_t i = 0; i < object->fields()->size(); ++i) {
  ------------------
  |  Branch (366:24): [True: 690k, False: 256k]
  ------------------
  367|   690k|    auto field = object->fields()->Get(i);
  368|   690k|    field_to_id_map[field->id()] = i;
  369|   690k|  }
  370|       |
  371|   946k|  for (size_t i = 0; i < field_to_id_map.size(); ++i) {
  ------------------
  |  Branch (371:22): [True: 690k, False: 256k]
  ------------------
  372|   690k|    func(object->fields()->Get(
  373|   690k|        field_to_id_map[reverse ? field_to_id_map.size() - i + 1 : i]));
  ------------------
  |  Branch (373:25): [True: 0, False: 690k]
  ------------------
  374|   690k|  }
  375|   256k|}

_ZN11flatbuffers8LoadFileEPKcbPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  215|      2|bool LoadFile(const char *name, bool binary, std::string *buf) {
  216|      2|  FLATBUFFERS_ASSERT(g_load_file_function);
  217|      0|  return g_load_file_function(name, binary, buf);
  218|      2|}
_ZN11flatbuffers9DirExistsEPKc:
  225|      2|bool DirExists(const char *name) {
  226|       |  // clang-format off
  227|       |
  228|       |  #ifdef _WIN32
  229|       |    #define flatbuffers_stat _stat
  230|       |    #define FLATBUFFERS_S_IFDIR _S_IFDIR
  231|       |  #else
  232|      2|    #define flatbuffers_stat stat
  233|      2|    #define FLATBUFFERS_S_IFDIR S_IFDIR
  234|      2|  #endif
  235|       |  // clang-format on
  236|      2|  struct flatbuffers_stat file_info;
  237|      2|  if (flatbuffers_stat(name, &file_info) != 0) return false;
  ------------------
  |  |  232|      2|    #define flatbuffers_stat stat
  ------------------
  |  Branch (237:7): [True: 0, False: 2]
  ------------------
  238|      2|  return (file_info.st_mode & FLATBUFFERS_S_IFDIR) != 0;
  ------------------
  |  |  233|      2|    #define FLATBUFFERS_S_IFDIR S_IFDIR
  ------------------
  239|      2|}
_ZN11flatbuffers13ClassicLocaleC2Ev:
  408|      2|    : locale_(newlocale(LC_ALL, "C", nullptr)) {}
util.cpp:_ZN11flatbuffers12_GLOBAL__N_111LoadFileRawEPKcbPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   66|      2|static bool LoadFileRaw(const char *name, bool binary, std::string *buf) {
   67|      2|  if (DirExists(name)) return false;
  ------------------
  |  Branch (67:7): [True: 0, False: 2]
  ------------------
   68|      2|  std::ifstream ifs(name, binary ? std::ifstream::binary : std::ifstream::in);
  ------------------
  |  Branch (68:27): [True: 2, False: 0]
  ------------------
   69|      2|  if (!ifs.is_open()) return false;
  ------------------
  |  Branch (69:7): [True: 0, False: 2]
  ------------------
   70|      2|  if (binary) {
  ------------------
  |  Branch (70:7): [True: 2, False: 0]
  ------------------
   71|       |    // The fastest way to read a file into a string.
   72|      2|    ifs.seekg(0, std::ios::end);
   73|      2|    auto size = ifs.tellg();
   74|      2|    (*buf).resize(static_cast<size_t>(size));
   75|      2|    ifs.seekg(0, std::ios::beg);
   76|      2|    ifs.read(&(*buf)[0], (*buf).size());
   77|      2|  } else {
   78|       |    // This is slower, but works correctly on all platforms for text files.
   79|      0|    std::ostringstream oss;
   80|      0|    oss << ifs.rdbuf();
   81|      0|    *buf = oss.str();
   82|      0|  }
   83|      2|  return !ifs.bad();
   84|      2|}

_Z14TestFileExistsNSt3__14__fs10filesystem4pathE:
   12|      2|bool TestFileExists(std::filesystem::path file_path) {
   13|      2|  if (file_path.has_filename() && std::filesystem::exists(file_path))
  ------------------
  |  Branch (13:7): [True: 2, False: 0]
  |  Branch (13:35): [True: 2, False: 0]
  ------------------
   14|      2|    return true;
   15|       |
   16|      0|  TEST_OUTPUT_LINE("@DEBUG: file '%s' not found", file_path.string().c_str());
  ------------------
  |  |   16|      0|      do { printf(__VA_ARGS__); printf("\n"); } while(!IsConstTrue(true))
  |  |  ------------------
  |  |  |  Branch (16:55): [Folded - Ignored]
  |  |  ------------------
  ------------------
   17|      0|  for (const auto &entry :
  ------------------
  |  Branch (17:26): [True: 0, False: 0]
  ------------------
   18|      0|       std::filesystem::directory_iterator(file_path.parent_path())) {
   19|      0|    TEST_OUTPUT_LINE("@DEBUG: parent path entry: '%s'",
  ------------------
  |  |   16|      0|      do { printf(__VA_ARGS__); printf("\n"); } while(!IsConstTrue(true))
  |  |  ------------------
  |  |  |  Branch (16:55): [Folded - Ignored]
  |  |  ------------------
  ------------------
   20|      0|                     entry.path().string().c_str());
   21|      0|  }
   22|      0|  return false;
   23|      2|}
_Z16LoadBinarySchemaPKc:
   25|      2|std::string LoadBinarySchema(const char *file_name) {
   26|      2|  const auto file_path = exe_path_.parent_path() / file_name;
   27|      2|  TEST_EQ(true, TestFileExists(file_path));
  ------------------
  |  |   19|      2|#define TEST_EQ(exp, val) TestEq(exp, val, "'" #exp "' != '" #val "'", __FILE__, __LINE__, "")
  ------------------
   28|      2|  std::string schemafile;
   29|      2|  TEST_EQ(true,
  ------------------
  |  |   19|      2|#define TEST_EQ(exp, val) TestEq(exp, val, "'" #exp "' != '" #val "'", __FILE__, __LINE__, "")
  ------------------
   30|      2|          flatbuffers::LoadFile(file_path.string().c_str(), true, &schemafile));
   31|       |
   32|      2|  flatbuffers::Verifier verifier(
   33|      2|      reinterpret_cast<const uint8_t *>(schemafile.c_str()), schemafile.size());
   34|      2|  TEST_EQ(true, reflection::VerifySchemaBuffer(verifier));
  ------------------
  |  |   19|      2|#define TEST_EQ(exp, val) TestEq(exp, val, "'" #exp "' != '" #val "'", __FILE__, __LINE__, "")
  ------------------
   35|      2|  return schemafile;
   36|      2|}
LLVMFuzzerInitialize:
   38|      2|extern "C" int LLVMFuzzerInitialize(int *, char ***argv) {
   39|      2|  exe_path_ = (*argv)[0];
   40|      2|  static const std::string schema_file =
   41|      2|      LoadBinarySchema("annotated_binary.bfbs");
   42|      2|  schema_bfbs_ = reinterpret_cast<const uint8_t *>(schema_file.c_str());
   43|      2|  schema_bfbs_length_ = schema_file.size();
   44|      2|  return 0;
   45|      2|}
LLVMFuzzerTestOneInput:
   47|  3.85k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   48|  3.85k|  flatbuffers::BinaryAnnotator annotator(schema_bfbs_, schema_bfbs_length_,
   49|  3.85k|                                         data, size, false);
   50|       |
   51|  3.85k|  annotator.Annotate();
   52|  3.85k|  return 0;
   53|  3.85k|}

_Z6TestEqIbbEvT_T0_PKcS3_iS3_:
   93|      6|            const char *func) {
   94|      6|  if (static_cast<U>(expval) != val) {
  ------------------
  |  Branch (94:7): [True: 0, False: 6]
  ------------------
   95|      0|    TestFail(flatbuffers::NumToString(scalar_as_underlying(expval)).c_str(),
   96|      0|             flatbuffers::NumToString(scalar_as_underlying(val)).c_str(), exp,
   97|      0|             file, line, func);
   98|      0|  }
   99|      6|}

