_ZNK4Ogre10ConfigFile20getSettingsBySectionEv:
   97|    396|        const SettingsBySection_& getSettingsBySection() const {
   98|    396|            return mSettings;
   99|    396|        }

_ZN4Ogre28DefaultHardwareBufferManagerC2Ev:
   88|      1|        DefaultHardwareBufferManager() : mImpl(new DefaultHardwareBufferManagerBase()) {}
_ZN4Ogre28DefaultHardwareBufferManager18createVertexBufferEmmhb:
   99|  2.53k|        {
  100|  2.53k|            return mImpl->createVertexBuffer(vertexSize, numVerts, usage, useShadowBuffer);
  101|  2.53k|        }
_ZN4Ogre28DefaultHardwareBufferManager17createIndexBufferENS_19HardwareIndexBuffer9IndexTypeEmhb:
  106|     82|        {
  107|     82|            return mImpl->createIndexBuffer(itype, numIndexes, usage, useShadowBuffer);
  108|     82|        }

_ZN4Ogre8EdgeData8TriangleC2Ev:
   71|  13.9M|            Triangle() :indexSet(0), vertexSet(0) {}

_ZNK4Ogre11LodStrategy7getNameEv:
  103|      8|        const String& getName() const { return mName; }

_ZN4Ogre13OptimisedUtilC2Ev:
   64|      2|        OptimisedUtil(void) {}

_ZN4Ogre9SharedPtrINS_10DataStreamEEC2INS_16MemoryDataStreamEEEPT_:
   50|  3.29k|        explicit SharedPtr(Y* ptr) : shared_ptr<T>(ptr) {}
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_4MeshEEERKNS0_IT_EE:
   55|  2.27k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_8SkeletonEEERKNS0_IT_EE:
   55|    574|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}

_ZN4Ogre16StreamSerialiser5ChunkC2Ev:
  105|     56|            Chunk() : id(0), version(1), length(0), offset(0) {}
_ZN4Ogre16StreamSerialiser4readIjEEvPT_m:
  301|    112|        {
  302|    112|            readData(pT, sizeof(T), count);
  303|    112|        }
_ZN4Ogre16StreamSerialiser4readItEEvPT_m:
  301|     56|        {
  302|     56|            readData(pT, sizeof(T), count);
  303|     56|        }

_ZN4Ogre13AlignedMemory8allocateEmm:
   59|  2.64k|    {
   60|  2.64k|        assert(0 < alignment && alignment <= 128 && Bitwise::isPO2(alignment));
   61|       |
   62|  2.64k|        unsigned char* p = new unsigned char[size + alignment];
   63|  2.64k|        size_t offset = alignment - (size_t(p) & (alignment-1));
   64|       |
   65|  2.64k|        unsigned char* result = p + offset;
   66|  2.64k|        result[-1] = (unsigned char)offset;
   67|       |
   68|  2.64k|        return result;
   69|  2.64k|    }
_ZN4Ogre13AlignedMemory8allocateEm:
   72|  2.62k|    {
   73|       |        return allocate(size, OGRE_SIMD_ALIGNMENT);
   74|  2.62k|    }
_ZN4Ogre13AlignedMemory10deallocateEPv:
   77|  2.04k|    {
   78|  2.04k|        if (p)
  ------------------
  |  Branch (78:13): [True: 2.04k, False: 0]
  ------------------
   79|  2.04k|        {
   80|  2.04k|            unsigned char* mem = (unsigned char*)p;
   81|  2.04k|            mem = mem - mem[-1];
   82|  2.04k|            delete [] mem;
   83|  2.04k|        }
   84|  2.04k|    }

_ZN4Ogre9AnimationC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
   39|  2.57k|        : mName(name)
   40|  2.57k|        , mLength(length)
   41|  2.57k|        , mInterpolationMode(msDefaultInterpolationMode)
   42|  2.57k|        , mRotationInterpolationMode(msDefaultRotationInterpolationMode)
   43|  2.57k|        , mKeyFrameTimesDirty(false)
   44|  2.57k|        , mUseBaseKeyFrame(false)
   45|  2.57k|        , mBaseKeyFrameTime(0.0f)
   46|  2.57k|        , mBaseKeyFrameAnimationName(BLANKSTRING)
   47|  2.57k|        , mContainer(0)
   48|  2.57k|    {
   49|  2.57k|    }
_ZN4Ogre9Animation18setUseBaseKeyFrameEbfRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  658|    338|    {
  659|    338|        if (useBaseKeyFrame != mUseBaseKeyFrame ||
  ------------------
  |  Branch (659:13): [True: 338, False: 0]
  ------------------
  660|      0|            keyframeTime != mBaseKeyFrameTime ||
  ------------------
  |  Branch (660:13): [True: 0, False: 0]
  ------------------
  661|      0|            baseAnimName != mBaseKeyFrameAnimationName)
  ------------------
  |  Branch (661:13): [True: 0, False: 0]
  ------------------
  662|    338|        {
  663|    338|            mUseBaseKeyFrame = useBaseKeyFrame;
  664|    338|            mBaseKeyFrameTime = keyframeTime;
  665|    338|            mBaseKeyFrameAnimationName = baseAnimName;
  666|    338|        }
  667|    338|    }
_ZN4Ogre9Animation16_notifyContainerEPNS_18AnimationContainerE:
  737|  2.57k|    {
  738|  2.57k|        mContainer = c;
  739|  2.57k|    }

_ZN4Ogre4BoneC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEtPNS_8SkeletonE:
   39|    500|        : Node(name), mCreator(creator), mHandle(handle), mManuallyControlled(false)
   40|    500|    {
   41|    500|    }
_ZN4Ogre4Bone14setBindingPoseEv:
   68|    127|    {
   69|    127|        setInitialState();
   70|       |
   71|       |        // Save inverse derived position/scale/orientation, used for calculate offset transform later
   72|    127|        mBindDerivedInversePosition = - _getDerivedPosition();
   73|    127|        mBindDerivedInverseScale = Vector3::UNIT_SCALE / _getDerivedScale();
   74|    127|        mBindDerivedInverseOrientation = _getDerivedOrientation().Inverse();
   75|    127|    }
_ZN4Ogre4Bone10needUpdateEb:
  108|  1.01k|    {
  109|  1.01k|        Node::needUpdate(forceParentUpdate);
  110|       |
  111|  1.01k|        if (isManuallyControlled())
  ------------------
  |  Branch (111:13): [True: 0, False: 1.01k]
  ------------------
  112|      0|        {
  113|       |            // Dirty the skeleton if manually controlled so animation can be updated
  114|      0|            mCreator->_notifyManualBonesDirty();
  115|      0|        }
  116|       |
  117|  1.01k|    }

_ZN4Ogre5Codec13registerCodecEPS0_:
   62|      1|    {
   63|      1|        auto ret = msMapCodecs.emplace(pCodec->getType(), pCodec);
   64|      1|        if (!ret.second)
  ------------------
  |  Branch (64:13): [True: 0, False: 1]
  ------------------
   65|       |            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, pCodec->getType() + " already has a registered codec");
   66|      1|    }

_ZN4Ogre19logMaterialNotFoundERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_S8_S8_NS_15LogMessageLevelE:
   67|  4.87k|    {
   68|  4.87k|        LogManager::getSingleton().logMessage(
   69|  4.87k|            StringUtil::format("Can't assign material to %s '%s'. Material '%s' not found in group '%s'. Have you "
   70|  4.87k|                               "forgotten to define it in a .material script?",
   71|  4.87k|                               destType.c_str(), destName.c_str(), name.c_str(), groupName.c_str()),
   72|  4.87k|            lml);
   73|  4.87k|    }

_ZN4Ogre10ConfigFileC2Ev:
   38|    396|    {
   39|    396|    }
_ZN4Ogre10ConfigFile5clearEv:
   42|    396|    {
   43|    396|        mSettings.clear();
   44|    396|        mSettingsPtr.clear();
   45|    396|    }
_ZN4Ogre10ConfigFile4loadERKNS_9SharedPtrINS_10DataStreamEEERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEb:
   74|    396|    {
   75|       |        /* Clear current settings map */
   76|    396|        clear();
   77|       |
   78|    396|        String currentSection = BLANKSTRING;
   79|    396|        SettingsMultiMap* currentSettings = &mSettings[currentSection];
   80|    396|        mSettingsPtr[currentSection] = currentSettings;
   81|       |
   82|       |
   83|       |        /* Process the file line for line */
   84|    396|        String line, optName, optVal;
   85|  43.3k|        while (!stream->eof())
  ------------------
  |  Branch (85:16): [True: 42.9k, False: 396]
  ------------------
   86|  42.9k|        {
   87|  42.9k|            line = stream->getLine();
   88|       |            /* Ignore comments & blanks */
   89|  42.9k|            if (line.length() > 0 && line.at(0) != '#' && line.at(0) != '@')
  ------------------
  |  Branch (89:17): [True: 39.8k, False: 3.06k]
  |  Branch (89:38): [True: 39.5k, False: 299]
  |  Branch (89:59): [True: 39.3k, False: 207]
  ------------------
   90|  39.3k|            {
   91|  39.3k|                if (line.at(0) == '[' && line.at(line.length()-1) == ']')
  ------------------
  |  Branch (91:21): [True: 13.9k, False: 25.4k]
  |  Branch (91:42): [True: 10.9k, False: 2.94k]
  ------------------
   92|  10.9k|                {
   93|       |                    // Section
   94|  10.9k|                    currentSection = line.substr(1, line.length() - 2);
   95|  10.9k|                    currentSettings = &mSettings[currentSection];
   96|  10.9k|                    mSettingsPtr[currentSection] = currentSettings;
   97|  10.9k|                }
   98|  28.4k|                else
   99|  28.4k|                {
  100|       |                    /* Find the first separator character and split the string there */
  101|  28.4k|                    Ogre::String::size_type separator_pos = line.find_first_of(separators, 0);
  102|  28.4k|                    if (separator_pos != Ogre::String::npos)
  ------------------
  |  Branch (102:25): [True: 24.6k, False: 3.79k]
  ------------------
  103|  24.6k|                    {
  104|  24.6k|                        optName = line.substr(0, separator_pos);
  105|       |                        /* Find the first non-separator character following the name */
  106|  24.6k|                        Ogre::String::size_type nonseparator_pos = line.find_first_not_of(separators, separator_pos);
  107|       |                        /* ... and extract the value */
  108|       |                        /* Make sure we don't crash on an empty setting (it might be a valid value) */
  109|  24.6k|                        optVal = (nonseparator_pos == Ogre::String::npos) ? "" : line.substr(nonseparator_pos);
  ------------------
  |  Branch (109:34): [True: 11.5k, False: 13.1k]
  ------------------
  110|  24.6k|                        if (trimWhitespace)
  ------------------
  |  Branch (110:29): [True: 24.6k, False: 0]
  ------------------
  111|  24.6k|                        {
  112|  24.6k|                            StringUtil::trim(optVal);
  113|  24.6k|                            StringUtil::trim(optName);
  114|  24.6k|                        }
  115|  24.6k|                        currentSettings->emplace(optName, optVal);
  116|  24.6k|                    }
  117|  28.4k|                }
  118|  39.3k|            }
  119|  42.9k|        }
  120|    396|    }

_ZN4Ogre10DataStream7getLineEb:
   41|   114k|    {
   42|   114k|        char tmpBuf[OGRE_STREAM_TEMP_SIZE];
   43|   114k|        String retString;
   44|   114k|        size_t readCount;
   45|       |        // Keep looping while not hitting delimiter
   46|   572k|        while ((readCount = read(tmpBuf, OGRE_STREAM_TEMP_SIZE-1)) != 0)
  ------------------
  |  Branch (46:16): [True: 570k, False: 1.27k]
  ------------------
   47|   570k|        {
   48|       |            // Terminate string
   49|   570k|            tmpBuf[readCount] = '\0';
   50|       |
   51|   570k|            char* p = strchr(tmpBuf, '\n');
   52|   570k|            if (p != 0)
  ------------------
  |  Branch (52:17): [True: 113k, False: 457k]
  ------------------
   53|   113k|            {
   54|       |                // Reposition backwards
   55|   113k|                skip((long)(p + 1 - tmpBuf - readCount));
   56|   113k|                *p = '\0';
   57|   113k|            }
   58|       |
   59|   570k|            retString += tmpBuf;
   60|       |
   61|   570k|            if (p != 0)
  ------------------
  |  Branch (61:17): [True: 113k, False: 457k]
  ------------------
   62|   113k|            {
   63|       |                // Trim off trailing CR if this was a CR/LF entry
   64|   113k|                if (retString.length() && retString[retString.length()-1] == '\r')
  ------------------
  |  Branch (64:21): [True: 109k, False: 3.67k]
  |  Branch (64:43): [True: 3.98k, False: 105k]
  ------------------
   65|  3.98k|                {
   66|  3.98k|                    retString.erase(retString.length()-1, 1);
   67|  3.98k|                }
   68|       |
   69|       |                // Found terminator, break out
   70|   113k|                break;
   71|   113k|            }
   72|   570k|        }
   73|       |
   74|   114k|        if (trimAfter)
  ------------------
  |  Branch (74:13): [True: 42.9k, False: 71.7k]
  ------------------
   75|  42.9k|        {
   76|  42.9k|            StringUtil::trim(retString);
   77|  42.9k|        }
   78|       |
   79|   114k|        return retString;
   80|   114k|    }
_ZN4Ogre16MemoryDataStreamC2EPvmbb:
  190|  2.90k|        : DataStream(static_cast<uint16>(readOnly ? READ : (READ | WRITE)))
  ------------------
  |  Branch (190:42): [True: 2.90k, False: 0]
  ------------------
  191|  2.90k|    {
  192|  2.90k|        mData = mPos = static_cast<uchar*>(pMem);
  193|  2.90k|        mSize = inSize;
  194|  2.90k|        mEnd = mData + mSize;
  195|  2.90k|        mFreeOnClose = freeOnClose;
  196|       |        assert(mEnd >= mPos);
  197|  2.90k|    }
_ZN4Ogre16MemoryDataStreamC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPvmbb:
  201|    396|        : DataStream(name, static_cast<uint16>(readOnly ? READ : (READ | WRITE)))
  ------------------
  |  Branch (201:48): [True: 396, False: 0]
  ------------------
  202|    396|    {
  203|    396|        mData = mPos = static_cast<uchar*>(pMem);
  204|    396|        mSize = inSize;
  205|    396|        mEnd = mData + mSize;
  206|    396|        mFreeOnClose = freeOnClose;
  207|       |        assert(mEnd >= mPos);
  208|    396|    }
_ZN4Ogre16MemoryDataStreamD2Ev:
  338|  3.29k|    {
  339|  3.29k|        close();
  340|  3.29k|    }
_ZN4Ogre16MemoryDataStream4readEPvm:
  343|  71.1M|    {
  344|       |        // Read over end of memory?
  345|  71.1M|        if (mPos >= mEnd)
  ------------------
  |  Branch (345:13): [True: 69.6M, False: 1.52M]
  ------------------
  346|  69.6M|            return 0;
  347|  1.52M|        size_t cnt = std::min(count, static_cast<size_t>(mEnd - mPos));
  348|  1.52M|        if (cnt == 0)
  ------------------
  |  Branch (348:13): [True: 1.19k, False: 1.52M]
  ------------------
  349|  1.19k|            return 0;
  350|       |
  351|  1.52M|        assert (cnt<=count);
  352|       |
  353|  1.52M|        memcpy(buf, mPos, cnt);
  354|  1.52M|        mPos += cnt;
  355|  1.52M|        return cnt;
  356|  1.52M|    }
_ZN4Ogre16MemoryDataStream4skipEl:
  435|   248k|    {
  436|   248k|        size_t newpos = (size_t)( ( mPos - mData ) + count );
  437|   248k|        assert( mData + newpos <= mEnd );        
  438|       |
  439|   248k|        mPos = mData + newpos;
  440|   248k|    }
_ZN4Ogre16MemoryDataStream4seekEm:
  443|  2.26k|    {
  444|  2.26k|        if (mData + pos > mEnd)
  ------------------
  |  Branch (444:13): [True: 0, False: 2.26k]
  ------------------
  445|      0|            pos = static_cast<size_t>(mEnd - mData);
  446|  2.26k|        mPos = mData + pos;
  447|  2.26k|    }
_ZNK4Ogre16MemoryDataStream4tellEv:
  450|   382k|    {
  451|       |        //mData is start, mPos is current location
  452|   382k|        return mPos - mData;
  453|   382k|    }
_ZNK4Ogre16MemoryDataStream3eofEv:
  456|  1.30M|    {
  457|  1.30M|        return mPos >= mEnd;
  458|  1.30M|    }
_ZN4Ogre16MemoryDataStream5closeEv:
  461|  3.29k|    {
  462|  3.29k|        mAccess = 0;
  463|  3.29k|        if (mFreeOnClose && mData)
  ------------------
  |  Branch (463:13): [True: 0, False: 3.29k]
  |  Branch (463:29): [True: 0, False: 0]
  ------------------
  464|      0|        {
  465|       |            OGRE_FREE(mData, MEMCATEGORY_GENERAL);
  466|      0|            mData = 0;
  467|      0|        }
  468|  3.29k|    }

_ZN4Ogre21DefaultHardwareBufferC2Em:
   34|  2.62k|    : HardwareBuffer(HBU_CPU_ONLY, false) // always software, never shadowed
   35|  2.62k|    {
   36|  2.62k|        mSizeInBytes = sizeInBytes;
   37|       |        // Allocate aligned memory for better SIMD processing friendly.
   38|  2.62k|        mData = (uchar*)AlignedMemory::allocate(mSizeInBytes);
   39|  2.62k|    }
_ZN4Ogre21DefaultHardwareBufferD2Ev:
   42|  2.04k|    {
   43|  2.04k|        AlignedMemory::deallocate(mData);
   44|  2.04k|    }
_ZN4Ogre21DefaultHardwareBuffer8lockImplEmmNS_14HardwareBuffer11LockOptionsE:
   47|  2.65k|    {
   48|       |        // Only for use internally, no 'locking' as such
   49|  2.65k|        return mData + offset;
   50|  2.65k|    }
_ZN4Ogre21DefaultHardwareBuffer10unlockImplEv:
   53|  2.65k|    {
   54|       |        // Nothing to do
   55|  2.65k|    }
_ZN4Ogre32DefaultHardwareBufferManagerBaseC2Ev:
   72|      1|    {
   73|      1|    }
_ZN4Ogre32DefaultHardwareBufferManagerBase18createVertexBufferEmmhb:
   84|  2.53k|    {
   85|  2.53k|        return std::make_shared<HardwareVertexBuffer>(this, vertexSize, numVerts,
   86|  2.53k|                                                      new DefaultHardwareBuffer(vertexSize * numVerts));
   87|  2.53k|    }
_ZN4Ogre32DefaultHardwareBufferManagerBase17createIndexBufferENS_19HardwareIndexBuffer9IndexTypeEmhb:
   92|     82|    {
   93|     82|        return std::make_shared<HardwareIndexBuffer>(
   94|     82|            this, itype, numIndexes,
   95|     82|            new DefaultHardwareBuffer(HardwareIndexBuffer::indexSize(itype) * numIndexes));
   96|     82|    }

_ZN4Ogre23DistanceLodStrategyBaseC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   37|      2|        : LodStrategy(name)
   38|      2|        , mReferenceViewEnabled(false)
   39|      2|        , mReferenceViewValue(-1)
   40|      2|    { }
_ZNK4Ogre23DistanceLodStrategyBase12getBaseValueEv:
   76|  6.21k|    {
   77|  6.21k|        return Real(0);
   78|  6.21k|    }
_ZNK4Ogre23DistanceLodStrategyBase18transformUserValueEf:
   87|  3.94k|    {
   88|       |        // Square user-supplied distance
   89|  3.94k|        return Math::Sqr(userValue);
   90|  3.94k|    }
_ZN4Ogre25DistanceLodSphereStrategy15getSingletonPtrEv:
  152|    216|    {
  153|    216|        return msSingleton;
  154|    216|    }
_ZN4Ogre25DistanceLodSphereStrategyC2Ev:
  161|      1|        : DistanceLodStrategyBase("distance_sphere")
  162|      1|    { }
_ZN4Ogre22DistanceLodBoxStrategyC2Ev:
  192|      1|        : DistanceLodStrategyBase("distance_box")
  193|      1|    { }

_ZN4Ogre8EdgeDataC2Ev:
   44|     23|    EdgeData::EdgeData() : isClosed(false){}

_ZN4Ogre9ExceptionC2EiRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_PKcSB_l:
   43|  12.5k|        line( lin ),
   44|  12.5k|        typeName(typ),
   45|  12.5k|        description( desc ),
   46|  12.5k|        source( src ),
   47|  12.5k|        file( fil )
   48|  12.5k|    {
   49|  12.5k|        StringStream ss;
   50|       |
   51|  12.5k|        ss << typeName << ": "
   52|  12.5k|           << description
   53|  12.5k|           << " in " << source;
   54|       |
   55|  12.5k|        if( line > 0 )
  ------------------
  |  Branch (55:13): [True: 12.5k, False: 0]
  ------------------
   56|  12.5k|        {
   57|  12.5k|            ss << " at " << file << " (line " << line << ")";
   58|  12.5k|        }
   59|       |
   60|  12.5k|        fullDesc = ss.str();
   61|  12.5k|    }

_ZN4Ogre21HardwareBufferManager15getSingletonPtrEv:
   36|  23.5k|    {
   37|  23.5k|        return msSingleton;
   38|  23.5k|    }
_ZN4Ogre21HardwareBufferManagerC2Ev:
   45|      1|    {
   46|      1|    }
_ZN4Ogre25HardwareBufferManagerBaseC2Ev:
   58|      2|        : mUnderUsedFrameCount(0)
   59|      2|    {
   60|      2|    }
_ZN4Ogre25HardwareBufferManagerBase23createVertexDeclarationEv:
   73|  18.6k|    {
   74|  18.6k|        VertexDeclaration* decl = createVertexDeclarationImpl();
   75|  18.6k|        OGRE_LOCK_MUTEX(mVertexDeclarationsMutex);
   76|  18.6k|        mVertexDeclarations.insert(decl);
   77|  18.6k|        return decl;
   78|  18.6k|    }
_ZN4Ogre25HardwareBufferManagerBase24destroyVertexDeclarationEPNS_17VertexDeclarationE:
   81|  17.7k|    {
   82|  17.7k|        OGRE_LOCK_MUTEX(mVertexDeclarationsMutex);
   83|  17.7k|        OgreAssertDbg(mVertexDeclarations.find(decl) != mVertexDeclarations.end(), "unknown decl");
   84|  17.7k|        mVertexDeclarations.erase(decl);
   85|  17.7k|        destroyVertexDeclarationImpl(decl);
   86|  17.7k|    }
_ZN4Ogre25HardwareBufferManagerBase25createVertexBufferBindingEv:
   89|  18.6k|    {
   90|  18.6k|        VertexBufferBinding* ret = createVertexBufferBindingImpl();
   91|  18.6k|        OGRE_LOCK_MUTEX(mVertexBufferBindingsMutex);
   92|  18.6k|        mVertexBufferBindings.insert(ret);
   93|  18.6k|        return ret;
   94|  18.6k|    }
_ZN4Ogre25HardwareBufferManagerBase26destroyVertexBufferBindingEPNS_19VertexBufferBindingE:
   97|  17.7k|    {
   98|  17.7k|        OGRE_LOCK_MUTEX(mVertexBufferBindingsMutex);
   99|  17.7k|        OgreAssertDbg(mVertexBufferBindings.find(binding) != mVertexBufferBindings.end(),
  100|  17.7k|                      "unknown binding");
  101|  17.7k|        mVertexBufferBindings.erase(binding);
  102|  17.7k|        destroyVertexBufferBindingImpl(binding);
  103|  17.7k|    }
_ZN4Ogre25HardwareBufferManagerBase27createVertexDeclarationImplEv:
  106|  18.6k|    {
  107|       |        return OGRE_NEW VertexDeclaration();
  108|  18.6k|    }
_ZN4Ogre25HardwareBufferManagerBase28destroyVertexDeclarationImplEPNS_17VertexDeclarationE:
  111|  17.7k|    {
  112|       |        OGRE_DELETE decl;
  113|  17.7k|    }
_ZN4Ogre25HardwareBufferManagerBase29createVertexBufferBindingImplEv:
  116|  18.6k|    {
  117|       |        return OGRE_NEW VertexBufferBinding();
  118|  18.6k|    }
_ZN4Ogre25HardwareBufferManagerBase30destroyVertexBufferBindingImplEPNS_19VertexBufferBindingE:
  121|  17.7k|    {
  122|       |        OGRE_DELETE binding;
  123|  17.7k|    }
_ZN4Ogre25HardwareBufferManagerBase28_notifyVertexBufferDestroyedEPNS_20HardwareVertexBufferE:
  361|  2.04k|    {
  362|  2.04k|        OGRE_LOCK_MUTEX(mVertexBuffersMutex);
  363|  2.04k|        VertexBufferList::iterator i = mVertexBuffers.find(buf);
  364|  2.04k|        if (i != mVertexBuffers.end())
  ------------------
  |  Branch (364:13): [True: 0, False: 2.04k]
  ------------------
  365|      0|        {
  366|       |            // release vertex buffer copies
  367|      0|            mVertexBuffers.erase(i);
  368|      0|            _forceReleaseBufferCopies(buf);
  369|      0|        }
  370|  2.04k|    }

_ZN4Ogre19HardwareIndexBufferC2EPNS_25HardwareBufferManagerBaseENS0_9IndexTypeEmhb:
   40|     82|        : HardwareBuffer(usage, useShadowBuffer)
   41|     82|        , mIndexType(idxType)
   42|     82|        , mMgr(mgr)
   43|     82|        , mNumIndexes(numIndexes)
   44|     82|    {
   45|       |        // Calculate the size of the indexes
   46|     82|        mIndexSize = indexSize(idxType);
   47|     82|        mSizeInBytes = mIndexSize * mNumIndexes;
   48|       |
   49|     82|        if (idxType == IT_32BIT && Root::getSingletonPtr() && Root::getSingleton().getRenderSystem())
  ------------------
  |  Branch (49:13): [True: 25, False: 57]
  |  Branch (49:36): [True: 0, False: 25]
  |  Branch (49:63): [True: 0, False: 0]
  ------------------
   50|      0|        {
   51|      0|            if (!Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_32BIT_INDEX))
  ------------------
  |  Branch (51:17): [True: 0, False: 0]
  ------------------
   52|      0|            {
   53|      0|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "32 bit index buffers are not supported");
   54|      0|            }
   55|      0|        }
   56|       |
   57|       |        // Create a shadow buffer if required
   58|     82|        if (useShadowBuffer)
  ------------------
  |  Branch (58:13): [True: 0, False: 82]
  ------------------
   59|      0|        {
   60|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   61|      0|        }
   62|     82|    }
_ZN4Ogre19HardwareIndexBufferC2EPNS_25HardwareBufferManagerBaseENS0_9IndexTypeEmPNS_14HardwareBufferE:
   66|     82|        : HardwareIndexBuffer(mgr, idxType, numIndexes, delegate->getUsage(), false)
   67|     82|    {
   68|     82|        mDelegate.reset(delegate);
   69|     82|    }

_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmhb:
   39|  2.53k|        : HardwareBuffer(usage, useShadowBuffer),
   40|  2.53k|          mIsInstanceData(false),
   41|  2.53k|          mMgr(mgr),
   42|  2.53k|          mNumVertices(numVertices),
   43|  2.53k|          mVertexSize(vertexSize),
   44|  2.53k|          mInstanceDataStepRate(1)
   45|  2.53k|    {
   46|       |        // Calculate the size of the vertices
   47|  2.53k|        mSizeInBytes = mVertexSize * numVertices;
   48|       |
   49|       |        // Create a shadow buffer if required
   50|  2.53k|        if (useShadowBuffer)
  ------------------
  |  Branch (50:13): [True: 0, False: 2.53k]
  ------------------
   51|      0|        {
   52|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   53|      0|        }
   54|       |
   55|  2.53k|    }
_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmPNS_14HardwareBufferE:
   58|  2.53k|        : HardwareVertexBuffer(mgr, vertexSize, numVertices, delegate->getUsage(), false)
   59|  2.53k|    {
   60|  2.53k|        mDelegate.reset(delegate);
   61|  2.53k|    }
_ZN4Ogre20HardwareVertexBufferD2Ev:
   64|  2.04k|    {
   65|  2.04k|        if (mMgr)
  ------------------
  |  Branch (65:13): [True: 2.04k, False: 0]
  ------------------
   66|  2.04k|        {
   67|  2.04k|            mMgr->_notifyVertexBufferDestroyed(this);
   68|  2.04k|        }
   69|  2.04k|    }
_ZN4Ogre13VertexElementC2EtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  104|  15.5k|        : mOffset(offset), mSource(source), mIndex(index), mType(theType), mSemantic(semantic)
  105|  15.5k|    {
  106|  15.5k|    }
_ZNK4Ogre13VertexElement7getSizeEv:
  109|  2.67k|    {
  110|  2.67k|        return getTypeSize(mType);
  111|  2.67k|    }
_ZN4Ogre13VertexElement11getTypeSizeENS_17VertexElementTypeE:
  114|  2.67k|    {
  115|  2.67k|        switch(etype)
  ------------------
  |  Branch (115:16): [True: 2.64k, False: 30]
  ------------------
  116|  2.67k|        {
  117|     33|        case VET_FLOAT1:
  ------------------
  |  Branch (117:9): [True: 33, False: 2.64k]
  ------------------
  118|     33|            return sizeof(float);
  119|     38|        case VET_FLOAT2:
  ------------------
  |  Branch (119:9): [True: 38, False: 2.63k]
  ------------------
  120|     38|            return sizeof(float)*2;
  121|  1.22k|        case VET_FLOAT3:
  ------------------
  |  Branch (121:9): [True: 1.22k, False: 1.44k]
  ------------------
  122|  1.22k|            return sizeof(float)*3;
  123|     56|        case VET_FLOAT4:
  ------------------
  |  Branch (123:9): [True: 56, False: 2.61k]
  ------------------
  124|     56|            return sizeof(float)*4;
  125|      6|        case VET_DOUBLE1:
  ------------------
  |  Branch (125:9): [True: 6, False: 2.66k]
  ------------------
  126|      6|            return sizeof(double);
  127|      0|        case VET_DOUBLE2:
  ------------------
  |  Branch (127:9): [True: 0, False: 2.67k]
  ------------------
  128|      0|            return sizeof(double)*2;
  129|      0|        case VET_DOUBLE3:
  ------------------
  |  Branch (129:9): [True: 0, False: 2.67k]
  ------------------
  130|      0|            return sizeof(double)*3;
  131|      1|        case VET_DOUBLE4:
  ------------------
  |  Branch (131:9): [True: 1, False: 2.67k]
  ------------------
  132|      1|            return sizeof(double)*4;
  133|      0|        case VET_SHORT1:
  ------------------
  |  Branch (133:9): [True: 0, False: 2.67k]
  ------------------
  134|      4|        case VET_USHORT1:
  ------------------
  |  Branch (134:9): [True: 4, False: 2.67k]
  ------------------
  135|      5|        case VET_HALF1:
  ------------------
  |  Branch (135:9): [True: 1, False: 2.67k]
  ------------------
  136|      5|            return sizeof( short );
  137|      5|        case VET_SHORT2:
  ------------------
  |  Branch (137:9): [True: 5, False: 2.66k]
  ------------------
  138|     11|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (138:9): [True: 6, False: 2.66k]
  ------------------
  139|     23|        case VET_USHORT2:
  ------------------
  |  Branch (139:9): [True: 12, False: 2.66k]
  ------------------
  140|     26|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (140:9): [True: 3, False: 2.67k]
  ------------------
  141|     52|        case VET_HALF2:
  ------------------
  |  Branch (141:9): [True: 26, False: 2.64k]
  ------------------
  142|     52|            return sizeof( short ) * 2;
  143|      1|        case VET_SHORT3:
  ------------------
  |  Branch (143:9): [True: 1, False: 2.67k]
  ------------------
  144|      6|        case VET_USHORT3:
  ------------------
  |  Branch (144:9): [True: 5, False: 2.66k]
  ------------------
  145|      7|        case VET_HALF3:
  ------------------
  |  Branch (145:9): [True: 1, False: 2.67k]
  ------------------
  146|      7|            return sizeof( short ) * 3;
  147|    447|        case VET_SHORT4:
  ------------------
  |  Branch (147:9): [True: 447, False: 2.22k]
  ------------------
  148|    455|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (148:9): [True: 8, False: 2.66k]
  ------------------
  149|    456|        case VET_USHORT4:
  ------------------
  |  Branch (149:9): [True: 1, False: 2.67k]
  ------------------
  150|    456|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (150:9): [True: 0, False: 2.67k]
  ------------------
  151|    573|        case VET_HALF4:
  ------------------
  |  Branch (151:9): [True: 117, False: 2.55k]
  ------------------
  152|    573|            return sizeof( short ) * 4;
  153|      3|        case VET_INT1:
  ------------------
  |  Branch (153:9): [True: 3, False: 2.67k]
  ------------------
  154|     19|        case VET_UINT1:
  ------------------
  |  Branch (154:9): [True: 16, False: 2.65k]
  ------------------
  155|     19|            return sizeof( int );
  156|      3|        case VET_INT2:
  ------------------
  |  Branch (156:9): [True: 3, False: 2.67k]
  ------------------
  157|      8|        case VET_UINT2:
  ------------------
  |  Branch (157:9): [True: 5, False: 2.66k]
  ------------------
  158|      8|            return sizeof( int ) * 2;
  159|      1|        case VET_INT3:
  ------------------
  |  Branch (159:9): [True: 1, False: 2.67k]
  ------------------
  160|      1|        case VET_UINT3:
  ------------------
  |  Branch (160:9): [True: 0, False: 2.67k]
  ------------------
  161|      1|            return sizeof( int ) * 3;
  162|      3|        case VET_INT4:
  ------------------
  |  Branch (162:9): [True: 3, False: 2.67k]
  ------------------
  163|      3|        case VET_UINT4:
  ------------------
  |  Branch (163:9): [True: 0, False: 2.67k]
  ------------------
  164|      3|            return sizeof( int ) * 4;
  165|     17|        case VET_BYTE4:
  ------------------
  |  Branch (165:9): [True: 17, False: 2.65k]
  ------------------
  166|     24|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (166:9): [True: 7, False: 2.66k]
  ------------------
  167|     32|        case VET_UBYTE4:
  ------------------
  |  Branch (167:9): [True: 8, False: 2.66k]
  ------------------
  168|    573|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (168:9): [True: 541, False: 2.13k]
  ------------------
  169|    613|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (169:9): [True: 40, False: 2.63k]
  ------------------
  170|    613|            return sizeof(char)*4;
  171|      3|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (171:9): [True: 3, False: 2.67k]
  ------------------
  172|      3|            return 4;
  173|  2.67k|        }
  174|     30|        return 0;
  175|  2.67k|    }
_ZN4Ogre13VertexElement12getTypeCountENS_17VertexElementTypeE:
  178|  7.02k|    {
  179|  7.02k|        switch (etype)
  ------------------
  |  Branch (179:17): [True: 7.02k, False: 1]
  ------------------
  180|  7.02k|        {
  181|    229|        case VET_FLOAT1:
  ------------------
  |  Branch (181:9): [True: 229, False: 6.79k]
  ------------------
  182|    229|        case VET_SHORT1:
  ------------------
  |  Branch (182:9): [True: 0, False: 7.02k]
  ------------------
  183|    256|        case VET_USHORT1:
  ------------------
  |  Branch (183:9): [True: 27, False: 6.99k]
  ------------------
  184|  1.01k|        case VET_UINT1:
  ------------------
  |  Branch (184:9): [True: 763, False: 6.26k]
  ------------------
  185|  1.03k|        case VET_INT1:
  ------------------
  |  Branch (185:9): [True: 20, False: 7.00k]
  ------------------
  186|  1.07k|        case VET_DOUBLE1:
  ------------------
  |  Branch (186:9): [True: 34, False: 6.99k]
  ------------------
  187|  1.08k|        case VET_HALF1:
  ------------------
  |  Branch (187:9): [True: 7, False: 7.01k]
  ------------------
  188|  1.08k|            return 1;
  189|     32|        case VET_FLOAT2:
  ------------------
  |  Branch (189:9): [True: 32, False: 6.99k]
  ------------------
  190|     77|        case VET_SHORT2:
  ------------------
  |  Branch (190:9): [True: 45, False: 6.98k]
  ------------------
  191|    233|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (191:9): [True: 156, False: 6.87k]
  ------------------
  192|    281|        case VET_USHORT2:
  ------------------
  |  Branch (192:9): [True: 48, False: 6.97k]
  ------------------
  193|    304|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (193:9): [True: 23, False: 7.00k]
  ------------------
  194|    310|        case VET_UINT2:
  ------------------
  |  Branch (194:9): [True: 6, False: 7.02k]
  ------------------
  195|    342|        case VET_INT2:
  ------------------
  |  Branch (195:9): [True: 32, False: 6.99k]
  ------------------
  196|    342|        case VET_DOUBLE2:
  ------------------
  |  Branch (196:9): [True: 0, False: 7.02k]
  ------------------
  197|    549|        case VET_HALF2:
  ------------------
  |  Branch (197:9): [True: 207, False: 6.81k]
  ------------------
  198|    549|            return 2;
  199|      0|        case VET_FLOAT3:
  ------------------
  |  Branch (199:9): [True: 0, False: 7.02k]
  ------------------
  200|      7|        case VET_SHORT3:
  ------------------
  |  Branch (200:9): [True: 7, False: 7.01k]
  ------------------
  201|     23|        case VET_USHORT3:
  ------------------
  |  Branch (201:9): [True: 16, False: 7.01k]
  ------------------
  202|     23|        case VET_UINT3:
  ------------------
  |  Branch (202:9): [True: 0, False: 7.02k]
  ------------------
  203|     23|        case VET_INT3:
  ------------------
  |  Branch (203:9): [True: 0, False: 7.02k]
  ------------------
  204|     23|        case VET_DOUBLE3:
  ------------------
  |  Branch (204:9): [True: 0, False: 7.02k]
  ------------------
  205|     34|        case VET_HALF3:
  ------------------
  |  Branch (205:9): [True: 11, False: 7.01k]
  ------------------
  206|     34|            return 3;
  207|      0|        case VET_FLOAT4:
  ------------------
  |  Branch (207:9): [True: 0, False: 7.02k]
  ------------------
  208|  3.73k|        case VET_SHORT4:
  ------------------
  |  Branch (208:9): [True: 3.73k, False: 3.28k]
  ------------------
  209|  3.77k|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (209:9): [True: 34, False: 6.99k]
  ------------------
  210|  3.78k|        case VET_USHORT4:
  ------------------
  |  Branch (210:9): [True: 11, False: 7.01k]
  ------------------
  211|  3.78k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (211:9): [True: 0, False: 7.02k]
  ------------------
  212|  3.78k|        case VET_UINT4:
  ------------------
  |  Branch (212:9): [True: 0, False: 7.02k]
  ------------------
  213|  3.78k|        case VET_INT4:
  ------------------
  |  Branch (213:9): [True: 3, False: 7.02k]
  ------------------
  214|  3.78k|        case VET_DOUBLE4:
  ------------------
  |  Branch (214:9): [True: 0, False: 7.02k]
  ------------------
  215|  3.92k|        case VET_BYTE4:
  ------------------
  |  Branch (215:9): [True: 135, False: 6.89k]
  ------------------
  216|  4.04k|        case VET_UBYTE4:
  ------------------
  |  Branch (216:9): [True: 123, False: 6.90k]
  ------------------
  217|  4.10k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (217:9): [True: 56, False: 6.97k]
  ------------------
  218|  4.13k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (218:9): [True: 31, False: 6.99k]
  ------------------
  219|  5.20k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (219:9): [True: 1.07k, False: 5.95k]
  ------------------
  220|  5.23k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (220:9): [True: 28, False: 6.99k]
  ------------------
  221|  5.36k|        case VET_HALF4:
  ------------------
  |  Branch (221:9): [True: 132, False: 6.89k]
  ------------------
  222|  5.36k|            return 4;
  223|  7.02k|        }
  224|  7.02k|        OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid type", 
  225|  7.02k|            "VertexElement::getTypeCount");
  226|  7.02k|    }
_ZN4Ogre13VertexElement17multiplyTypeCountENS_17VertexElementTypeEt:
  230|    104|    {
  231|    104|        OgreAssert(count > 0 && count < 5, "Count out of range");
  ------------------
  |  Branch (231:9): [True: 104, False: 0]
  |  Branch (231:9): [True: 92, False: 12]
  ------------------
  232|       |
  233|     92|        switch (baseType)
  234|     92|        {
  235|     92|        case VET_FLOAT1:
  ------------------
  |  Branch (235:9): [True: 92, False: 0]
  ------------------
  236|     92|        case VET_DOUBLE1:
  ------------------
  |  Branch (236:9): [True: 0, False: 92]
  ------------------
  237|     92|        case VET_INT1:
  ------------------
  |  Branch (237:9): [True: 0, False: 92]
  ------------------
  238|     92|        case VET_UINT1:
  ------------------
  |  Branch (238:9): [True: 0, False: 92]
  ------------------
  239|     92|        case VET_HALF1:
  ------------------
  |  Branch (239:9): [True: 0, False: 92]
  ------------------
  240|       |            // evil enumeration arithmetic
  241|     92|            return static_cast<VertexElementType>( baseType + count - 1 );
  242|       |
  243|      0|        case VET_SHORT1:
  ------------------
  |  Branch (243:9): [True: 0, False: 92]
  ------------------
  244|      0|        case VET_SHORT2:
  ------------------
  |  Branch (244:9): [True: 0, False: 92]
  ------------------
  245|      0|            if ( count <= 2 )
  ------------------
  |  Branch (245:18): [True: 0, False: 0]
  ------------------
  246|      0|            {
  247|      0|                return VET_SHORT2;
  248|      0|            }
  249|      0|            return VET_SHORT4;
  250|       |
  251|      0|        case VET_USHORT1:
  ------------------
  |  Branch (251:9): [True: 0, False: 92]
  ------------------
  252|      0|        case VET_USHORT2:
  ------------------
  |  Branch (252:9): [True: 0, False: 92]
  ------------------
  253|      0|            if ( count <= 2 )
  ------------------
  |  Branch (253:18): [True: 0, False: 0]
  ------------------
  254|      0|            {
  255|      0|                return VET_USHORT2;
  256|      0|            }
  257|      0|            return VET_USHORT4;
  258|       |
  259|      0|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (259:9): [True: 0, False: 92]
  ------------------
  260|      0|            if ( count <= 2 )
  ------------------
  |  Branch (260:18): [True: 0, False: 0]
  ------------------
  261|      0|            {
  262|      0|                return VET_SHORT2_NORM;
  263|      0|            }
  264|      0|            return VET_SHORT4_NORM;
  265|       |
  266|      0|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (266:9): [True: 0, False: 92]
  ------------------
  267|      0|            if ( count <= 2 )
  ------------------
  |  Branch (267:18): [True: 0, False: 0]
  ------------------
  268|      0|            {
  269|      0|                return VET_USHORT2_NORM;
  270|      0|            }
  271|      0|            return VET_USHORT4_NORM;
  272|       |
  273|      0|        case VET_BYTE4:
  ------------------
  |  Branch (273:9): [True: 0, False: 92]
  ------------------
  274|      0|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (274:9): [True: 0, False: 92]
  ------------------
  275|      0|        case VET_UBYTE4:
  ------------------
  |  Branch (275:9): [True: 0, False: 92]
  ------------------
  276|      0|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (276:9): [True: 0, False: 92]
  ------------------
  277|      0|            return baseType;
  278|       |
  279|      0|        default:
  ------------------
  |  Branch (279:9): [True: 0, False: 92]
  ------------------
  280|      0|            break;
  281|     92|        }
  282|     92|        OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid base type", 
  283|     92|            "VertexElement::multiplyTypeCount");
  284|     92|    }
_ZN4Ogre13VertexElement11getBaseTypeENS_17VertexElementTypeE:
  296|  7.03k|    {
  297|  7.03k|        switch (multiType)
  ------------------
  |  Branch (297:17): [True: 7.03k, False: 1]
  ------------------
  298|  7.03k|        {
  299|    229|            case VET_FLOAT1:
  ------------------
  |  Branch (299:13): [True: 229, False: 6.81k]
  ------------------
  300|    261|            case VET_FLOAT2:
  ------------------
  |  Branch (300:13): [True: 32, False: 7.00k]
  ------------------
  301|    263|            case VET_FLOAT3:
  ------------------
  |  Branch (301:13): [True: 2, False: 7.03k]
  ------------------
  302|    263|            case VET_FLOAT4:
  ------------------
  |  Branch (302:13): [True: 0, False: 7.03k]
  ------------------
  303|    263|                return VET_FLOAT1;
  304|      7|            case VET_HALF1:
  ------------------
  |  Branch (304:13): [True: 7, False: 7.03k]
  ------------------
  305|    214|            case VET_HALF2:
  ------------------
  |  Branch (305:13): [True: 207, False: 6.83k]
  ------------------
  306|    225|            case VET_HALF3:
  ------------------
  |  Branch (306:13): [True: 11, False: 7.02k]
  ------------------
  307|    358|            case VET_HALF4:
  ------------------
  |  Branch (307:13): [True: 133, False: 6.90k]
  ------------------
  308|    358|                return VET_HALF1;
  309|     35|            case VET_DOUBLE1:
  ------------------
  |  Branch (309:13): [True: 35, False: 7.00k]
  ------------------
  310|     36|            case VET_DOUBLE2:
  ------------------
  |  Branch (310:13): [True: 1, False: 7.03k]
  ------------------
  311|     36|            case VET_DOUBLE3:
  ------------------
  |  Branch (311:13): [True: 0, False: 7.03k]
  ------------------
  312|     36|            case VET_DOUBLE4:
  ------------------
  |  Branch (312:13): [True: 0, False: 7.03k]
  ------------------
  313|     36|                return VET_DOUBLE1;
  314|     20|            case VET_INT1:
  ------------------
  |  Branch (314:13): [True: 20, False: 7.01k]
  ------------------
  315|     52|            case VET_INT2:
  ------------------
  |  Branch (315:13): [True: 32, False: 7.00k]
  ------------------
  316|     52|            case VET_INT3:
  ------------------
  |  Branch (316:13): [True: 0, False: 7.03k]
  ------------------
  317|     55|            case VET_INT4:
  ------------------
  |  Branch (317:13): [True: 3, False: 7.03k]
  ------------------
  318|     55|                return VET_INT1;
  319|    763|            case VET_UINT1:
  ------------------
  |  Branch (319:13): [True: 763, False: 6.27k]
  ------------------
  320|    769|            case VET_UINT2:
  ------------------
  |  Branch (320:13): [True: 6, False: 7.03k]
  ------------------
  321|    770|            case VET_UINT3:
  ------------------
  |  Branch (321:13): [True: 1, False: 7.03k]
  ------------------
  322|    770|            case VET_UINT4:
  ------------------
  |  Branch (322:13): [True: 0, False: 7.03k]
  ------------------
  323|    770|                return VET_UINT1;
  324|      1|            case VET_SHORT1:
  ------------------
  |  Branch (324:13): [True: 1, False: 7.03k]
  ------------------
  325|     46|            case VET_SHORT2:
  ------------------
  |  Branch (325:13): [True: 45, False: 6.99k]
  ------------------
  326|     54|            case VET_SHORT3:
  ------------------
  |  Branch (326:13): [True: 8, False: 7.03k]
  ------------------
  327|  3.79k|            case VET_SHORT4:
  ------------------
  |  Branch (327:13): [True: 3.73k, False: 3.30k]
  ------------------
  328|  3.79k|                return VET_SHORT1;
  329|     27|            case VET_USHORT1:
  ------------------
  |  Branch (329:13): [True: 27, False: 7.01k]
  ------------------
  330|     75|            case VET_USHORT2:
  ------------------
  |  Branch (330:13): [True: 48, False: 6.99k]
  ------------------
  331|     92|            case VET_USHORT3:
  ------------------
  |  Branch (331:13): [True: 17, False: 7.02k]
  ------------------
  332|    103|            case VET_USHORT4:
  ------------------
  |  Branch (332:13): [True: 11, False: 7.02k]
  ------------------
  333|    103|                return VET_USHORT1;
  334|    156|            case VET_SHORT2_NORM:
  ------------------
  |  Branch (334:13): [True: 156, False: 6.88k]
  ------------------
  335|    191|            case VET_SHORT4_NORM:
  ------------------
  |  Branch (335:13): [True: 35, False: 7.00k]
  ------------------
  336|    191|                return VET_SHORT2_NORM;
  337|     24|            case VET_USHORT2_NORM:
  ------------------
  |  Branch (337:13): [True: 24, False: 7.01k]
  ------------------
  338|     24|            case VET_USHORT4_NORM:
  ------------------
  |  Branch (338:13): [True: 0, False: 7.03k]
  ------------------
  339|     24|                return VET_USHORT2_NORM;
  340|    136|            case VET_BYTE4:
  ------------------
  |  Branch (340:13): [True: 136, False: 6.90k]
  ------------------
  341|    136|                return VET_BYTE4;
  342|     56|            case VET_BYTE4_NORM:
  ------------------
  |  Branch (342:13): [True: 56, False: 6.98k]
  ------------------
  343|     56|                return VET_BYTE4_NORM;
  344|    123|            case VET_UBYTE4:
  ------------------
  |  Branch (344:13): [True: 123, False: 6.91k]
  ------------------
  345|    123|                return VET_UBYTE4;
  346|     32|            case VET_UBYTE4_NORM:
  ------------------
  |  Branch (346:13): [True: 32, False: 7.00k]
  ------------------
  347|  1.10k|            case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (347:13): [True: 1.07k, False: 5.96k]
  ------------------
  348|  1.10k|                return VET_UBYTE4_NORM;
  349|     28|            case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (349:13): [True: 28, False: 7.01k]
  ------------------
  350|     28|                return VET_INT_10_10_10_2_NORM;
  351|  7.03k|        };
  352|       |        // To keep compiler happy
  353|      1|        return VET_FLOAT1;
  354|  7.03k|    }
_ZN4Ogre17VertexDeclarationC2Ev:
  357|  18.6k|    {
  358|  18.6k|    }
_ZN4Ogre17VertexDeclarationD2Ev:
  361|  17.7k|    {
  362|  17.7k|    }
_ZNK4Ogre17VertexDeclaration11getElementsEv:
  365|     30|    {
  366|     30|        return mElementList;
  367|     30|    }
_ZN4Ogre17VertexDeclaration10addElementEtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  372|  15.5k|    {
  373|  15.5k|        mElementList.push_back(VertexElement(source, offset, theType, semantic, index));
  374|  15.5k|        notifyChanged();
  375|  15.5k|        return mElementList.back();
  376|  15.5k|    }
_ZN4Ogre17VertexDeclaration13modifyElementEttmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  444|     30|    {
  445|       |        assert(elem_index < mElementList.size() && "Index out of bounds");
  446|     30|        VertexElementList::iterator i = mElementList.begin();
  447|     30|        std::advance(i, elem_index);
  448|     30|        (*i) = VertexElement(source, offset, theType, semantic, index);
  449|     30|        notifyChanged();
  450|     30|    }
_ZNK4Ogre17VertexDeclaration21findElementBySemanticENS_21VertexElementSemanticEt:
  454|    753|    {
  455|    753|        for (auto& e : mElementList)
  ------------------
  |  Branch (455:22): [True: 649, False: 741]
  ------------------
  456|    649|        {
  457|    649|            if (e.getSemantic() == sem && e.getIndex() == index)
  ------------------
  |  Branch (457:17): [True: 31, False: 618]
  |  Branch (457:43): [True: 12, False: 19]
  ------------------
  458|     12|            {
  459|     12|                return &e;
  460|     12|            }
  461|    649|        }
  462|       |
  463|    741|        return NULL;
  464|    753|    }
_ZNK4Ogre17VertexDeclaration20findElementsBySourceEt:
  468|  1.21k|    {
  469|  1.21k|        VertexElementList retList;
  470|  1.21k|        for (auto& e : mElementList)
  ------------------
  |  Branch (470:22): [True: 2.52k, False: 1.21k]
  ------------------
  471|  2.52k|        {
  472|  2.52k|            if (e.getSource() == source)
  ------------------
  |  Branch (472:17): [True: 1.33k, False: 1.18k]
  ------------------
  473|  1.33k|            {
  474|  1.33k|                retList.push_back(e);
  475|  1.33k|            }
  476|  2.52k|        }
  477|  1.21k|        return retList;
  478|  1.21k|    }
_ZNK4Ogre17VertexDeclaration13getVertexSizeEt:
  482|  2.58k|    {
  483|  2.58k|        size_t sz = 0;
  484|  2.58k|        for (auto& e : mElementList)
  ------------------
  |  Branch (484:22): [True: 7.95k, False: 2.58k]
  ------------------
  485|  7.95k|        {
  486|  7.95k|            if (e.getSource() == source)
  ------------------
  |  Branch (486:17): [True: 2.67k, False: 5.28k]
  ------------------
  487|  2.67k|            {
  488|  2.67k|                sz += e.getSize();
  489|       |
  490|  2.67k|            }
  491|  7.95k|        }
  492|  2.58k|        return sz;
  493|  2.58k|    }
_ZN4Ogre19VertexBufferBindingC2Ev:
  676|  18.6k|    VertexBufferBinding::VertexBufferBinding() : mHighIndex(0)
  677|  18.6k|    {
  678|  18.6k|    }
_ZN4Ogre19VertexBufferBindingD2Ev:
  681|  17.7k|    {
  682|  17.7k|        unsetAllBindings();
  683|  17.7k|    }
_ZN4Ogre19VertexBufferBinding10setBindingEtRKNS_9SharedPtrINS_20HardwareVertexBufferEEE:
  686|  2.53k|    {
  687|       |        // NB will replace any existing buffer ptr at this index, and will thus cause
  688|       |        // reference count to decrement on that buffer (possibly destroying it)
  689|  2.53k|        mBindingMap[index] = buffer;
  690|  2.53k|        mHighIndex = std::max(mHighIndex, (unsigned short)(index+1));
  691|  2.53k|    }
_ZN4Ogre19VertexBufferBinding16unsetAllBindingsEv:
  706|  17.7k|    {
  707|  17.7k|        mBindingMap.clear();
  708|  17.7k|        mHighIndex = 0;
  709|  17.7k|    }
_ZNK4Ogre19VertexBufferBinding11getBindingsEv:
  713|  17.4k|    {
  714|  17.4k|        return mBindingMap;
  715|  17.4k|    }
_ZNK4Ogre19VertexBufferBinding9getBufferEt:
  718|     11|    {
  719|     11|        VertexBufferBindingMap::const_iterator i = mBindingMap.find(index);
  720|     11|        if (i == mBindingMap.end())
  ------------------
  |  Branch (720:13): [True: 9, False: 2]
  ------------------
  721|      9|        {
  722|      9|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "No buffer is bound to that index.",
  723|      9|                "VertexBufferBinding::getBuffer");
  724|      9|        }
  725|      2|        return i->second;
  726|     11|    }

_ZN4Ogre11LodStrategyC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   35|      4|        : mName(name)
   36|      4|    { }
_ZNK4Ogre11LodStrategy18transformUserValueEf:
   42|     37|    {
   43|       |        // No transformation by default
   44|     37|        return userValue;
   45|     37|    }

_ZN4Ogre18LodStrategyManager12getSingletonEv:
   43|  12.9k|    {
   44|       |        assert( msSingleton );  return ( *msSingleton );
   45|  12.9k|    }
_ZN4Ogre18LodStrategyManagerC2Ev:
   48|      1|    {
   49|       |        // Add distance strategies for bounding box and bounding sphere
   50|      1|        LodStrategy *strategy = OGRE_NEW DistanceLodBoxStrategy();
   51|      1|        addStrategy(strategy);
   52|      1|        strategy = OGRE_NEW DistanceLodSphereStrategy();
   53|      1|        addStrategy(strategy);
   54|       |
   55|       |        // Set the default strategy to distance_sphere
   56|      1|        setDefaultStrategy(strategy);
   57|       |
   58|       |        // Add pixel-count strategies (internally based on bounding sphere)
   59|      1|        strategy = OGRE_NEW AbsolutePixelCountLodStrategy();
   60|      1|        addStrategy(strategy);
   61|       |        strategy = OGRE_NEW ScreenRatioPixelCountLodStrategy();
   62|      1|        addStrategy(strategy);
   63|      1|    }
_ZN4Ogre18LodStrategyManager11addStrategyEPNS_11LodStrategyE:
   72|      4|    {
   73|       |        // Check for invalid strategy name
   74|      4|        if (strategy->getName() == "default")
  ------------------
  |  Branch (74:13): [True: 0, False: 4]
  ------------------
   75|      4|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Lod strategy name must not be \"default\".", "LodStrategyManager::addStrategy");
   76|       |
   77|       |        // Insert the strategy into the map with its name as the key
   78|      4|        mStrategies.insert(std::make_pair(strategy->getName(), strategy));
   79|      4|    }
_ZN4Ogre18LodStrategyManager11getStrategyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  110|  7.10k|    {
  111|       |        // If name is "default", return the default strategy instead of performing a lookup
  112|  7.10k|        if (name == "default") {
  ------------------
  |  Branch (112:13): [True: 18, False: 7.09k]
  ------------------
  113|     18|            return getDefaultStrategy();
  114|  7.09k|        } else if (name == "Distance") {
  ------------------
  |  Branch (114:20): [True: 88, False: 7.00k]
  ------------------
  115|     88|            return getStrategy("distance_box"); // Backward compatibility for loading old meshes.
  116|  7.00k|        } else if (name == "PixelCount") {
  ------------------
  |  Branch (116:20): [True: 1, False: 7.00k]
  ------------------
  117|      1|            return getStrategy("pixel_count"); // Backward compatibility for loading old meshes.
  118|      1|        }
  119|       |        // Find strategy with specified name
  120|  7.00k|        StrategyMap::iterator it = mStrategies.find(name);
  121|       |
  122|       |        // If not found, return null
  123|  7.00k|        if (it == mStrategies.end())
  ------------------
  |  Branch (123:13): [True: 6.87k, False: 125]
  ------------------
  124|  6.87k|            return 0;
  125|       |
  126|       |        // Otherwise, return the strategy
  127|    125|        return it->second;
  128|  7.00k|    }
_ZN4Ogre18LodStrategyManager18setDefaultStrategyEPNS_11LodStrategyE:
  131|      1|    {
  132|      1|        mDefaultStrategy = strategy;
  133|      1|    }
_ZN4Ogre18LodStrategyManager18getDefaultStrategyEv:
  142|  5.91k|    {
  143|  5.91k|        return mDefaultStrategy;
  144|  5.91k|    }

_ZN4Ogre3LogC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbb:
   52|      1|        mLogLevel(LML_NORMAL), mDebugOut(debuggerOutput),
   53|      1|        mSuppressFile(suppressFile), mTimeStamp(true), mLogName(name), mTermHasColours(false)
   54|      1|    {
   55|      1|        if (!mSuppressFile)
  ------------------
  |  Branch (55:13): [True: 0, False: 1]
  ------------------
   56|      0|        {
   57|      0|            mLog.open(name.c_str());
   58|       |
   59|       |#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
   60|       |            // Register log file to be collected by Windows Error Reporting
   61|       |            const int utf16Length = ::MultiByteToWideChar(CP_ACP, 0, name.c_str(), (int)name.size(), NULL, 0);
   62|       |            if(utf16Length > 0)
   63|       |            {
   64|       |                std::wstring wname;
   65|       |                wname.resize(utf16Length);
   66|       |                if (0 != ::MultiByteToWideChar(CP_ACP, 0, name.c_str(), (int)name.size(), &wname[0], (int)wname.size()))
   67|       |                    WerRegisterFile(wname.c_str(), WerRegFileTypeOther, WER_FILE_ANONYMOUS_DATA);
   68|       |            }
   69|       |#endif
   70|      0|        }
   71|       |
   72|      1|#if OGRE_PLATFORM != OGRE_PLATFORM_WINRT
   73|      1|        char* val = getenv("OGRE_MIN_LOGLEVEL");
   74|      1|        int min_lml;
   75|      1|        if(val && StringConverter::parse(val, min_lml))
  ------------------
  |  Branch (75:12): [True: 0, False: 1]
  |  Branch (75:12): [True: 0, False: 1]
  |  Branch (75:19): [True: 0, False: 0]
  ------------------
   76|      0|            setMinLogLevel(LogMessageLevel(min_lml));
   77|       |
   78|      1|        if(mDebugOut)
  ------------------
  |  Branch (78:12): [True: 0, False: 1]
  ------------------
   79|      0|        {
   80|      0|            val = getenv("TERM");
   81|      0|            mTermHasColours = val && String(val).find("xterm") != String::npos;
  ------------------
  |  Branch (81:31): [True: 0, False: 0]
  |  Branch (81:38): [True: 0, False: 0]
  ------------------
   82|      0|        }
   83|      1|#endif
   84|      1|    }
_ZN4Ogre3Log10logMessageERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_15LogMessageLevelEb:
   97|  27.0k|    {
   98|  27.0k|        OGRE_LOCK_AUTO_MUTEX;
   99|  27.0k|        if (lml >= mLogLevel)
  ------------------
  |  Branch (99:13): [True: 10.5k, False: 16.5k]
  ------------------
  100|  10.5k|        {
  101|  10.5k|            bool skipThisMessage = false;
  102|  10.5k|            for(auto & l : mListeners)
  ------------------
  |  Branch (102:26): [True: 0, False: 10.5k]
  ------------------
  103|      0|                l->messageLogged( message, lml, maskDebug, mLogName, skipThisMessage);
  104|       |            
  105|  10.5k|            if (!skipThisMessage)
  ------------------
  |  Branch (105:17): [True: 10.5k, False: 0]
  ------------------
  106|  10.5k|            {
  107|  10.5k|                if (mDebugOut && !maskDebug)
  ------------------
  |  Branch (107:21): [True: 0, False: 10.5k]
  |  Branch (107:34): [True: 0, False: 0]
  ------------------
  108|      0|                {
  109|       |#    if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT) && OGRE_DEBUG_MODE
  110|       |                    OutputDebugStringA("Ogre: ");
  111|       |                    OutputDebugStringA(message.c_str());
  112|       |                    OutputDebugStringA("\n");
  113|       |#    endif
  114|       |
  115|      0|                    std::ostream& os = int(lml) >= int(LML_WARNING) ? std::cerr : std::cout;
  ------------------
  |  Branch (115:40): [True: 0, False: 0]
  ------------------
  116|       |
  117|      0|                    if(mTermHasColours) {
  ------------------
  |  Branch (117:24): [True: 0, False: 0]
  ------------------
  118|      0|                        if(lml == LML_WARNING)
  ------------------
  |  Branch (118:28): [True: 0, False: 0]
  ------------------
  119|      0|                            os << YELLOW;
  120|      0|                        if(lml == LML_CRITICAL)
  ------------------
  |  Branch (120:28): [True: 0, False: 0]
  ------------------
  121|      0|                            os << RED;
  122|      0|                    }
  123|       |
  124|      0|                    os << message;
  125|       |
  126|      0|                    if(mTermHasColours) {
  ------------------
  |  Branch (126:24): [True: 0, False: 0]
  ------------------
  127|      0|                        os << RESET;
  128|      0|                    }
  129|       |
  130|      0|                    os << std::endl;
  131|      0|                }
  132|       |
  133|       |                // Write time into log
  134|  10.5k|                if (!mSuppressFile)
  ------------------
  |  Branch (134:21): [True: 0, False: 10.5k]
  ------------------
  135|      0|                {
  136|      0|                    if (mTimeStamp)
  ------------------
  |  Branch (136:25): [True: 0, False: 0]
  ------------------
  137|      0|                    {
  138|      0|                        auto t = std::time(nullptr);
  139|      0|                        auto pTime = std::localtime(&t);
  140|      0|                        mLog << std::put_time(pTime, "%H:%M:%S: ");
  141|      0|                    }
  142|      0|                    mLog << message << std::endl;
  143|       |
  144|       |                    // Flush stcmdream to ensure it is written (incase of a crash, we need log to be up to date)
  145|      0|                    mLog.flush();
  146|      0|                }
  147|  10.5k|            }
  148|  10.5k|        }
  149|  27.0k|    }
_ZN4Ogre3Log14setMinLogLevelENS_15LogMessageLevelE:
  173|      1|    {
  174|      1|        OGRE_LOCK_AUTO_MUTEX;
  175|      1|        mLogLevel = lml;
  176|      1|    }
_ZN4Ogre3Log6streamENS_15LogMessageLevelEb:
  196|  22.1k|    {
  197|  22.1k|        return Stream(this, lml, maskDebug);
  198|       |
  199|  22.1k|    }

_ZN4Ogre10LogManager12getSingletonEv:
   39|  27.0k|    {  
   40|       |        assert( msSingleton );  return ( *msSingleton );  
   41|  27.0k|    }
_ZN4Ogre10LogManagerC2Ev:
   44|      1|    {
   45|       |        mDefaultLog = NULL;
   46|      1|    }
_ZN4Ogre10LogManager9createLogERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbb:
   61|      1|    {
   62|      1|        OGRE_LOCK_AUTO_MUTEX;
   63|       |
   64|      1|        Log* newLog = OGRE_NEW Log(name, debuggerOutput, suppressFileOutput);
   65|       |
   66|      1|        if( !mDefaultLog || defaultLog )
  ------------------
  |  Branch (66:13): [True: 1, False: 0]
  |  Branch (66:29): [True: 0, False: 0]
  ------------------
   67|      1|        {
   68|      1|            mDefaultLog = newLog;
   69|      1|        }
   70|       |
   71|      1|        mLogs.emplace(name, newLog);
   72|       |
   73|      1|        return newLog;
   74|      1|    }
_ZN4Ogre10LogManager10logMessageERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_15LogMessageLevelEb:
  125|  4.88k|    {
  126|  4.88k|        OGRE_LOCK_AUTO_MUTEX;
  127|  4.88k|        if (mDefaultLog)
  ------------------
  |  Branch (127:13): [True: 4.88k, False: 0]
  ------------------
  128|  4.88k|        {
  129|  4.88k|            mDefaultLog->logMessage(message, lml, maskDebug);
  130|  4.88k|        }
  131|  4.88k|    }
_ZN4Ogre10LogManager8logErrorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  134|  10.5k|    {
  135|  10.5k|        stream(LML_CRITICAL, maskDebug) << "Error: " << message;
  136|  10.5k|    }
_ZN4Ogre10LogManager10logWarningERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  139|    764|    {
  140|    764|        stream(LML_WARNING, maskDebug) << "Warning: " << message;
  141|    764|    }
_ZN4Ogre10LogManager14setMinLogLevelENS_15LogMessageLevelE:
  155|      1|    {
  156|      1|        OGRE_LOCK_AUTO_MUTEX;
  157|      1|        if (mDefaultLog)
  ------------------
  |  Branch (157:13): [True: 1, False: 0]
  ------------------
  158|      1|        {
  159|      1|            mDefaultLog->setMinLogLevel(lml);
  160|      1|        }
  161|      1|    }
_ZN4Ogre10LogManager6streamENS_15LogMessageLevelEb:
  164|  22.1k|    {
  165|  22.1k|            OGRE_LOCK_AUTO_MUTEX;
  166|  22.1k|        OgreAssert(mDefaultLog, "Default log not found");
  ------------------
  |  Branch (166:9): [True: 0, False: 22.1k]
  ------------------
  167|  22.1k|        return mDefaultLog->stream(lml, maskDebug);
  168|  22.1k|    }

_ZN4Ogre8MaterialC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   39|      3|        :Resource(creator, name, handle, group, false, NULL),
   40|      3|         mReceiveShadows(true),
   41|      3|         mTransparencyCastsShadows(false),
   42|      3|         mCompilationRequired(true)
   43|      3|    {
   44|       |        // Override isManual, not applicable for Material (we always want to call loadImpl)
   45|      3|        if(isManual)
  ------------------
  |  Branch (45:12): [True: 0, False: 3]
  ------------------
   46|      0|        {
   47|      0|            LogManager::getSingleton().logWarning("Material " + name +
   48|      0|                " was requested with isManual=true, but this is not applicable " 
   49|      0|                "for materials; the flag has been reset to false");
   50|      0|        }
   51|       |
   52|       |        // Initialise to default strategy
   53|      3|        mLodStrategy = LodStrategyManager::getSingleton().getDefaultStrategy();
   54|       |
   55|      3|        mLodValues.push_back(0.0f);
   56|       |
   57|      3|        applyDefaults();
   58|       |
   59|       |        /* For consistency with StringInterface, but we don't add any parameters here
   60|       |        That's because the Resource implementation of StringInterface is to
   61|       |        list all the options that need to be set before loading, of which 
   62|       |        we have none as such. Full details can be set through scripts.
   63|       |        */ 
   64|      3|        createParamDictionary("Material");
   65|      3|    }
_ZN4Ogre8MaterialaSERKS0_:
   76|      2|    {
   77|      2|        if (this == &rhs)
  ------------------
  |  Branch (77:13): [True: 0, False: 2]
  ------------------
   78|      0|            return *this;
   79|       |
   80|      2|        Resource::operator=(rhs);
   81|      2|        mReceiveShadows = rhs.mReceiveShadows;
   82|      2|        mTransparencyCastsShadows = rhs.mTransparencyCastsShadows;
   83|       |
   84|       |        // Copy Techniques
   85|      2|        this->removeAllTechniques();
   86|      2|        for(auto *t : rhs.mTechniques)
  ------------------
  |  Branch (86:21): [True: 2, False: 2]
  ------------------
   87|      2|        {
   88|      2|            Technique* tech = this->createTechnique();
   89|      2|            *tech = *t;
   90|      2|            if (t->isSupported())
  ------------------
  |  Branch (90:17): [True: 0, False: 2]
  ------------------
   91|      0|            {
   92|      0|                insertSupportedTechnique(tech);
   93|      0|            }
   94|      2|        }
   95|       |
   96|       |        // Also copy LOD information
   97|      2|        mUserLodValues = rhs.mUserLodValues;
   98|      2|        mLodValues = rhs.mLodValues;
   99|      2|        mLodStrategy = rhs.mLodStrategy;
  100|      2|        mCompilationRequired = rhs.mCompilationRequired;
  101|       |
  102|       |        // creating techniques moves us into unloaded state
  103|       |        // insertSupportedTechnique is equivalent to prepare
  104|      2|        if(rhs.isLoaded())
  ------------------
  |  Branch (104:12): [True: 0, False: 2]
  ------------------
  105|      0|            load();
  106|       |
  107|      2|        return *this;
  108|      2|    }
_ZN4Ogre8Material13applyDefaultsEv:
  217|      3|    {
  218|      3|        MaterialPtr defaults = MaterialManager::getSingleton().getDefaultSettings();
  219|       |
  220|      3|        if (defaults)
  ------------------
  |  Branch (220:13): [True: 2, False: 1]
  ------------------
  221|      2|        {
  222|       |            // save name & handle
  223|      2|            String savedName = mName;
  224|      2|            String savedGroup = mGroup;
  225|      2|            ResourceHandle savedHandle = mHandle;
  226|      2|            *this = *defaults;
  227|       |            // restore name & handle
  228|      2|            mName = savedName;
  229|      2|            mHandle = savedHandle;
  230|      2|            mGroup = savedGroup;
  231|      2|        }
  232|      3|        _notifyNeedsRecompile();
  233|       |
  234|      3|    }
_ZN4Ogre8Material15createTechniqueEv:
  237|      3|    {
  238|       |        Technique *t = OGRE_NEW Technique(this);
  239|      3|        mTechniques.push_back(t);
  240|      3|        _notifyNeedsRecompile();
  241|      3|        return t;
  242|      3|    }
_ZN4Ogre8Material19removeAllTechniquesEv:
  367|      2|    {
  368|      2|        for (auto *t : mTechniques)
  ------------------
  |  Branch (368:22): [True: 0, False: 2]
  ------------------
  369|      0|        {
  370|       |            OGRE_DELETE t;
  371|      0|        }
  372|      2|        mTechniques.clear();
  373|      2|        clearBestTechniqueList();
  374|      2|    }
_ZN4Ogre8Material22clearBestTechniqueListEv:
  437|      2|    {
  438|      2|        mSupportedTechniques.clear();
  439|      2|        mBestTechniquesBySchemeList.clear();
  440|      2|        _notifyNeedsRecompile();
  441|      2|    }
_ZN4Ogre8Material18setLightingEnabledEb:
  493|      1|    void Material::setLightingEnabled(bool enabled) { ALL_TECHNIQUES(setLightingEnabled(enabled)); }
  ------------------
  |  |  443|      1|    #define ALL_TECHNIQUES(fncall) for(auto t : mTechniques) t->fncall
  |  |  ------------------
  |  |  |  Branch (443:47): [True: 1, False: 1]
  |  |  ------------------
  ------------------
_ZN4Ogre8Material21_notifyNeedsRecompileEv:
  534|      8|    {
  535|      8|        mCompilationRequired = true;
  536|       |        // Also need to unload to ensure we loaded any new items
  537|      8|        if (isLoaded()) // needed to stop this being called in 'loading' state
  ------------------
  |  Branch (537:13): [True: 0, False: 8]
  ------------------
  538|      0|            unload();
  539|      8|    }
_ZN4Ogre8Material14setLodStrategyEPNS_11LodStrategyE:
  579|      1|    {
  580|      1|        mLodStrategy = lodStrategy;
  581|       |
  582|      1|        assert(mLodValues.size());
  583|      1|        mLodValues[0] = mLodStrategy->getBaseValue();
  584|       |
  585|       |        // Re-transform all user LOD values (starting at index 1, no need to transform base value)
  586|      1|        for (size_t i = 1; i < mUserLodValues.size(); ++i)
  ------------------
  |  Branch (586:28): [True: 0, False: 1]
  ------------------
  587|      0|            mLodValues[i] = mLodStrategy->transformUserValue(mUserLodValues[i]);
  588|      1|    }

_ZN4Ogre15MaterialManager15getSingletonPtrEv:
   40|      2|    {
   41|      2|        return msSingleton;
   42|      2|    }
_ZN4Ogre15MaterialManager12getSingletonEv:
   44|  4.88k|    {
   45|       |        assert( msSingleton );  return ( *msSingleton );
   46|  4.88k|    }
_ZN4Ogre15MaterialManagerC2Ev:
   50|      1|    {
   51|       |        // Loading order
   52|      1|        mLoadOrder = 100.0f;
   53|       |        // Scripting is supported by this manager
   54|       |
   55|       |        // Resource type
   56|      1|        mResourceType = "Material";
   57|       |
   58|       |        // Register with resource group manager
   59|      1|        ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
   60|       |
   61|       |        // Default scheme
   62|      1|        mActiveSchemeIndex = 0;
   63|      1|        mActiveSchemeName = MSN_DEFAULT;
   64|      1|        mSchemes[mActiveSchemeName] = 0;
   65|       |
   66|      1|    }
_ZN4Ogre15MaterialManager10createImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmS9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   83|      3|    {
   84|       |        return OGRE_NEW Material(this, name, handle, group, isManual, loader);
   85|      3|    }
_ZN4Ogre15MaterialManager6createERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   90|      3|    {
   91|      3|        return static_pointer_cast<Material>(createResource(name,group,isManual,loader,createParams));
   92|      3|    }
_ZNK4Ogre15MaterialManager9getByNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   95|  4.87k|    {
   96|  4.87k|        return static_pointer_cast<Material>(getResourceByName(name, groupName));
   97|  4.87k|    }
_ZN4Ogre15MaterialManager10initialiseEv:
  111|      1|    {
  112|       |        // Set up default material - don't use name constructor as we want to avoid applying defaults
  113|      1|        mDefaultSettings = create("DefaultSettings", ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
  114|       |        // Add a single technique and pass, non-programmable
  115|      1|        mDefaultSettings->createTechnique()->createPass();
  116|       |
  117|       |        // Set the default LOD strategy
  118|      1|        mDefaultSettings->setLodStrategy(LodStrategyManager::getSingleton().getDefaultStrategy());
  119|       |
  120|       |        // Set up a lit base white material
  121|      1|        create("BaseWhite", ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
  122|       |        // Set up an unlit base white material
  123|      1|        MaterialPtr baseWhiteNoLighting = create("BaseWhiteNoLighting",
  124|      1|        ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
  125|      1|        baseWhiteNoLighting->setLightingEnabled(false);
  126|       |
  127|      1|    }
_ZN4Ogre15MaterialManager38_notifyBeforeIlluminationPassesClearedEPNS_9TechniqueE:
  273|      2|	{
  274|       |		// First, check the scheme specific listeners
  275|      2|		ListenerMap::iterator it = mListenerMap.find(mActiveSchemeName);
  276|      2|		if(it != mListenerMap.end())
  ------------------
  |  Branch (276:6): [True: 0, False: 2]
  ------------------
  277|      0|		{
  278|      0|			ListenerList& listenerList = it->second;
  279|      0|			for(auto & i : listenerList)
  ------------------
  |  Branch (279:17): [True: 0, False: 0]
  ------------------
  280|      0|			{
  281|      0|				bool handled = i->beforeIlluminationPassesCleared(tech);
  282|      0|				if(handled)
  ------------------
  |  Branch (282:8): [True: 0, False: 0]
  ------------------
  283|      0|					return;
  284|      0|			}
  285|      0|		}
  286|       |
  287|       |		//If no success, check generic listeners
  288|      2|		it = mListenerMap.find(BLANKSTRING);
  289|      2|		if(it != mListenerMap.end())
  ------------------
  |  Branch (289:6): [True: 0, False: 2]
  ------------------
  290|      0|		{
  291|      0|			ListenerList& listenerList = it->second;
  292|      0|			for(auto & i : listenerList)
  ------------------
  |  Branch (292:17): [True: 0, False: 0]
  ------------------
  293|      0|			{
  294|      0|				bool handled = i->beforeIlluminationPassesCleared(tech);
  295|      0|				if(handled)
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|					return;
  297|      0|			}
  298|      0|		}
  299|      2|	}

_ZN4Ogre4Math22boundingRadiusFromAABBERKNS_14AxisAlignedBoxE:
  762|    661|    {
  763|    661|        const Vector3& max = aabb.getMaximum();
  764|    661|        const Vector3& min = aabb.getMinimum();
  765|       |
  766|    661|        Vector3 magnitude = max;
  767|    661|        magnitude.makeCeil(-max);
  768|    661|        magnitude.makeCeil(min);
  769|    661|        magnitude.makeCeil(-min);
  770|       |
  771|    661|        return magnitude.length();
  772|    661|    }

_ZN4Ogre4MeshC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   45|  2.27k|        : Resource(creator, name, handle, group, isManual, loader),
   46|  2.27k|        mBoundRadius(0.0f),
   47|  2.27k|        mBoneBoundingRadius(0.0f),
   48|  2.27k|        mBoneAssignmentsOutOfDate(false),
   49|  2.27k|        mLodStrategy(LodStrategyManager::getSingleton().getDefaultStrategy()),
   50|  2.27k|        mHasManualLodLevel(false),
   51|  2.27k|        mNumLods(1),
   52|  2.27k|        mBufferManager(0),
   53|  2.27k|        mVertexBufferUsage(HBU_GPU_ONLY),
   54|  2.27k|        mIndexBufferUsage(HBU_GPU_ONLY),
   55|  2.27k|        mVertexBufferShadowBuffer(false),
   56|  2.27k|        mIndexBufferShadowBuffer(false),
   57|  2.27k|        mPreparedForShadowVolumes(false),
   58|  2.27k|        mEdgeListsBuilt(false),
   59|  2.27k|        mAutoBuildEdgeLists(false), // will be set to true by serializers of 1.20 and below
   60|  2.27k|        mSharedVertexDataAnimationType(VAT_NONE),
   61|  2.27k|        mSharedVertexDataAnimationIncludesNormals(false),
   62|  2.27k|        mAnimationTypesDirty(true),
   63|  2.27k|        mPosesIncludeNormals(false),
   64|  2.27k|        sharedVertexData(0)
   65|  2.27k|    {
   66|       |        // Init first (manual) lod
   67|  2.27k|        MeshLodUsage lod;
   68|  2.27k|        lod.userValue = 0; // User value not used for base LOD level
   69|  2.27k|        lod.value = getLodStrategy()->getBaseValue();
   70|       |        lod.edgeData = NULL;
   71|  2.27k|        lod.manualMesh.reset();
   72|  2.27k|        mMeshLodUsageList.push_back(lod);
   73|  2.27k|    }
_ZN4Ogre4MeshD2Ev:
   76|  2.27k|    {
   77|  2.27k|        if (!HardwareBufferManager::getSingletonPtr()) // LogManager might be also gone already
  ------------------
  |  Branch (77:13): [True: 0, False: 2.27k]
  ------------------
   78|      0|        {
   79|      0|            printf("ERROR: '%s' is being destroyed after HardwareBufferManager. This is a bug in user code.\n", mName.c_str());
   80|      0|            OgreAssertDbg(false,  "Mesh destroyed after HardwareBufferManager"); // assert in debug mode
   81|      0|            return; // try not to crash
   82|      0|        }
   83|       |        // have to call this here reather than in Resource destructor
   84|       |        // since calling virtual methods in base destructors causes crash
   85|  2.27k|        unload();
   86|  2.27k|    }
_ZN4Ogre4Mesh24getHardwareBufferManagerEv:
   89|  2.61k|    {
   90|  2.61k|        return mBufferManager ? mBufferManager : HardwareBufferManager::getSingletonPtr();
  ------------------
  |  Branch (90:16): [True: 0, False: 2.61k]
  ------------------
   91|  2.61k|    }
_ZN4Ogre4Mesh13createSubMeshEv:
   94|  4.87k|    {
   95|  4.87k|        SubMesh* sub = OGRE_NEW SubMesh();
   96|  4.87k|        sub->parent = this;
   97|       |
   98|  4.87k|        mSubMeshList.push_back(sub);
   99|       |
  100|  4.87k|        if (isLoaded())
  ------------------
  |  Branch (100:13): [True: 0, False: 4.87k]
  ------------------
  101|      0|            _dirtyState();
  102|       |
  103|  4.87k|        return sub;
  104|  4.87k|    }
_ZN4Ogre4Mesh11nameSubMeshERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEt:
  158|  30.1k|    {
  159|  30.1k|        mSubMeshNameMap[name] = index ;
  160|  30.1k|    }
_ZN4Ogre4Mesh10_setBoundsERKNS_14AxisAlignedBoxEb:
  393|    661|    {
  394|    661|        mAABB = bounds;
  395|    661|        mBoundRadius = Math::boundingRadiusFromAABB(mAABB);
  396|       |
  397|    661|        if( mAABB.isFinite() )
  ------------------
  |  Branch (397:13): [True: 661, False: 0]
  ------------------
  398|    661|        {
  399|    661|            Vector3 max = mAABB.getMaximum();
  400|    661|            Vector3 min = mAABB.getMinimum();
  401|       |
  402|    661|            if (pad)
  ------------------
  |  Branch (402:17): [True: 0, False: 661]
  ------------------
  403|      0|            {
  404|       |                // Pad out the AABB a little, helps with most bounds tests
  405|      0|                Vector3 scaler = (max - min) * MeshManager::getSingleton().getBoundsPaddingFactor();
  406|      0|                mAABB.setExtents(min  - scaler, max + scaler);
  407|       |                // Pad out the sphere a little too
  408|      0|                mBoundRadius = mBoundRadius + (mBoundRadius * MeshManager::getSingleton().getBoundsPaddingFactor());
  409|      0|            }
  410|    661|        }
  411|    661|    }
_ZN4Ogre4Mesh24_setBoundingSphereRadiusEf:
  414|    661|    {
  415|    661|        mBoundRadius = radius;
  416|    661|    }
_ZN4Ogre4Mesh15setSkeletonNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  485|  10.7k|    {
  486|  10.7k|        if (skelName != getSkeletonName())
  ------------------
  |  Branch (486:13): [True: 10.5k, False: 236]
  ------------------
  487|  10.5k|        {
  488|  10.5k|            if (skelName.empty())
  ------------------
  |  Branch (488:17): [True: 0, False: 10.5k]
  ------------------
  489|      0|            {
  490|       |                // No skeleton
  491|      0|                mSkeleton.reset();
  492|      0|            }
  493|  10.5k|            else
  494|  10.5k|            {
  495|       |                // Load skeleton
  496|  10.5k|                try {
  497|  10.5k|                    mSkeleton = static_pointer_cast<Skeleton>(SkeletonManager::getSingleton().load(skelName, mGroup));
  498|  10.5k|                }
  499|  10.5k|                catch (...)
  500|  10.5k|                {
  501|  10.5k|                    mSkeleton.reset();
  502|       |                    // Log this error
  503|  10.5k|                    String msg = "Unable to load skeleton '";
  504|  10.5k|                    msg += skelName + "' for Mesh '" + mName + "'. This Mesh will not be animated.";
  505|  10.5k|                    LogManager::getSingleton().logError(msg);
  506|       |
  507|  10.5k|                }
  508|       |
  509|       |
  510|  10.5k|            }
  511|  10.5k|            if (isLoaded())
  ------------------
  |  Branch (511:17): [True: 0, False: 10.5k]
  ------------------
  512|      0|                _dirtyState();
  513|  10.5k|        }
  514|  10.7k|    }
_ZN4Ogre4Mesh17addBoneAssignmentERKNS_20VertexBoneAssignmentE:
  517|  1.35k|    {
  518|  1.35k|        mBoneAssignments.emplace(vertBoneAssign.vertexIndex, vertBoneAssign);
  519|  1.35k|        mBoneAssignmentsOutOfDate = true;
  520|  1.35k|    }
_ZNK4Ogre4Mesh15getSkeletonNameEv:
 1083|  10.7k|    {
 1084|  10.7k|        return mSkeleton ? mSkeleton->getName() : BLANKSTRING;
  ------------------
  |  Branch (1084:16): [True: 0, False: 10.7k]
  ------------------
 1085|  10.7k|    }
_ZN4Ogre4Mesh15createAnimationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
 2153|    743|    {
 2154|       |        // Check name not used
 2155|    743|        if (mAnimationsList.find(name) != mAnimationsList.end())
  ------------------
  |  Branch (2155:13): [True: 5, False: 738]
  ------------------
 2156|      5|        {
 2157|      5|            OGRE_EXCEPT(
 2158|      5|                Exception::ERR_DUPLICATE_ITEM,
 2159|      5|                "An animation with the name " + name + " already exists",
 2160|      5|                "Mesh::createAnimation");
 2161|      5|        }
 2162|       |
 2163|    738|        Animation* ret = OGRE_NEW Animation(name, length);
 2164|    738|        ret->_notifyContainer(this);
 2165|       |
 2166|       |        // Add to list
 2167|    738|        mAnimationsList[name] = ret;
 2168|       |
 2169|       |        // Mark animation types dirty
 2170|    738|        mAnimationTypesDirty = true;
 2171|       |
 2172|    738|        return ret;
 2173|       |
 2174|    743|    }
_ZN4Ogre4Mesh26getVertexDataByTrackHandleEt:
 2254|      1|    {
 2255|      1|        if (handle == 0)
  ------------------
  |  Branch (2255:13): [True: 1, False: 0]
  ------------------
 2256|      1|        {
 2257|      1|            return sharedVertexData;
 2258|      1|        }
 2259|      0|        else
 2260|      0|        {
 2261|      0|            return getSubMesh(handle-1)->vertexData;
 2262|      0|        }
 2263|      1|    }
_ZN4Ogre4Mesh10createPoseEtRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2266|  4.40k|    {
 2267|       |        Pose* retPose = OGRE_NEW Pose(target, name);
 2268|  4.40k|        mPoseList.push_back(retPose);
 2269|  4.40k|        return retPose;
 2270|  4.40k|    }
_ZNK4Ogre4Mesh14getLodStrategyEv:
 2340|  2.27k|    {
 2341|  2.27k|        return mLodStrategy;
 2342|  2.27k|    }
_ZN4Ogre4Mesh14setLodStrategyEPNS_11LodStrategyE:
 2346|  3.98k|    {
 2347|  3.98k|        mLodStrategy = lodStrategy;
 2348|       |
 2349|  3.98k|        assert(mMeshLodUsageList.size());
 2350|       |
 2351|       |        // Re-transform user LOD values (starting at index 1, no need to transform base value)
 2352|  3.98k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (2352:22): [True: 3.98k, False: 3.98k]
  ------------------
 2353|  3.98k|            m.value = mLodStrategy->transformUserValue(m.userValue);
 2354|       |
 2355|       |        // Rewrite first value
 2356|  3.98k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
 2357|  3.98k|    }
_ZN4Ogre4Mesh21_convertVertexElementENS_21VertexElementSemanticENS_17VertexElementTypeE:
 2361|  1.62k|    {
 2362|  1.62k|        if (sharedVertexData)
  ------------------
  |  Branch (2362:13): [True: 749, False: 878]
  ------------------
 2363|    749|            sharedVertexData->convertVertexElement(semantic, dstType);
 2364|       |
 2365|  1.62k|        for (auto s : getSubMeshes())
  ------------------
  |  Branch (2365:21): [True: 5.68k, False: 1.62k]
  ------------------
 2366|  5.68k|            if (s->vertexData)
  ------------------
  |  Branch (2366:17): [True: 4, False: 5.67k]
  ------------------
 2367|      4|                s->vertexData->convertVertexElement(semantic, dstType);
 2368|  1.62k|    }

_ZN4Ogre11MeshManager12getSingletonEv:
   58|  4.54k|    {  
   59|       |        assert( msSingleton );  return ( *msSingleton );  
   60|  4.54k|    }
_ZN4Ogre11MeshManagerC2Ev:
   63|      1|    mBoundsPaddingFactor(0.01), mListener(0)
   64|      1|    {
   65|      1|        mBlendWeightsBaseElementType = VET_FLOAT1;
   66|      1|        mPrepAllMeshesForShadowVolumes = false;
   67|       |
   68|      1|        mLoadOrder = 350.0f;
   69|      1|        mResourceType = "Mesh";
   70|       |
   71|      1|        mMeshCodec = std::make_unique<MeshCodec>();
   72|      1|        Codec::registerCodec(mMeshCodec.get());
   73|       |
   74|      1|        ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
   75|       |
   76|      1|        mPrefabLoader = std::make_unique<PrefabFactory>();
   77|      1|    }
_ZN4Ogre11MeshManager6createERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
  147|  2.27k|    {
  148|  2.27k|        return static_pointer_cast<Mesh>(createResource(name,group,isManual,loader,createParams));
  149|  2.27k|    }
_ZN4Ogre11MeshManager10createImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmS9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
  363|  2.27k|    {
  364|       |        // no use for createParams here
  365|       |        return OGRE_NEW Mesh(this, name, handle, group, isManual, loader);
  366|  2.27k|    }
_ZNK4Ogre9MeshCodec7getTypeEv:
   39|      1|        String getType() const override { return "mesh"; }

_ZN4Ogre14MeshSerializerC2Ev:
   47|  2.27k|        :mListener(0)
   48|  2.27k|    {
   49|       |        // Init implementations
   50|       |        // String identifiers have not always been 100% unified with OGRE version
   51|       |        
   52|       |        // Note MUST be added in reverse order so latest is first in the list
   53|       |
   54|       |        // This one is a little ugly, 1.10 is used for version 1.1 legacy meshes.
   55|       |        // So bump up to 1.100
   56|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   57|  2.27k|            MESH_VERSION_1_10, "[MeshSerializer_v1.100]", 
   58|  2.27k|            OGRE_NEW MeshSerializerImpl()));
   59|       |
   60|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   61|  2.27k|            MESH_VERSION_1_8, "[MeshSerializer_v1.8]", 
   62|  2.27k|            OGRE_NEW MeshSerializerImpl_v1_8()));
   63|       |
   64|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   65|  2.27k|            MESH_VERSION_1_7, "[MeshSerializer_v1.41]", 
   66|  2.27k|            OGRE_NEW MeshSerializerImpl_v1_41()));
   67|       |
   68|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   69|  2.27k|            MESH_VERSION_1_4, "[MeshSerializer_v1.40]", 
   70|  2.27k|            OGRE_NEW MeshSerializerImpl_v1_4()));
   71|       |
   72|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   73|  2.27k|            MESH_VERSION_1_0, "[MeshSerializer_v1.30]", 
   74|  2.27k|            OGRE_NEW MeshSerializerImpl_v1_3()));
   75|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   76|  2.27k|            MESH_VERSION_LEGACY, "[MeshSerializer_v1.20]", 
   77|  2.27k|            OGRE_NEW MeshSerializerImpl_v1_2()));
   78|       |
   79|  2.27k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   80|  2.27k|            MESH_VERSION_LEGACY, "[MeshSerializer_v1.10]", 
   81|  2.27k|            OGRE_NEW MeshSerializerImpl_v1_1()));
   82|       |        
   83|  2.27k|    }
_ZN4Ogre14MeshSerializerD2Ev:
   86|  2.27k|    {
   87|       |        // delete map
   88|  2.27k|        for (auto & i : mVersionData)
  ------------------
  |  Branch (88:23): [True: 15.8k, False: 2.27k]
  ------------------
   89|  15.8k|        {
   90|  15.8k|            OGRE_DELETE i;
   91|  15.8k|        }
   92|  2.27k|        mVersionData.clear();
   93|       |
   94|  2.27k|    }
_ZN4Ogre14MeshSerializer10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  138|  2.27k|    {
  139|  2.27k|        determineEndianness(stream);
  140|       |
  141|       |        // Read header and determine the version
  142|  2.27k|        unsigned short headerID;
  143|       |        
  144|       |        // Read header ID
  145|  2.27k|        readShorts(stream, &headerID, 1);
  146|       |        
  147|  2.27k|        if (headerID != HEADER_CHUNK_ID)
  ------------------
  |  Branch (147:13): [True: 0, False: 2.27k]
  ------------------
  148|      0|        {
  149|      0|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "File header not found",
  150|      0|                "MeshSerializer::importMesh");
  151|      0|        }
  152|       |        // Read version
  153|  2.27k|        String ver = readString(stream);
  154|       |        // Jump back to start
  155|  2.27k|        stream->seek(0);
  156|       |
  157|       |        // Find the implementation to use
  158|  2.27k|        MeshSerializerImpl* impl = 0;
  159|  2.27k|        for (auto & i : mVersionData)
  ------------------
  |  Branch (159:23): [True: 7.18k, False: 16]
  ------------------
  160|  7.18k|        {
  161|  7.18k|            if (i->versionString == ver)
  ------------------
  |  Branch (161:17): [True: 2.25k, False: 4.93k]
  ------------------
  162|  2.25k|            {
  163|  2.25k|                impl = i->impl.get();
  164|  2.25k|                break;
  165|  2.25k|            }
  166|  7.18k|        }           
  167|  2.27k|        if (!impl)
  ------------------
  |  Branch (167:13): [True: 14, False: 2.25k]
  ------------------
  168|  2.27k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Cannot find serializer implementation for "
  169|  2.25k|                        "mesh version " + ver, "MeshSerializer::importMesh");
  170|       |        
  171|       |        // Call implementation
  172|  2.25k|        impl->importMesh(stream, pDest, mListener);
  173|       |        // Warn on old version of mesh
  174|  2.25k|        if (ver != mVersionData[0]->versionString)
  ------------------
  |  Branch (174:13): [True: 764, False: 1.49k]
  ------------------
  175|    764|        {
  176|    764|            LogManager::getSingleton().logWarning(pDest->getName() + " uses an old format " + ver +
  177|    764|                                                  "; upgrade with the OgreMeshUpgrader tool");
  178|    764|        }
  179|       |
  180|  2.25k|        if(mListener)
  ------------------
  |  Branch (180:12): [True: 0, False: 2.25k]
  ------------------
  181|      0|            mListener->processMeshCompleted(pDest);
  182|       |
  183|  2.25k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (183:19): [True: 0, False: 2.25k]
  ------------------
  184|  2.25k|        if (!rs || !rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_INT_10_10_10_2))
  ------------------
  |  Branch (184:13): [True: 2.25k, False: 0]
  |  Branch (184:20): [True: 0, False: 0]
  ------------------
  185|    818|        {
  186|       |            // unpacks to floats, if packed
  187|    818|            pDest->_convertVertexElement(VES_NORMAL, VET_FLOAT3);
  188|    818|            pDest->_convertVertexElement(VES_TANGENT, VET_FLOAT4);
  189|    818|        }
  190|  2.25k|    }
_ZN4Ogre15MeshVersionDataC2ENS_11MeshVersionERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPNS_18MeshSerializerImplE:
   41|  15.8k|        : version(_ver), versionString(_string), impl(_impl) {}

_ZN4Ogre18MeshSerializerImplC2Ev:
   62|  15.8k|    {
   63|       |        // Version number
   64|  15.8k|        mVersion = "[MeshSerializer_v1.100]";
   65|  15.8k|        exportedLodCount = 0;
   66|  15.8k|    }
_ZN4Ogre18MeshSerializerImplD2Ev:
   69|  15.8k|    {
   70|  15.8k|    }
_ZN4Ogre18MeshSerializerImpl10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  109|  2.25k|    {
  110|       |        // Determine endianness (must be the first thing we do!)
  111|  2.25k|        determineEndianness(stream);
  112|       |
  113|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  114|       |        enableValidation();
  115|       |#endif
  116|       |        // Check header
  117|  2.25k|        readFileHeader(stream);
  118|  2.25k|        pushInnerChunk(stream);
  119|  2.25k|        unsigned short streamID = readChunk(stream);
  120|       |
  121|  61.3k|        while(!stream->eof())
  ------------------
  |  Branch (121:15): [True: 60.2k, False: 1.10k]
  ------------------
  122|  60.2k|        {
  123|  60.2k|            switch (streamID)
  ------------------
  |  Branch (123:21): [True: 46.0k, False: 14.1k]
  ------------------
  124|  60.2k|            {
  125|  46.0k|            case M_MESH:
  ------------------
  |  Branch (125:13): [True: 46.0k, False: 14.1k]
  ------------------
  126|  46.0k|                readMesh(stream, pMesh, listener);
  127|  46.0k|                break;
  128|  60.2k|            }
  129|       |
  130|  59.0k|            streamID = readChunk(stream);
  131|  59.0k|        }
  132|  1.10k|        popInnerChunk(stream);
  133|  1.10k|    }
_ZN4Ogre18MeshSerializerImpl12readGeometryERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  600|  17.7k|    {
  601|       |
  602|  17.7k|        dest->vertexStart = 0;
  603|       |
  604|  17.7k|        unsigned int vertexCount = 0;
  605|  17.7k|        readInts(stream, &vertexCount, 1);
  606|  17.7k|        if (stream->size() < stream->tell() + vertexCount)
  ------------------
  |  Branch (606:13): [True: 17, False: 17.7k]
  ------------------
  607|  17.7k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex count exceeds remaining stream data");
  608|  17.7k|        dest->vertexCount = vertexCount;
  609|       |        // Find optional geometry streams
  610|  17.7k|        if (!stream->eof())
  ------------------
  |  Branch (610:13): [True: 17.7k, False: 1]
  ------------------
  611|  17.7k|        {
  612|  17.7k|            pushInnerChunk(stream);
  613|  17.7k|            unsigned short streamID = readChunk(stream);
  614|  36.6k|            while(!stream->eof() &&
  ------------------
  |  Branch (614:19): [True: 36.5k, False: 108]
  ------------------
  615|  36.5k|                (streamID == M_GEOMETRY_VERTEX_DECLARATION ||
  ------------------
  |  Branch (615:18): [True: 18.2k, False: 18.2k]
  ------------------
  616|  18.2k|                 streamID == M_GEOMETRY_VERTEX_BUFFER ))
  ------------------
  |  Branch (616:18): [True: 774, False: 17.4k]
  ------------------
  617|  19.0k|            {
  618|  19.0k|                switch (streamID)
  ------------------
  |  Branch (618:25): [True: 19.0k, False: 0]
  ------------------
  619|  19.0k|                {
  620|  18.2k|                case M_GEOMETRY_VERTEX_DECLARATION:
  ------------------
  |  Branch (620:17): [True: 18.2k, False: 774]
  ------------------
  621|  18.2k|                    readGeometryVertexDeclaration(stream, pMesh, dest);
  622|  18.2k|                    break;
  623|    774|                case M_GEOMETRY_VERTEX_BUFFER:
  ------------------
  |  Branch (623:17): [True: 774, False: 18.2k]
  ------------------
  624|    774|                    readGeometryVertexBuffer(stream, pMesh, dest);
  625|    774|                    break;
  626|  19.0k|                }
  627|       |                // Get next stream
  628|  18.9k|                if (!stream->eof())
  ------------------
  |  Branch (628:21): [True: 18.9k, False: 9]
  ------------------
  629|  18.9k|                {
  630|  18.9k|                    streamID = readChunk(stream);
  631|  18.9k|                }
  632|  18.9k|            }
  633|  17.5k|            if (!stream->eof())
  ------------------
  |  Branch (633:17): [True: 17.4k, False: 108]
  ------------------
  634|  17.4k|            {
  635|       |                // Backpedal back to start of non-submesh stream
  636|  17.4k|                backpedalChunkHeader(stream);
  637|  17.4k|            }
  638|  17.5k|            popInnerChunk(stream);
  639|  17.5k|        }
  640|       |
  641|       |        // Perform any necessary colour conversions from ARGB to ABGR (UBYTE4)
  642|  17.5k|        dest->convertPackedColour(_DETAIL_SWAP_RB, VET_UBYTE4_NORM);
  643|       |
  644|  17.5k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (644:19): [True: 0, False: 17.5k]
  ------------------
  645|  17.5k|        if(!rs || rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_16X3))
  ------------------
  |  Branch (645:12): [True: 17.5k, False: 0]
  |  Branch (645:19): [True: 0, False: 0]
  ------------------
  646|  17.4k|            return;
  647|       |
  648|     93|        for(auto& elem : dest->vertexDeclaration->getElements())
  ------------------
  |  Branch (648:24): [True: 0, False: 93]
  ------------------
  649|      0|        {
  650|      0|            if (elem.getType() == VET_HALF3 || elem.getType() == VET_SHORT3 || elem.getType() == VET_USHORT3)
  ------------------
  |  Branch (650:17): [True: 0, False: 0]
  |  Branch (650:48): [True: 0, False: 0]
  |  Branch (650:80): [True: 0, False: 0]
  ------------------
  651|      0|            {
  652|      0|                auto dstType = VertexElement::multiplyTypeCount(VertexElement::getBaseType(elem.getType()), 4);
  653|      0|                dest->convertVertexElement(elem.getSemantic(), dstType, elem.getIndex());
  654|      0|            }
  655|      0|        }
  656|     93|    }
_ZN4Ogre18MeshSerializerImpl29readGeometryVertexDeclarationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  660|  18.2k|    {
  661|       |        // Find optional geometry streams
  662|  18.2k|        if (!stream->eof())
  ------------------
  |  Branch (662:13): [True: 18.2k, False: 0]
  ------------------
  663|  18.2k|        {
  664|  18.2k|            pushInnerChunk(stream);
  665|  18.2k|            unsigned short streamID = readChunk(stream);
  666|  31.9k|            while(!stream->eof() &&
  ------------------
  |  Branch (666:19): [True: 31.8k, False: 59]
  ------------------
  667|  31.8k|                (streamID == M_GEOMETRY_VERTEX_ELEMENT ))
  ------------------
  |  Branch (667:17): [True: 13.6k, False: 18.2k]
  ------------------
  668|  13.6k|            {
  669|  13.6k|                switch (streamID)
  ------------------
  |  Branch (669:25): [True: 13.6k, False: 0]
  ------------------
  670|  13.6k|                {
  671|  13.6k|                case M_GEOMETRY_VERTEX_ELEMENT:
  ------------------
  |  Branch (671:17): [True: 13.6k, False: 0]
  ------------------
  672|  13.6k|                    readGeometryVertexElement(stream, pMesh, dest);
  673|  13.6k|                    break;
  674|  13.6k|                }
  675|       |                // Get next stream
  676|  13.6k|                if (!stream->eof())
  ------------------
  |  Branch (676:21): [True: 13.6k, False: 0]
  ------------------
  677|  13.6k|                {
  678|  13.6k|                    streamID = readChunk(stream);
  679|  13.6k|                }
  680|  13.6k|            }
  681|  18.2k|            if (!stream->eof())
  ------------------
  |  Branch (681:17): [True: 18.2k, False: 59]
  ------------------
  682|  18.2k|            {
  683|       |                // Backpedal back to start of non-submesh stream
  684|  18.2k|                backpedalChunkHeader(stream);
  685|  18.2k|            }
  686|  18.2k|            popInnerChunk(stream);
  687|  18.2k|        }
  688|       |
  689|  18.2k|    }
_ZN4Ogre18MeshSerializerImpl25readGeometryVertexElementERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  693|  13.6k|    {
  694|  13.6k|        unsigned short source, offset, index, tmp;
  695|  13.6k|        VertexElementType vType;
  696|  13.6k|        VertexElementSemantic vSemantic;
  697|       |        // unsigned short source;   // buffer bind source
  698|  13.6k|        readShorts(stream, &source, 1);
  699|       |        // unsigned short type;     // VertexElementType
  700|  13.6k|        readShorts(stream, &tmp, 1);
  701|  13.6k|        if(tmp == 4 || tmp == 11)
  ------------------
  |  Branch (701:12): [True: 248, False: 13.3k]
  |  Branch (701:24): [True: 115, False: 13.2k]
  ------------------
  702|    363|            vType = VET_UBYTE4_NORM;
  703|  13.2k|        else
  704|  13.2k|            vType = static_cast<VertexElementType>(tmp);
  705|       |        // unsigned short semantic; // VertexElementSemantic
  706|  13.6k|        readShorts(stream, &tmp, 1);
  707|  13.6k|        vSemantic = static_cast<VertexElementSemantic>(tmp);
  708|       |        // unsigned short offset;   // start offset in buffer in bytes
  709|  13.6k|        readShorts(stream, &offset, 1);
  710|       |        // unsigned short index;    // index of the semantic
  711|  13.6k|        readShorts(stream, &index, 1);
  712|       |
  713|  13.6k|        dest->vertexDeclaration->addElement(source, offset, vType, vSemantic, index);
  714|       |
  715|  13.6k|        if (vType == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (715:13): [True: 345, False: 13.3k]
  ------------------
  716|    345|        {
  717|    345|            LogManager::getSingleton().stream(LML_WARNING)
  718|    345|                << "Warning: VET_COLOUR_ARGB element type is deprecated and incurs conversion on load. "
  719|    345|                << "Use OgreMeshUpgrader on '" << pMesh->getName() << "' as soon as possible.";
  720|    345|        }
  721|       |
  722|  13.6k|    }
_ZN4Ogre18MeshSerializerImpl24readGeometryVertexBufferERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  726|    774|    {
  727|    774|        unsigned short bindIndex, vertexSize;
  728|       |        // unsigned short bindIndex;    // Index to bind this buffer to
  729|    774|        readShorts(stream, &bindIndex, 1);
  730|       |        // unsigned short vertexSize;   // Per-vertex size, must agree with declaration at this index
  731|    774|        readShorts(stream, &vertexSize, 1);
  732|    774|        pushInnerChunk(stream);
  733|    774|        {
  734|       |        // Check for vertex data header
  735|    774|        unsigned short headerID;
  736|    774|        headerID = readChunk(stream);
  737|    774|        if (headerID != M_GEOMETRY_VERTEX_BUFFER_DATA)
  ------------------
  |  Branch (737:13): [True: 47, False: 727]
  ------------------
  738|     47|        {
  739|     47|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Can't find vertex buffer data area",
  740|     47|                "MeshSerializerImpl::readGeometryVertexBuffer");
  741|     47|        }
  742|    727|        size_t declaredVertexSize = dest->vertexDeclaration->getVertexSize(bindIndex);
  743|    727|        if (declaredVertexSize == 0)
  ------------------
  |  Branch (743:13): [True: 30, False: 697]
  ------------------
  744|     30|        {
  745|     30|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Missing vertex declaration for buffer bind index");
  746|     30|        }
  747|       |        // Check that vertex size agrees
  748|    697|        if (declaredVertexSize != vertexSize)
  ------------------
  |  Branch (748:13): [True: 12, False: 685]
  ------------------
  749|     12|        {
  750|     12|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer vertex size does not agree with vertex declaration");
  751|     12|        }
  752|       |
  753|       |        // Create / populate vertex buffer
  754|    685|        size_t vbufBytes = dest->vertexCount * (size_t)vertexSize;
  755|    685|        if (vbufBytes / vertexSize != dest->vertexCount || stream->size() < stream->tell() + vbufBytes)
  ------------------
  |  Branch (755:13): [True: 0, False: 685]
  |  Branch (755:60): [True: 2, False: 683]
  ------------------
  756|    685|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex buffer size exceeds remaining stream data");
  757|    683|        HardwareVertexBufferSharedPtr vbuf;
  758|    683|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
  759|    683|            vertexSize,
  760|    683|            dest->vertexCount,
  761|    683|            pMesh->mVertexBufferUsage,
  762|    683|            pMesh->mVertexBufferShadowBuffer);
  763|    683|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
  764|    683|        stream->read(vbufLock.pData, vbufBytes);
  765|       |
  766|       |        // endian conversion for OSX
  767|    683|        flipFromLittleEndian(
  768|    683|            vbufLock.pData,
  769|    683|            dest->vertexCount,
  770|    683|            vertexSize,
  771|    683|            dest->vertexDeclaration->findElementsBySource(bindIndex));
  772|       |
  773|       |        // Set binding
  774|    683|        dest->vertexBufferBinding->setBinding(bindIndex, vbuf);
  775|    683|        }
  776|      0|        popInnerChunk(stream);
  777|       |
  778|    683|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshNameTableERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  781|  16.7k|    {
  782|       |        // The map for
  783|  16.7k|        std::map<unsigned short, String> subMeshNames;
  784|  16.7k|        unsigned short streamID, subMeshIndex;
  785|       |
  786|       |        // Need something to store the index, and the objects name
  787|       |        // This table is a method that imported meshes can retain their naming
  788|       |        // so that the names established in the modelling software can be used
  789|       |        // to get the sub-meshes by name. The exporter must support exporting
  790|       |        // the optional stream M_SUBMESH_NAME_TABLE.
  791|       |
  792|       |        // Read in all the sub-streams. Each sub-stream should contain an index and Ogre::String for the name.
  793|  16.7k|        if (!stream->eof())
  ------------------
  |  Branch (793:13): [True: 16.7k, False: 0]
  ------------------
  794|  16.7k|        {
  795|  16.7k|            pushInnerChunk(stream);
  796|  16.7k|            streamID = readChunk(stream);
  797|  50.1k|            while(!stream->eof() && (streamID == M_SUBMESH_NAME_TABLE_ELEMENT ))
  ------------------
  |  Branch (797:19): [True: 49.7k, False: 385]
  |  Branch (797:37): [True: 33.3k, False: 16.3k]
  ------------------
  798|  33.3k|            {
  799|       |                // Read in the index of the submesh.
  800|  33.3k|                readShorts(stream, &subMeshIndex, 1);
  801|       |                // Read in the String and map it to its index.
  802|  33.3k|                subMeshNames[subMeshIndex] = readString(stream);
  803|       |
  804|       |                // If we're not end of file get the next stream ID
  805|  33.3k|                if (!stream->eof())
  ------------------
  |  Branch (805:21): [True: 33.0k, False: 286]
  ------------------
  806|  33.0k|                    streamID = readChunk(stream);
  807|  33.3k|            }
  808|  16.7k|            if (!stream->eof())
  ------------------
  |  Branch (808:17): [True: 16.3k, False: 385]
  ------------------
  809|  16.3k|            {
  810|       |                // Backpedal back to start of stream
  811|  16.3k|                backpedalChunkHeader(stream);
  812|  16.3k|            }
  813|  16.7k|            popInnerChunk(stream);
  814|  16.7k|        }
  815|       |
  816|       |        // Set all the submeshes names
  817|       |        // ?
  818|       |        // Loop through and save out the index and names.
  819|  16.7k|        for (auto& sn : subMeshNames)
  ------------------
  |  Branch (819:23): [True: 30.1k, False: 16.7k]
  ------------------
  820|  30.1k|        {
  821|       |            // Name this submesh to the stored name.
  822|  30.1k|            pMesh->nameSubMesh(sn.second, sn.first);
  823|  30.1k|        }
  824|  16.7k|    }
_ZN4Ogre18MeshSerializerImpl8readMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  827|  46.0k|    {
  828|       |        // Never automatically build edge lists for this version
  829|       |        // expect them in the file or not at all
  830|  46.0k|        pMesh->mAutoBuildEdgeLists = false;
  831|       |
  832|       |        // bool skeletallyAnimated
  833|  46.0k|        bool skeletallyAnimated;
  834|  46.0k|        readBools(stream, &skeletallyAnimated, 1);
  835|       |
  836|       |        // Find all substreams
  837|  46.0k|        if (!stream->eof())
  ------------------
  |  Branch (837:13): [True: 46.0k, False: 0]
  ------------------
  838|  46.0k|        {
  839|  46.0k|            pushInnerChunk(stream);
  840|  46.0k|            unsigned short streamID = readChunk(stream);
  841|   127k|            while(!stream->eof() &&
  ------------------
  |  Branch (841:19): [True: 125k, False: 1.16k]
  ------------------
  842|   125k|                (streamID == M_GEOMETRY ||
  ------------------
  |  Branch (842:18): [True: 18.6k, False: 107k]
  ------------------
  843|   107k|                 streamID == M_SUBMESH ||
  ------------------
  |  Branch (843:18): [True: 4.87k, False: 102k]
  ------------------
  844|   102k|                 streamID == M_MESH_SKELETON_LINK ||
  ------------------
  |  Branch (844:18): [True: 10.7k, False: 91.5k]
  ------------------
  845|  91.5k|                 streamID == M_MESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (845:18): [True: 1.35k, False: 90.2k]
  ------------------
  846|  90.2k|                 streamID == M_MESH_LOD_LEVEL ||
  ------------------
  |  Branch (846:18): [True: 7.23k, False: 82.9k]
  ------------------
  847|  82.9k|                 streamID == M_MESH_BOUNDS ||
  ------------------
  |  Branch (847:18): [True: 661, False: 82.3k]
  ------------------
  848|  82.3k|                 streamID == M_SUBMESH_NAME_TABLE ||
  ------------------
  |  Branch (848:18): [True: 16.7k, False: 65.5k]
  ------------------
  849|  65.5k|                 streamID == M_EDGE_LISTS ||
  ------------------
  |  Branch (849:18): [True: 62, False: 65.4k]
  ------------------
  850|  65.4k|                 streamID == M_POSES ||
  ------------------
  |  Branch (850:18): [True: 4.55k, False: 60.9k]
  ------------------
  851|  60.9k|                 streamID == M_ANIMATIONS ||
  ------------------
  |  Branch (851:18): [True: 16.8k, False: 44.1k]
  ------------------
  852|  44.1k|                 streamID == M_TABLE_EXTREMES))
  ------------------
  |  Branch (852:18): [True: 3, False: 44.1k]
  ------------------
  853|  81.7k|            {
  854|  81.7k|                switch(streamID)
  ------------------
  |  Branch (854:24): [True: 81.7k, False: 0]
  ------------------
  855|  81.7k|                {
  856|  18.6k|                case M_GEOMETRY:
  ------------------
  |  Branch (856:17): [True: 18.6k, False: 63.0k]
  ------------------
  857|  18.6k|                    pMesh->createVertexData();
  858|  18.6k|                    try {
  859|  18.6k|                        readGeometry(stream, pMesh, pMesh->sharedVertexData);
  860|  18.6k|                    }
  861|  18.6k|                    catch (ItemIdentityException&)
  862|  18.6k|                    {
  863|       |                        // duff geometry data entry with 0 vertices
  864|     77|                        pMesh->resetVertexData();
  865|       |                        // Skip this stream (pointer will have been returned to just after header)
  866|     77|                        stream->skip(mCurrentstreamLen - MSTREAM_OVERHEAD_SIZE);
  867|     77|                    }
  868|  18.6k|                    break;
  869|  4.87k|                case M_SUBMESH:
  ------------------
  |  Branch (869:17): [True: 4.87k, False: 76.8k]
  ------------------
  870|  4.87k|                    readSubMesh(stream, pMesh, listener);
  871|  4.87k|                    break;
  872|  10.7k|                case M_MESH_SKELETON_LINK:
  ------------------
  |  Branch (872:17): [True: 10.7k, False: 71.0k]
  ------------------
  873|  10.7k|                    readSkeletonLink(stream, pMesh, listener);
  874|  10.7k|                    break;
  875|  1.35k|                case M_MESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (875:17): [True: 1.35k, False: 80.4k]
  ------------------
  876|  1.35k|                    readMeshBoneAssignment(stream, pMesh);
  877|  1.35k|                    break;
  878|  7.23k|                case M_MESH_LOD_LEVEL:
  ------------------
  |  Branch (878:17): [True: 7.23k, False: 74.5k]
  ------------------
  879|  7.23k|                    readMeshLodLevel(stream, pMesh);
  880|  7.23k|                    break;
  881|    661|                case M_MESH_BOUNDS:
  ------------------
  |  Branch (881:17): [True: 661, False: 81.1k]
  ------------------
  882|    661|                    readBoundsInfo(stream, pMesh);
  883|    661|                    break;
  884|  16.7k|                case M_SUBMESH_NAME_TABLE:
  ------------------
  |  Branch (884:17): [True: 16.7k, False: 64.9k]
  ------------------
  885|  16.7k|                    readSubMeshNameTable(stream, pMesh);
  886|  16.7k|                    break;
  887|     62|                case M_EDGE_LISTS:
  ------------------
  |  Branch (887:17): [True: 62, False: 81.7k]
  ------------------
  888|     62|                    readEdgeList(stream, pMesh);
  889|     62|                    break;
  890|  4.55k|                case M_POSES:
  ------------------
  |  Branch (890:17): [True: 4.55k, False: 77.2k]
  ------------------
  891|  4.55k|                    readPoses(stream, pMesh);
  892|  4.55k|                    break;
  893|  16.8k|                case M_ANIMATIONS:
  ------------------
  |  Branch (893:17): [True: 16.8k, False: 64.9k]
  ------------------
  894|  16.8k|                    readAnimations(stream, pMesh);
  895|  16.8k|                    break;
  896|      3|                case M_TABLE_EXTREMES:
  ------------------
  |  Branch (896:17): [True: 3, False: 81.7k]
  ------------------
  897|      3|                    readExtremes(stream, pMesh);
  898|      3|                    break;
  899|  81.7k|                }
  900|       |
  901|  80.9k|                if (!stream->eof())
  ------------------
  |  Branch (901:21): [True: 80.1k, False: 790]
  ------------------
  902|  80.1k|                {
  903|  80.1k|                    streamID = readChunk(stream);
  904|  80.1k|                }
  905|       |
  906|  80.9k|            }
  907|  45.2k|            if (!stream->eof())
  ------------------
  |  Branch (907:17): [True: 44.1k, False: 1.16k]
  ------------------
  908|  44.1k|            {
  909|       |                // Backpedal back to start of stream
  910|  44.1k|                backpedalChunkHeader(stream);
  911|  44.1k|            }
  912|  45.2k|            popInnerChunk(stream);
  913|  45.2k|        }
  914|       |
  915|  46.0k|    }
_ZN4Ogre18MeshSerializerImpl11readSubMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  918|  4.87k|    {
  919|  4.87k|        unsigned short streamID;
  920|       |
  921|  4.87k|        SubMesh* sm = pMesh->createSubMesh();
  922|       |
  923|       |        // char* materialName
  924|  4.87k|        String materialName = readString(stream);
  925|  4.87k|        if(listener)
  ------------------
  |  Branch (925:12): [True: 0, False: 4.87k]
  ------------------
  926|      0|            listener->processMaterialName(pMesh, &materialName);
  927|  4.87k|        if (auto material = MaterialManager::getSingleton().getByName(materialName, pMesh->getGroup()))
  ------------------
  |  Branch (927:18): [True: 0, False: 4.87k]
  ------------------
  928|      0|        {
  929|      0|            sm->setMaterial(material);
  930|      0|        }
  931|  4.87k|        else
  932|  4.87k|        {
  933|  4.87k|            logMaterialNotFound(materialName, pMesh->getGroup(), "SubMesh of", pMesh->getName(), LML_WARNING);
  934|  4.87k|        }
  935|       |
  936|       |        // bool useSharedVertices
  937|  4.87k|        readBools(stream,&sm->useSharedVertices, 1);
  938|       |
  939|  4.87k|        sm->indexData->indexStart = 0;
  940|  4.87k|        unsigned int indexCount = 0;
  941|  4.87k|        readInts(stream, &indexCount, 1);
  942|  4.87k|        sm->indexData->indexCount = indexCount;
  943|       |
  944|  4.87k|        HardwareIndexBufferSharedPtr ibuf;
  945|       |        // bool indexes32Bit
  946|  4.87k|        bool idx32bit;
  947|  4.87k|        readBools(stream, &idx32bit, 1);
  948|  4.87k|        if (indexCount > 0)
  ------------------
  |  Branch (948:13): [True: 133, False: 4.74k]
  ------------------
  949|    133|        {
  950|  18.4E|            if (!checkStreamRemainingSize(stream, indexCount, idx32bit ? sizeof(unsigned int) : sizeof(unsigned short)))
  ------------------
  |  Branch (950:17): [True: 51, False: 82]
  |  Branch (950:63): [True: 6.55k, False: 18.4E]
  ------------------
  951|    133|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Index buffer size exceeds stream size");
  952|     82|            if (idx32bit)
  ------------------
  |  Branch (952:17): [True: 25, False: 57]
  ------------------
  953|     25|            {
  954|     25|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  955|     25|                        HardwareIndexBuffer::IT_32BIT,
  956|     25|                        sm->indexData->indexCount,
  957|     25|                        pMesh->mIndexBufferUsage,
  958|     25|                        pMesh->mIndexBufferShadowBuffer);
  959|     25|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  960|     25|                readInts(stream, static_cast<unsigned int*>(ibufLock.pData), sm->indexData->indexCount);
  961|       |
  962|     25|            }
  963|     57|            else // 16-bit
  964|     57|            {
  965|     57|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  966|     57|                        HardwareIndexBuffer::IT_16BIT,
  967|     57|                        sm->indexData->indexCount,
  968|     57|                        pMesh->mIndexBufferUsage,
  969|     57|                        pMesh->mIndexBufferShadowBuffer);
  970|     57|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  971|     57|                readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), sm->indexData->indexCount);
  972|     57|            }
  973|     82|        }
  974|  4.82k|        sm->indexData->indexBuffer = ibuf;
  975|       |
  976|  4.82k|        pushInnerChunk(stream);
  977|  4.82k|        {
  978|       |        // M_GEOMETRY stream (Optional: present only if useSharedVertices = false)
  979|  4.82k|        if (!sm->useSharedVertices)
  ------------------
  |  Branch (979:13): [True: 9, False: 4.81k]
  ------------------
  980|      9|        {
  981|      9|            streamID = readChunk(stream);
  982|      9|            if (streamID != M_GEOMETRY)
  ------------------
  |  Branch (982:17): [True: 5, False: 4]
  ------------------
  983|      5|            {
  984|      5|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Missing geometry data in mesh file",
  985|      5|                    "MeshSerializerImpl::readSubMesh");
  986|      5|            }
  987|      4|            sm->createVertexData();
  988|      4|            readGeometry(stream, pMesh, sm->vertexData);
  989|      4|        }
  990|       |
  991|       |
  992|       |        // Find all bone assignments, submesh operation, and texture aliases (if present)
  993|  4.82k|        if (!stream->eof())
  ------------------
  |  Branch (993:13): [True: 4.74k, False: 74]
  ------------------
  994|  4.74k|        {
  995|  4.74k|            streamID = readChunk(stream);
  996|  4.74k|            bool seenTexAlias = false;
  997|  4.75k|            while(!stream->eof() &&
  ------------------
  |  Branch (997:19): [True: 4.70k, False: 53]
  ------------------
  998|  4.70k|                (streamID == M_SUBMESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (998:18): [True: 1, False: 4.70k]
  ------------------
  999|  4.70k|                 streamID == M_SUBMESH_OPERATION ||
  ------------------
  |  Branch (999:18): [True: 1, False: 4.70k]
  ------------------
 1000|  4.70k|                 streamID == M_SUBMESH_TEXTURE_ALIAS))
  ------------------
  |  Branch (1000:18): [True: 7, False: 4.69k]
  ------------------
 1001|      9|            {
 1002|      9|                switch(streamID)
  ------------------
  |  Branch (1002:24): [True: 9, False: 0]
  ------------------
 1003|      9|                {
 1004|      1|                case M_SUBMESH_OPERATION:
  ------------------
  |  Branch (1004:17): [True: 1, False: 8]
  ------------------
 1005|      1|                    readSubMeshOperation(stream, pMesh, sm);
 1006|      1|                    break;
 1007|      1|                case M_SUBMESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (1007:17): [True: 1, False: 8]
  ------------------
 1008|      1|                    readSubMeshBoneAssignment(stream, pMesh, sm);
 1009|      1|                    break;
 1010|      7|                case M_SUBMESH_TEXTURE_ALIAS:
  ------------------
  |  Branch (1010:17): [True: 7, False: 2]
  ------------------
 1011|      7|                    seenTexAlias = true;
 1012|      7|                    String aliasName = readString(stream);
 1013|      7|                    String textureName = readString(stream);
 1014|      7|                    break;
 1015|      9|                }
 1016|       |
 1017|      8|                if (!stream->eof())
  ------------------
  |  Branch (1017:21): [True: 5, False: 3]
  ------------------
 1018|      5|                {
 1019|      5|                    streamID = readChunk(stream);
 1020|      5|                }
 1021|       |
 1022|      8|            }
 1023|       |
 1024|  4.74k|            if (seenTexAlias)
  ------------------
  |  Branch (1024:17): [True: 5, False: 4.74k]
  ------------------
 1025|      5|                LogManager::getSingleton().logError("texture aliases for SubMeshes are unsupported - " +
 1026|      5|                                                      stream->getName());
 1027|       |
 1028|  4.74k|            if (!stream->eof())
  ------------------
  |  Branch (1028:17): [True: 4.69k, False: 53]
  ------------------
 1029|  4.69k|            {
 1030|       |                // Backpedal back to start of stream
 1031|  4.69k|                    backpedalChunkHeader(stream);
 1032|  4.69k|                }
 1033|  4.74k|            }
 1034|  4.82k|        }
 1035|  4.82k|        popInnerChunk(stream);
 1036|       |
 1037|  4.82k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshOperationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1041|      1|    {
 1042|       |        // unsigned short operationType
 1043|      1|        unsigned short opType;
 1044|      1|        readShorts(stream, &opType, 1);
 1045|      1|        sm->operationType = static_cast<RenderOperation::OperationType>(opType);
 1046|      1|    }
_ZN4Ogre18MeshSerializerImpl16readSkeletonLinkERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 1057|  10.7k|    {
 1058|  10.7k|        String skelName = readString(stream);
 1059|       |
 1060|  10.7k|        if(listener)
  ------------------
  |  Branch (1060:12): [True: 0, False: 10.7k]
  ------------------
 1061|      0|            listener->processSkeletonName(pMesh, &skelName);
 1062|       |
 1063|  10.7k|        pMesh->setSkeletonName(skelName);
 1064|  10.7k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1107|  1.35k|    {
 1108|  1.35k|        VertexBoneAssignment assign;
 1109|       |
 1110|       |        // unsigned int vertexIndex;
 1111|  1.35k|        readInts(stream, &(assign.vertexIndex),1);
 1112|       |        // unsigned short boneIndex;
 1113|  1.35k|        readShorts(stream, &(assign.boneIndex),1);
 1114|       |        // float weight;
 1115|  1.35k|        readFloats(stream, &(assign.weight), 1);
 1116|       |
 1117|  1.35k|        pMesh->addBoneAssignment(assign);
 1118|       |
 1119|  1.35k|    }
_ZN4Ogre18MeshSerializerImpl25readSubMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1123|      1|    {
 1124|      1|        VertexBoneAssignment assign;
 1125|       |
 1126|       |        // unsigned int vertexIndex;
 1127|      1|        readInts(stream, &(assign.vertexIndex),1);
 1128|       |        // unsigned short boneIndex;
 1129|      1|        readShorts(stream, &(assign.boneIndex),1);
 1130|       |        // float weight;
 1131|      1|        readFloats(stream, &(assign.weight), 1);
 1132|       |
 1133|      1|        sub->addBoneAssignment(assign);
 1134|       |
 1135|      1|    }
_ZN4Ogre18MeshSerializerImpl14readBoundsInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1329|    661|    {
 1330|    661|        Vector3 min, max;
 1331|    661|        readFloats(stream, min.ptr(), 3);
 1332|    661|        readFloats(stream, max.ptr(), 3);
 1333|    661|        AxisAlignedBox box(min, max);
 1334|    661|        pMesh->_setBounds(box, false);
 1335|       |
 1336|    661|        float radius;
 1337|    661|        readFloats(stream, &radius, 1);
 1338|    661|        pMesh->_setBoundingSphereRadius(radius);
 1339|    661|    }
_ZN4Ogre18MeshSerializerImpl16readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1349|  3.71k|    {
 1350|       |#if OGRE_NO_MESHLOD
 1351|       |
 1352|       |        /*
 1353|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 1354|       |        // We need to walk through the data to not rely on the chunk size!
 1355|       |        stream->skip(mCurrentstreamLen);
 1356|       |
 1357|       |        // Since we got here, we have already read the chunk header.
 1358|       |        backpedalChunkHeader(stream);
 1359|       |        */
 1360|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 1361|       |        String strategyName = readString(stream);
 1362|       |        uint16 numLods;
 1363|       |        readShorts(stream, &numLods, 1);
 1364|       |        if (!checkStreamRemainingSize(stream, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 1365|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds stream size");
 1366|       |        pushInnerChunk(stream);
 1367|       |        for (int lodID = 1; lodID < numLods; lodID++){
 1368|       |            unsigned short streamID = readChunk(stream);
 1369|       |            Real usageValue;
 1370|       |            readFloats(stream, &usageValue, 1);
 1371|       |            switch (streamID){
 1372|       |            case M_MESH_LOD_MANUAL:
 1373|       |            {
 1374|       |                                      String manualName = readString(stream);
 1375|       |                                      break;
 1376|       |            }
 1377|       |            case M_MESH_LOD_GENERATED:
 1378|       |                for (int i = 0; i < numSubs; ++i)
 1379|       |                {
 1380|       |                    unsigned int numIndexes;
 1381|       |                    readInts(stream, &numIndexes, 1);
 1382|       |
 1383|       |                    unsigned int offset;
 1384|       |                    readInts(stream, &offset, 1);
 1385|       |
 1386|       |                    // For merged buffers, you can pass the index of previous Lod.
 1387|       |                    // To create buffer it should be -1.
 1388|       |                    unsigned int bufferIndex;
 1389|       |                    readInts(stream, &bufferIndex, 1);
 1390|       |                    if (bufferIndex == (unsigned int)-1) {
 1391|       |                        // generate buffers
 1392|       |
 1393|       |                        // bool indexes32Bit
 1394|       |                        bool idx32Bit;
 1395|       |                        readBools(stream, &idx32Bit, 1);
 1396|       |
 1397|       |                        unsigned int buffIndexCount;
 1398|       |                        readInts(stream, &buffIndexCount, 1);
 1399|       |
 1400|       |                        size_t buffSize = buffIndexCount * (idx32Bit ? 4 : 2);
 1401|       |                        stream->skip(buffSize);
 1402|       |                    }
 1403|       |                }
 1404|       |                break;
 1405|       |            default:
 1406|       |                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1407|       |                    "Invalid Lod Usage type in " + pMesh->getName(),
 1408|       |                    "MeshSerializerImpl::readMeshLodInfo");
 1409|       |            }
 1410|       |        }
 1411|       |        popInnerChunk(stream);
 1412|       |#else
 1413|       |        // Read the strategy to be used for this mesh
 1414|  3.71k|        String strategyName = readString(stream);
 1415|  3.71k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 1416|       |
 1417|       |        // Check that valid strategy name was given, otherwise use default
 1418|  3.71k|        if (strategy == 0)
  ------------------
  |  Branch (1418:13): [True: 3.62k, False: 91]
  ------------------
 1419|  3.62k|            strategy = LodStrategyManager::getSingleton().getDefaultStrategy();
 1420|       |
 1421|  3.71k|        pMesh->setLodStrategy(strategy);
 1422|       |
 1423|       |        // unsigned short numLevels;
 1424|  3.71k|        uint16 numLods;
 1425|  3.71k|        readShorts(stream, &numLods, 1);
 1426|  3.71k|        numLods = std::max<ushort>(numLods, 1);
 1427|       |
 1428|  3.71k|        if (!checkStreamRemainingSize(stream, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (1428:13): [True: 49, False: 3.66k]
  ------------------
 1429|  3.71k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds stream size");
 1430|       |
 1431|  3.66k|        pMesh->mNumLods = numLods;
 1432|  3.66k|        pMesh->mMeshLodUsageList.resize(pMesh->mNumLods);
 1433|  3.66k|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1433:22): [True: 0, False: 3.66k]
  ------------------
 1434|      0|        {
 1435|      0|            assert(s->mLodFaceList.empty());
 1436|      0|            s->mLodFaceList.resize(pMesh->mNumLods-1);
 1437|      0|        }
 1438|  3.66k|        pushInnerChunk(stream);
 1439|       |        // lodID=0 is the original mesh. We need to skip it.
 1440|  3.66k|        for(int lodID = 1; lodID < pMesh->mNumLods; lodID++){
  ------------------
  |  Branch (1440:28): [True: 30, False: 3.63k]
  ------------------
 1441|       |            // Read depth
 1442|     30|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[lodID];
 1443|     30|            unsigned short streamID = readChunk(stream);
 1444|     30|            readFloats(stream, &(usage.userValue), 1);
 1445|     30|            switch(streamID){
 1446|      0|            case M_MESH_LOD_MANUAL:
  ------------------
  |  Branch (1446:13): [True: 0, False: 30]
  ------------------
 1447|      0|                readMeshLodUsageManual(stream, pMesh, lodID, usage);
 1448|      0|                break;
 1449|      0|            case M_MESH_LOD_GENERATED:
  ------------------
  |  Branch (1449:13): [True: 0, False: 30]
  ------------------
 1450|      0|                readMeshLodUsageGenerated(stream, pMesh, lodID, usage);
 1451|      0|                break;
 1452|     16|            default:
  ------------------
  |  Branch (1452:13): [True: 16, False: 14]
  ------------------
 1453|     16|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1454|     30|                "Invalid Lod Usage type in " + pMesh->getName(),
 1455|     30|                    "MeshSerializerImpl::readMeshLodInfo");
 1456|     30|            }
 1457|      0|            usage.manualMesh.reset(); // will trigger load later with manual Lod
 1458|      0|            usage.edgeData = NULL;
 1459|      0|        }
 1460|  3.63k|        popInnerChunk(stream);
 1461|  3.63k|#endif
 1462|  3.63k|    }
_ZN4Ogre18MeshSerializerImpl20flipFromLittleEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1539|    683|    {
 1540|    683|        if (mFlipEndian)
  ------------------
  |  Branch (1540:13): [True: 683, False: 0]
  ------------------
 1541|    683|        {
 1542|    683|            flipEndian(pData, vertexCount, vertexSize, elems);
 1543|    683|        }
 1544|    683|    }
_ZN4Ogre18MeshSerializerImpl10flipEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1557|    683|    {
 1558|    683|        void *pBase = pData;
 1559|  6.20k|        for (size_t v = 0; v < vertexCount; ++v)
  ------------------
  |  Branch (1559:28): [True: 5.52k, False: 683]
  ------------------
 1560|  5.52k|        {
 1561|  5.52k|            for (auto& e : elems)
  ------------------
  |  Branch (1561:26): [True: 7.02k, False: 5.52k]
  ------------------
 1562|  7.02k|            {
 1563|  7.02k|                void *pElem;
 1564|       |                // re-base pointer to the element
 1565|  7.02k|                e.baseVertexPointerToElement(pBase, &pElem);
 1566|       |                // Flip the endian based on the type
 1567|  7.02k|                size_t typeSize = 0;
 1568|  7.02k|                switch (VertexElement::getBaseType(e.getType()))
 1569|  7.02k|                {
 1570|    262|                    case VET_FLOAT1:
  ------------------
  |  Branch (1570:21): [True: 262, False: 6.76k]
  ------------------
 1571|    262|                        typeSize = sizeof(float);
 1572|    262|                        break;
 1573|     34|                    case VET_DOUBLE1:
  ------------------
  |  Branch (1573:21): [True: 34, False: 6.99k]
  ------------------
 1574|     34|                        typeSize = sizeof(double);
 1575|     34|                        break;
 1576|  3.79k|                    case VET_SHORT1:
  ------------------
  |  Branch (1576:21): [True: 3.79k, False: 3.23k]
  ------------------
 1577|  3.79k|                        typeSize = sizeof(short);
 1578|  3.79k|                        break;
 1579|    102|                    case VET_USHORT1:
  ------------------
  |  Branch (1579:21): [True: 102, False: 6.92k]
  ------------------
 1580|    102|                        typeSize = sizeof(unsigned short);
 1581|    102|                        break;
 1582|     55|                    case VET_INT1:
  ------------------
  |  Branch (1582:21): [True: 55, False: 6.97k]
  ------------------
 1583|     55|                        typeSize = sizeof(int);
 1584|     55|                        break;
 1585|    769|                    case VET_UINT1:
  ------------------
  |  Branch (1585:21): [True: 769, False: 6.25k]
  ------------------
 1586|    769|                        typeSize = sizeof(unsigned int);
 1587|    769|                        break;
 1588|  1.10k|                    case VET_UBYTE4_NORM:
  ------------------
  |  Branch (1588:21): [True: 1.10k, False: 5.92k]
  ------------------
 1589|  1.22k|                    case VET_UBYTE4:
  ------------------
  |  Branch (1589:21): [True: 123, False: 6.90k]
  ------------------
 1590|  1.22k|                        typeSize = 0; // NO FLIPPING
 1591|  1.22k|                        break;
 1592|    789|                    default:
  ------------------
  |  Branch (1592:21): [True: 789, False: 6.23k]
  ------------------
 1593|    789|                        assert(false); // Should never happen
 1594|  7.02k|                };
 1595|  7.02k|				Bitwise::bswapChunks(pElem, typeSize,
 1596|  7.02k|                    VertexElement::getTypeCount(e.getType()));
 1597|  7.02k|            }
 1598|       |
 1599|  5.52k|            pBase = static_cast<void*>(
 1600|  5.52k|                static_cast<unsigned char*>(pBase) + vertexSize);
 1601|  5.52k|        }
 1602|    683|    }
_ZN4Ogre18MeshSerializerImpl12readEdgeListERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1787|     62|    {
 1788|     62|        if (!stream->eof())
  ------------------
  |  Branch (1788:13): [True: 62, False: 0]
  ------------------
 1789|     62|        {
 1790|     62|            pushInnerChunk(stream);
 1791|     62|            unsigned short streamID = readChunk(stream);
 1792|     85|            while(!stream->eof() &&
  ------------------
  |  Branch (1792:19): [True: 60, False: 25]
  ------------------
 1793|     60|                streamID == M_EDGE_LIST_LOD)
  ------------------
  |  Branch (1793:17): [True: 23, False: 37]
  ------------------
 1794|     23|            {
 1795|       |                // Process single LOD
 1796|       |
 1797|       |                // unsigned short lodIndex
 1798|     23|                unsigned short lodIndex;
 1799|     23|                readShorts(stream, &lodIndex, 1);
 1800|       |
 1801|       |                // bool isManual            // If manual, no edge data here, loaded from manual mesh
 1802|     23|                bool isManual;
 1803|     23|                readBools(stream, &isManual, 1);
 1804|       |                // Only load in non-manual levels; others will be connected up by Mesh on demand
 1805|       |#if OGRE_NO_MESHLOD
 1806|       |                // 
 1807|       |                if (!isManual)
 1808|       |                    if (lodIndex != 0) {
 1809|       |                        readEdgeListLodInfo(stream, NULL);
 1810|       |                    } else {
 1811|       |#else
 1812|     23|                if (!isManual) {
  ------------------
  |  Branch (1812:21): [True: 23, False: 0]
  ------------------
 1813|     23|#endif
 1814|     23|                    MeshLodUsage& usage = pMesh->mMeshLodUsageList.at(lodIndex);
 1815|       |
 1816|     23|                    usage.edgeData = OGRE_NEW EdgeData();
 1817|       |
 1818|       |                    // Read detail information of the edge list
 1819|     23|                    readEdgeListLodInfo(stream, usage.edgeData);
 1820|       |
 1821|       |                    // Postprocessing edge groups
 1822|     23|                    for (auto& edgeGroup : usage.edgeData->edgeGroups)
  ------------------
  |  Branch (1822:42): [True: 0, False: 23]
  ------------------
 1823|      0|                    {
 1824|       |                        // Populate edgeGroup.vertexData pointers
 1825|       |                        // If there is shared vertex data, vertexSet 0 is that,
 1826|       |                        // otherwise 0 is first dedicated
 1827|      0|                        if (pMesh->sharedVertexData)
  ------------------
  |  Branch (1827:29): [True: 0, False: 0]
  ------------------
 1828|      0|                        {
 1829|      0|                            if (edgeGroup.vertexSet == 0)
  ------------------
  |  Branch (1829:33): [True: 0, False: 0]
  ------------------
 1830|      0|                            {
 1831|      0|                                edgeGroup.vertexData = pMesh->sharedVertexData;
 1832|      0|                            }
 1833|      0|                            else
 1834|      0|                            {
 1835|      0|                                edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet - 1)->vertexData;
 1836|      0|                            }
 1837|      0|                        }
 1838|      0|                        else
 1839|      0|                        {
 1840|      0|                            edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet)->vertexData;
 1841|      0|                        }
 1842|      0|                    }
 1843|     23|                }
 1844|       |
 1845|     23|                if (!stream->eof())
  ------------------
  |  Branch (1845:21): [True: 0, False: 23]
  ------------------
 1846|      0|                {
 1847|      0|                    streamID = readChunk(stream);
 1848|      0|                }
 1849|       |
 1850|     23|            }
 1851|     62|            if (!stream->eof())
  ------------------
  |  Branch (1851:17): [True: 37, False: 25]
  ------------------
 1852|     37|            {
 1853|       |                // Backpedal back to start of stream
 1854|     37|                backpedalChunkHeader(stream);
 1855|     37|            }
 1856|     62|            popInnerChunk(stream);
 1857|     62|        }
 1858|       |
 1859|     62|        pMesh->mEdgeListsBuilt = true;
 1860|     62|    }
_ZN4Ogre18MeshSerializerImpl19readEdgeListLodInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_8EdgeDataE:
 1864|     20|    {
 1865|       |#if OGRE_NO_MESHLOD
 1866|       |        if (edgeData == NULL) { // skip it!
 1867|       |            bool isClosed;
 1868|       |            readBools(stream, &isClosed, 1);
 1869|       |            // unsigned long numTriangles
 1870|       |            uint32 numTriangles;
 1871|       |            readInts(stream, &numTriangles, 1);
 1872|       |            // unsigned long numEdgeGroups
 1873|       |            uint32 numEdgeGroups;
 1874|       |            readInts(stream, &numEdgeGroups, 1);
 1875|       |            stream->skip(numTriangles * (8 * sizeof(uint32) + 4 * sizeof(float)));
 1876|       |            pushInnerChunk(stream);
 1877|       |            for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
 1878|       |            {
 1879|       |                unsigned short streamID = readChunk(stream);
 1880|       |                if (streamID != M_EDGE_GROUP)
 1881|       |                {
 1882|       |                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1883|       |                        "Missing M_EDGE_GROUP stream",
 1884|       |                        "MeshSerializerImpl::readEdgeListLodInfo");
 1885|       |                }
 1886|       |                uint32 tmp[3];
 1887|       |                // unsigned long vertexSet
 1888|       |                readInts(stream, &tmp[0], 3);
 1889|       |                uint32 numEdges;
 1890|       |                readInts(stream, &numEdges, 1);
 1891|       |
 1892|       |                stream->skip(numEdges * (6 * sizeof(uint32) + sizeof(bool)));
 1893|       |            }
 1894|       |            popInnerChunk(stream);
 1895|       |            return;
 1896|       |        }
 1897|       |#endif
 1898|       |        // bool isClosed
 1899|     20|        readBools(stream, &edgeData->isClosed, 1);
 1900|       |        // unsigned long numTriangles
 1901|     20|        uint32 numTriangles;
 1902|     20|        readInts(stream, &numTriangles, 1);
 1903|       |        // Allocate correct amount of memory
 1904|     20|        edgeData->triangles.resize(numTriangles);
 1905|     20|        edgeData->triangleFaceNormals.resize(numTriangles);
 1906|     20|        edgeData->triangleLightFacings.resize(numTriangles);
 1907|       |        // unsigned long numEdgeGroups
 1908|     20|        uint32 numEdgeGroups;
 1909|     20|        readInts(stream, &numEdgeGroups, 1);
 1910|       |        // Allocate correct amount of memory
 1911|     20|        edgeData->edgeGroups.resize(numEdgeGroups);
 1912|       |        // Triangle* triangleList
 1913|     20|        uint32 tmp[3];
 1914|  4.81M|        for (size_t t = 0; t < numTriangles; ++t)
  ------------------
  |  Branch (1914:28): [True: 4.81M, False: 20]
  ------------------
 1915|  4.81M|        {
 1916|  4.81M|            EdgeData::Triangle& tri = edgeData->triangles[t];
 1917|       |            // unsigned long indexSet
 1918|  4.81M|            readInts(stream, tmp, 1);
 1919|  4.81M|            tri.indexSet = tmp[0];
 1920|       |            // unsigned long vertexSet
 1921|  4.81M|            readInts(stream, tmp, 1);
 1922|  4.81M|            tri.vertexSet = tmp[0];
 1923|       |            // unsigned long vertIndex[3]
 1924|  4.81M|            readInts(stream, tmp, 3);
 1925|       |
 1926|  4.81M|            tri.vertIndex[0] = tmp[0];
 1927|  4.81M|            tri.vertIndex[1] = tmp[1];
 1928|  4.81M|            tri.vertIndex[2] = tmp[2];
 1929|       |            // unsigned long sharedVertIndex[3]
 1930|  4.81M|            readInts(stream, tmp, 3);
 1931|  4.81M|            tri.sharedVertIndex[0] = tmp[0];
 1932|  4.81M|            tri.sharedVertIndex[1] = tmp[1];
 1933|  4.81M|            tri.sharedVertIndex[2] = tmp[2];
 1934|       |            // float normal[4]
 1935|  4.81M|            readFloats(stream, &(edgeData->triangleFaceNormals[t].x), 4);
 1936|       |
 1937|  4.81M|        }
 1938|     20|        pushInnerChunk(stream);
 1939|     21|        for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
  ------------------
  |  Branch (1939:29): [True: 15, False: 6]
  ------------------
 1940|     15|        {
 1941|     15|            unsigned short streamID = readChunk(stream);
 1942|     15|            if (streamID != M_EDGE_GROUP)
  ------------------
  |  Branch (1942:17): [True: 14, False: 1]
  ------------------
 1943|     14|            {
 1944|     14|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1945|     14|                    "Missing M_EDGE_GROUP stream",
 1946|     14|                    "MeshSerializerImpl::readEdgeListLodInfo");
 1947|     14|            }
 1948|      1|            EdgeData::EdgeGroup& edgeGroup = edgeData->edgeGroups[eg];
 1949|       |
 1950|       |            // unsigned long vertexSet
 1951|      1|            readInts(stream, tmp, 1);
 1952|      1|            edgeGroup.vertexSet = tmp[0];
 1953|       |            // unsigned long triStart
 1954|      1|            readInts(stream, tmp, 1);
 1955|      1|            edgeGroup.triStart = tmp[0];
 1956|       |            // unsigned long triCount
 1957|      1|            readInts(stream, tmp, 1);
 1958|      1|            edgeGroup.triCount = tmp[0];
 1959|       |            // unsigned long numEdges
 1960|      1|            uint32 numEdges;
 1961|      1|            readInts(stream, &numEdges, 1);
 1962|      1|            edgeGroup.edges.resize(numEdges);
 1963|       |            // Edge* edgeList
 1964|      1|            for (uint32 e = 0; e < numEdges; ++e)
  ------------------
  |  Branch (1964:32): [True: 0, False: 1]
  ------------------
 1965|      0|            {
 1966|      0|                EdgeData::Edge& edge = edgeGroup.edges[e];
 1967|       |                // unsigned long  triIndex[2]
 1968|      0|                readInts(stream, tmp, 2);
 1969|      0|                edge.triIndex[0] = tmp[0];
 1970|      0|                edge.triIndex[1] = tmp[1];
 1971|       |                // unsigned long  vertIndex[2]
 1972|      0|                readInts(stream, tmp, 2);
 1973|      0|                edge.vertIndex[0] = tmp[0];
 1974|      0|                edge.vertIndex[1] = tmp[1];
 1975|       |                // unsigned long  sharedVertIndex[2]
 1976|      0|                readInts(stream, tmp, 2);
 1977|      0|                edge.sharedVertIndex[0] = tmp[0];
 1978|      0|                edge.sharedVertIndex[1] = tmp[1];
 1979|       |                // bool degenerate
 1980|      0|                readBools(stream, &(edge.degenerate), 1);
 1981|      0|            }
 1982|      1|        }
 1983|      6|        popInnerChunk(stream);
 1984|      6|    }
_ZN4Ogre18MeshSerializerImpl9readPosesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2299|  4.55k|    {
 2300|       |        // Find all substreams
 2301|  4.55k|        if (!stream->eof())
  ------------------
  |  Branch (2301:13): [True: 4.55k, False: 0]
  ------------------
 2302|  4.55k|        {
 2303|  4.55k|            pushInnerChunk(stream);
 2304|  4.55k|            unsigned short streamID = readChunk(stream);
 2305|  8.85k|            while(!stream->eof() &&
  ------------------
  |  Branch (2305:19): [True: 8.78k, False: 75]
  ------------------
 2306|  8.78k|                (streamID == M_POSE))
  ------------------
  |  Branch (2306:17): [True: 4.40k, False: 4.37k]
  ------------------
 2307|  4.40k|            {
 2308|  4.40k|                switch(streamID)
  ------------------
  |  Branch (2308:24): [True: 4.40k, False: 0]
  ------------------
 2309|  4.40k|                {
 2310|  4.40k|                case M_POSE:
  ------------------
  |  Branch (2310:17): [True: 4.40k, False: 0]
  ------------------
 2311|  4.40k|                    readPose(stream, pMesh);
 2312|  4.40k|                    break;
 2313|       |
 2314|  4.40k|                }
 2315|       |
 2316|  4.30k|                if (!stream->eof())
  ------------------
  |  Branch (2316:21): [True: 4.22k, False: 74]
  ------------------
 2317|  4.22k|                {
 2318|  4.22k|                    streamID = readChunk(stream);
 2319|  4.22k|                }
 2320|       |
 2321|  4.30k|            }
 2322|  4.45k|            if (!stream->eof())
  ------------------
  |  Branch (2322:17): [True: 4.37k, False: 75]
  ------------------
 2323|  4.37k|            {
 2324|       |                // Backpedal back to start of stream
 2325|  4.37k|                backpedalChunkHeader(stream);
 2326|  4.37k|            }
 2327|  4.45k|            popInnerChunk(stream);
 2328|  4.45k|        }
 2329|  4.55k|    }
_ZN4Ogre18MeshSerializerImpl8readPoseERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2332|  2.46k|    {
 2333|       |        // char* name (may be blank)
 2334|  2.46k|        String name = readString(stream);
 2335|       |        // unsigned short target
 2336|  2.46k|        unsigned short target;
 2337|  2.46k|        readShorts(stream, &target, 1);
 2338|       |
 2339|       |        // bool includesNormals
 2340|  2.46k|        bool includesNormals;
 2341|  2.46k|        readBools(stream, &includesNormals, 1);
 2342|       |        
 2343|  2.46k|        Pose* pose = pMesh->createPose(target, name);
 2344|       |
 2345|       |        // Find all substreams
 2346|  2.46k|        if (!stream->eof())
  ------------------
  |  Branch (2346:13): [True: 2.43k, False: 30]
  ------------------
 2347|  2.43k|        {
 2348|  2.43k|            pushInnerChunk(stream);
 2349|  2.43k|            unsigned short streamID = readChunk(stream);
 2350|  6.50k|            while(!stream->eof() &&
  ------------------
  |  Branch (2350:19): [True: 6.42k, False: 80]
  ------------------
 2351|  6.42k|                (streamID == M_POSE_VERTEX))
  ------------------
  |  Branch (2351:17): [True: 4.07k, False: 2.35k]
  ------------------
 2352|  4.07k|            {
 2353|  4.07k|                switch(streamID)
  ------------------
  |  Branch (2353:24): [True: 4.07k, False: 0]
  ------------------
 2354|  4.07k|                {
 2355|  4.07k|                case M_POSE_VERTEX:
  ------------------
  |  Branch (2355:17): [True: 4.07k, False: 0]
  ------------------
 2356|       |                    // create vertex offset
 2357|  4.07k|                    uint32 vertIndex;
 2358|  4.07k|                    Vector3f offset, normal;
 2359|       |                    // unsigned long vertexIndex
 2360|  4.07k|                    readInts(stream, &vertIndex, 1);
 2361|       |                    // float xoffset, yoffset, zoffset
 2362|  4.07k|                    readFloats(stream, offset.ptr(), 3);
 2363|       |                    
 2364|  4.07k|                    if (includesNormals)
  ------------------
  |  Branch (2364:25): [True: 3.57k, False: 494]
  ------------------
 2365|  3.57k|                    {
 2366|  3.57k|                        readFloats(stream, normal.ptr(), 3);
 2367|  3.57k|                        pose->addVertex(vertIndex, offset, normal);                     
 2368|  3.57k|                    }
 2369|    494|                    else 
 2370|    494|                    {
 2371|    494|                        pose->addVertex(vertIndex, offset);
 2372|    494|                    }
 2373|       |
 2374|       |
 2375|  4.07k|                    break;
 2376|       |
 2377|  4.07k|                }
 2378|       |
 2379|  4.07k|                if (!stream->eof())
  ------------------
  |  Branch (2379:21): [True: 4.07k, False: 0]
  ------------------
 2380|  4.07k|                {
 2381|  4.07k|                    streamID = readChunk(stream);
 2382|  4.07k|                }
 2383|       |
 2384|  4.07k|            }
 2385|  2.43k|            if (!stream->eof())
  ------------------
  |  Branch (2385:17): [True: 2.35k, False: 80]
  ------------------
 2386|  2.35k|            {
 2387|       |                // Backpedal back to start of stream
 2388|  2.35k|                backpedalChunkHeader(stream);
 2389|  2.35k|            }
 2390|  2.43k|            popInnerChunk(stream);
 2391|  2.43k|        }
 2392|  2.46k|    }
_ZN4Ogre18MeshSerializerImpl14readAnimationsERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2395|  16.8k|    {
 2396|       |        // Find all substreams
 2397|  16.8k|        if (!stream->eof())
  ------------------
  |  Branch (2397:13): [True: 16.8k, False: 0]
  ------------------
 2398|  16.8k|        {
 2399|  16.8k|            pushInnerChunk(stream);
 2400|  16.8k|            unsigned short streamID = readChunk(stream);
 2401|  17.5k|            while(!stream->eof() &&
  ------------------
  |  Branch (2401:19): [True: 17.4k, False: 66]
  ------------------
 2402|  17.4k|                (streamID == M_ANIMATION))
  ------------------
  |  Branch (2402:17): [True: 743, False: 16.6k]
  ------------------
 2403|    743|            {
 2404|    743|                switch(streamID)
  ------------------
  |  Branch (2404:24): [True: 743, False: 0]
  ------------------
 2405|    743|                {
 2406|    743|                case M_ANIMATION:
  ------------------
  |  Branch (2406:17): [True: 743, False: 0]
  ------------------
 2407|    743|                    readAnimation(stream, pMesh);
 2408|    743|                    break;
 2409|       |
 2410|    743|                }
 2411|       |
 2412|    692|                if (!stream->eof())
  ------------------
  |  Branch (2412:21): [True: 642, False: 50]
  ------------------
 2413|    642|                {
 2414|    642|                    streamID = readChunk(stream);
 2415|    642|                }
 2416|       |
 2417|    692|            }
 2418|  16.7k|            if (!stream->eof())
  ------------------
  |  Branch (2418:17): [True: 16.6k, False: 66]
  ------------------
 2419|  16.6k|            {
 2420|       |                // Backpedal back to start of stream
 2421|  16.6k|                backpedalChunkHeader(stream);
 2422|  16.6k|            }
 2423|  16.7k|            popInnerChunk(stream);
 2424|  16.7k|        }
 2425|  16.8k|    }
_ZN4Ogre18MeshSerializerImpl13readAnimationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2428|    743|    {
 2429|       |        // char* name
 2430|    743|        String name = readString(stream);
 2431|       |        // float length
 2432|    743|        float len;
 2433|    743|        readFloats(stream, &len, 1);
 2434|       |
 2435|    743|        Animation* anim = pMesh->createAnimation(name, len);
 2436|       |
 2437|       |        // tracks
 2438|    743|        if (!stream->eof())
  ------------------
  |  Branch (2438:13): [True: 698, False: 45]
  ------------------
 2439|    698|        {
 2440|    698|            pushInnerChunk(stream);
 2441|    698|            unsigned short streamID = readChunk(stream);
 2442|       |            
 2443|       |            // Optional base info is possible
 2444|    698|            if (streamID == M_ANIMATION_BASEINFO)
  ------------------
  |  Branch (2444:17): [True: 291, False: 407]
  ------------------
 2445|    291|            {
 2446|       |                // char baseAnimationName
 2447|    291|                String baseAnimName = readString(stream);
 2448|       |                // float baseKeyFrameTime
 2449|    291|                float baseKeyTime;
 2450|    291|                readFloats(stream, &baseKeyTime, 1);
 2451|       |                
 2452|    291|                anim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
 2453|       |                
 2454|    291|                if (!stream->eof())
  ------------------
  |  Branch (2454:21): [True: 284, False: 7]
  ------------------
 2455|    284|                {
 2456|       |                    // Get next stream
 2457|    284|                    streamID = readChunk(stream);
 2458|    284|                }
 2459|    291|            }
 2460|       |            
 2461|    698|            while(!stream->eof() &&
  ------------------
  |  Branch (2461:19): [True: 647, False: 51]
  ------------------
 2462|    647|                streamID == M_ANIMATION_TRACK)
  ------------------
  |  Branch (2462:17): [True: 5, False: 642]
  ------------------
 2463|      5|            {
 2464|      5|                switch(streamID)
  ------------------
  |  Branch (2464:24): [True: 5, False: 0]
  ------------------
 2465|      5|                {
 2466|      5|                case M_ANIMATION_TRACK:
  ------------------
  |  Branch (2466:17): [True: 5, False: 0]
  ------------------
 2467|      5|                    readAnimationTrack(stream, anim, pMesh);
 2468|      5|                    break;
 2469|      5|                };
 2470|      0|                if (!stream->eof())
  ------------------
  |  Branch (2470:21): [True: 0, False: 0]
  ------------------
 2471|      0|                {
 2472|      0|                    streamID = readChunk(stream);
 2473|      0|                }
 2474|       |
 2475|      0|            }
 2476|    693|            if (!stream->eof())
  ------------------
  |  Branch (2476:17): [True: 642, False: 51]
  ------------------
 2477|    642|            {
 2478|       |                // Backpedal back to start of stream
 2479|    642|                backpedalChunkHeader(stream);
 2480|    642|            }
 2481|    693|            popInnerChunk(stream);
 2482|    693|        }
 2483|    743|    }
_ZN4Ogre18MeshSerializerImpl18readAnimationTrackERKNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_4MeshE:
 2487|      5|    {
 2488|       |        // ushort type
 2489|      5|        uint16 inAnimType;
 2490|      5|        readShorts(stream, &inAnimType, 1);
 2491|      5|        VertexAnimationType animType = (VertexAnimationType)inAnimType;
 2492|       |
 2493|       |        // unsigned short target
 2494|      5|        uint16 target;
 2495|      5|        readShorts(stream, &target, 1);
 2496|       |
 2497|      5|        if (target > pMesh->getNumSubMeshes())
  ------------------
  |  Branch (2497:13): [True: 4, False: 1]
  ------------------
 2498|      5|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid target for vertex animation track");
 2499|       |
 2500|      1|        VertexData* vdata = pMesh->getVertexDataByTrackHandle(target);
 2501|      1|        if (!vdata)
  ------------------
  |  Branch (2501:13): [True: 1, False: 0]
  ------------------
 2502|      1|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track references target with no vertex data");
 2503|      0|        VertexAnimationTrack* track = anim->createVertexTrack(target, vdata, animType);
 2504|       |
 2505|       |        // keyframes
 2506|      0|        if (!stream->eof())
  ------------------
  |  Branch (2506:13): [True: 0, False: 0]
  ------------------
 2507|      0|        {
 2508|      0|            pushInnerChunk(stream);
 2509|      0|            unsigned short streamID = readChunk(stream);
 2510|      0|            while(!stream->eof() &&
  ------------------
  |  Branch (2510:19): [True: 0, False: 0]
  ------------------
 2511|      0|                (streamID == M_ANIMATION_MORPH_KEYFRAME ||
  ------------------
  |  Branch (2511:18): [True: 0, False: 0]
  ------------------
 2512|      0|                 streamID == M_ANIMATION_POSE_KEYFRAME))
  ------------------
  |  Branch (2512:18): [True: 0, False: 0]
  ------------------
 2513|      0|            {
 2514|      0|                switch(streamID)
  ------------------
  |  Branch (2514:24): [True: 0, False: 0]
  ------------------
 2515|      0|                {
 2516|      0|                case M_ANIMATION_MORPH_KEYFRAME:
  ------------------
  |  Branch (2516:17): [True: 0, False: 0]
  ------------------
 2517|      0|                    readMorphKeyFrame(stream, pMesh, track);
 2518|      0|                    break;
 2519|      0|                case M_ANIMATION_POSE_KEYFRAME:
  ------------------
  |  Branch (2519:17): [True: 0, False: 0]
  ------------------
 2520|      0|                    readPoseKeyFrame(stream, track);
 2521|      0|                    break;
 2522|      0|                };
 2523|      0|                if (!stream->eof())
  ------------------
  |  Branch (2523:21): [True: 0, False: 0]
  ------------------
 2524|      0|                {
 2525|      0|                    streamID = readChunk(stream);
 2526|      0|                }
 2527|       |
 2528|      0|            }
 2529|      0|            if (!stream->eof())
  ------------------
  |  Branch (2529:17): [True: 0, False: 0]
  ------------------
 2530|      0|            {
 2531|       |                // Backpedal back to start of stream
 2532|      0|                backpedalChunkHeader(stream);
 2533|      0|            }
 2534|      0|            popInnerChunk(stream);
 2535|      0|        }
 2536|       |
 2537|      0|    }
_ZN4Ogre18MeshSerializerImpl12readExtremesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2610|      3|    {
 2611|      3|        unsigned short idx;
 2612|      3|        readShorts(stream, &idx, 1);
 2613|       |        
 2614|      3|        SubMesh *sm = pMesh->getSubMeshes().at(idx);
 2615|       |
 2616|      3|        const size_t minChunkSize = MSTREAM_OVERHEAD_SIZE + sizeof(unsigned short);
 2617|      3|        if (mCurrentstreamLen <= minChunkSize)
  ------------------
  |  Branch (2617:13): [True: 0, False: 3]
  ------------------
 2618|      3|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Extremes chunk too small");
 2619|       |
 2620|      3|        size_t n_floats = (mCurrentstreamLen - minChunkSize) / sizeof(float);
 2621|       |
 2622|      3|        if (n_floats == 0 || n_floats % 3 != 0)
  ------------------
  |  Branch (2622:13): [True: 3, False: 0]
  |  Branch (2622:30): [True: 0, False: 0]
  ------------------
 2623|      3|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid extremes data size");
 2624|       |        
 2625|      3|        sm->extremityPoints.resize(n_floats / 3);
 2626|       |
 2627|      3|        readFloats(stream, sm->extremityPoints.front().ptr(), n_floats);
 2628|      3|    }
_ZN4Ogre23MeshSerializerImpl_v1_8C2Ev:
 2642|  13.6k|    {
 2643|       |        // Version number
 2644|  13.6k|        mVersion = "[MeshSerializer_v1.8]";
 2645|  13.6k|    }
_ZN4Ogre23MeshSerializerImpl_v1_825readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2872|      3|    {
 2873|      3|        usage.manualName = "";
 2874|      3|        usage.manualMesh.reset();
 2875|      3|        pushInnerChunk(stream);
 2876|      3|        {
 2877|       |            // Get one set of detail per SubMesh
 2878|      3|            for (auto *sm : pMesh->getSubMeshes())
  ------------------
  |  Branch (2878:27): [True: 0, False: 3]
  ------------------
 2879|      0|            {
 2880|      0|                unsigned long streamID = readChunk(stream);
 2881|      0|                if (streamID != M_MESH_LOD_GENERATED)
  ------------------
  |  Branch (2881:21): [True: 0, False: 0]
  ------------------
 2882|      0|                {
 2883|      0|                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2884|      0|                        "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 2885|      0|                        "MeshSerializerImpl::readMeshLodUsageGenerated");
 2886|      0|                }
 2887|       |
 2888|      0|                IndexData* indexData = OGRE_NEW IndexData();
 2889|      0|                sm->mLodFaceList[lodNum - 1] = indexData;
 2890|      0|                unsigned int numIndexes;
 2891|      0|                readInts(stream, &numIndexes, 1);
 2892|      0|                bool idx32Bit;
 2893|      0|                readBools(stream, &idx32Bit, 1);
 2894|       |
 2895|      0|                if (!checkStreamRemainingSize(stream, numIndexes, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (2895:21): [True: 0, False: 0]
  |  Branch (2895:67): [True: 0, False: 0]
  ------------------
 2896|      0|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds stream size");
 2897|       |
 2898|      0|                indexData->indexCount = numIndexes;
 2899|       |
 2900|      0|                if (idx32Bit)
  ------------------
  |  Branch (2900:21): [True: 0, False: 0]
  ------------------
 2901|      0|                {
 2902|      0|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2903|      0|                        HardwareIndexBuffer::IT_32BIT, indexData->indexCount,
 2904|      0|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2905|      0|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2906|      0|                    readInts(stream, static_cast<unsigned int*>(ibufLock.pData), indexData->indexCount);
 2907|      0|                }
 2908|      0|                else
 2909|      0|                {
 2910|      0|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2911|      0|                        HardwareIndexBuffer::IT_16BIT, indexData->indexCount,
 2912|      0|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2913|      0|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2914|      0|                    readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), indexData->indexCount);
 2915|      0|                }
 2916|      0|            }
 2917|      3|        }
 2918|      3|        popInnerChunk(stream);
 2919|      3|    }
_ZN4Ogre23MeshSerializerImpl_v1_822readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2923|      1|    {
 2924|      1|        pushInnerChunk(stream);
 2925|      1|        unsigned long streamID;
 2926|       |        // Read detail stream
 2927|      1|        streamID = readChunk(stream);
 2928|      1|        if (streamID != M_MESH_LOD_MANUAL)
  ------------------
  |  Branch (2928:13): [True: 0, False: 1]
  ------------------
 2929|      0|        {
 2930|      0|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2931|      0|                "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 2932|      0|                "MeshSerializerImpl::readMeshLodUsageManual");
 2933|      0|        }
 2934|       |
 2935|      1|        usage.manualName = readString(stream);
 2936|      1|        usage.manualMesh.reset(); // will trigger load later
 2937|      1|        popInnerChunk(stream);
 2938|      1|    }
_ZN4Ogre23MeshSerializerImpl_v1_816readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2942|  3.30k|    {
 2943|       |#if OGRE_NO_MESHLOD
 2944|       |
 2945|       |        /*
 2946|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 2947|       |        // We need to walk through the data to not rely on the chunk size!
 2948|       |        stream->skip(mCurrentstreamLen);
 2949|       |
 2950|       |        // Since we got here, we have already read the chunk header.
 2951|       |        backpedalChunkHeader(stream);
 2952|       |        */
 2953|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 2954|       |        String strategyName = readString(stream);
 2955|       |        uint16 numLods;
 2956|       |        readShorts(stream, &numLods, 1);
 2957|       |        if (!checkStreamRemainingSize(stream, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 2958|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds stream size");
 2959|       |        bool manual;
 2960|       |        readBools(stream, &manual, 1); // missing in v1_9
 2961|       |        pushInnerChunk(stream);
 2962|       |        for (uint16 i = 1; i < numLods; ++i)
 2963|       |        {
 2964|       |            uint16 streamID = readChunk(stream);
 2965|       |            if (streamID != M_MESH_LOD_USAGE)
 2966|       |            {
 2967|       |                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2968|       |                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 2969|       |                    "MeshSerializerImpl::readMeshLodInfo");
 2970|       |            }
 2971|       |            float usageValue;
 2972|       |            readFloats(stream, &usageValue, 1);
 2973|       |
 2974|       |            if (manual)
 2975|       |            {
 2976|       |                // Read detail stream
 2977|       |                streamID = readChunk(stream);
 2978|       |                if (streamID != M_MESH_LOD_MANUAL)
 2979|       |                {
 2980|       |                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2981|       |                        "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 2982|       |                        "MeshSerializerImpl::readMeshLodUsageManual");
 2983|       |                }
 2984|       |
 2985|       |                String manualName = readString(stream);
 2986|       |            }
 2987|       |            else
 2988|       |            {
 2989|       |                pushInnerChunk(stream);
 2990|       |                for (uint16 n = 0; n < numSubs; ++n)
 2991|       |                {
 2992|       |                    streamID = readChunk(stream);
 2993|       |                    if (streamID != M_MESH_LOD_GENERATED)
 2994|       |                    {
 2995|       |                        OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2996|       |                            "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 2997|       |                            "MeshSerializerImpl::readMeshLodUsageGenerated");
 2998|       |                    }
 2999|       |
 3000|       |                    unsigned int numIndexes;
 3001|       |                    readInts(stream, &numIndexes, 1);
 3002|       |
 3003|       |                    bool idx32Bit;
 3004|       |                    readBools(stream, &idx32Bit, 1);
 3005|       |
 3006|       |                    size_t buffSize = numIndexes * (idx32Bit ? 4 : 2);
 3007|       |                    stream->skip(buffSize);
 3008|       |                }
 3009|       |                popInnerChunk(stream);
 3010|       |            }
 3011|       |        }
 3012|       |        popInnerChunk(stream);
 3013|       |#else
 3014|  3.30k|        unsigned short streamID, i;
 3015|       |
 3016|       |        // Read the strategy to be used for this mesh
 3017|  3.30k|        String strategyName = readString(stream);
 3018|  3.30k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 3019|       |        
 3020|  3.30k|        if (strategy)
  ------------------
  |  Branch (3020:13): [True: 52, False: 3.25k]
  ------------------
 3021|     52|            pMesh->setLodStrategy(strategy);
 3022|       |
 3023|       |        // unsigned short numLevels;
 3024|  3.30k|        uint16 numLods;
 3025|  3.30k|        readShorts(stream, &numLods, 1);
 3026|  3.30k|        numLods = std::max<ushort>(numLods, 1);
 3027|       |
 3028|  3.30k|        if (!checkStreamRemainingSize(stream, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (3028:13): [True: 38, False: 3.26k]
  ------------------
 3029|  3.30k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds stream size");
 3030|       |
 3031|  3.26k|        pMesh->mNumLods = numLods;
 3032|  3.26k|        pMesh->mMeshLodUsageList.resize(pMesh->mNumLods);
 3033|       |
 3034|  3.26k|        bool manual; // true for manual alternate meshes, false for generated
 3035|  3.26k|        readBools(stream, &manual, 1);
 3036|  3.26k|        pMesh->mHasManualLodLevel = manual;
 3037|       |
 3038|  3.26k|        pMesh->mMeshLodUsageList.resize(pMesh->mNumLods);
 3039|       |        // Preallocate submesh lod face data if not manual
 3040|  3.26k|        if (!pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3040:13): [True: 2.46k, False: 807]
  ------------------
 3041|  2.46k|        {
 3042|  2.46k|            unsigned short numsubs = pMesh->getNumSubMeshes();
 3043|  2.46k|            for (i = 0; i < numsubs; ++i)
  ------------------
  |  Branch (3043:25): [True: 8, False: 2.46k]
  ------------------
 3044|      8|            {
 3045|      8|                SubMesh* sm = pMesh->getSubMesh(i);
 3046|      8|                assert(sm->mLodFaceList.empty());
 3047|      8|                sm->mLodFaceList.resize(pMesh->mNumLods - 1);
 3048|      8|            }
 3049|  2.46k|        }
 3050|       |
 3051|  3.26k|        pushInnerChunk(stream);
 3052|       |        // Loop from 1 rather than 0 (full detail index is not in file)
 3053|  3.28k|        for (i = 1; i < pMesh->mNumLods; ++i)
  ------------------
  |  Branch (3053:21): [True: 27, False: 3.26k]
  ------------------
 3054|     27|        {
 3055|     27|            streamID = readChunk(stream);
 3056|     27|            if (streamID != M_MESH_LOD_USAGE)
  ------------------
  |  Branch (3056:17): [True: 6, False: 21]
  ------------------
 3057|      6|            {
 3058|      6|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3059|      6|                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3060|      6|                    "MeshSerializerImpl::readMeshLodInfo");
 3061|      6|            }
 3062|       |            // Read depth
 3063|     21|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[i];
 3064|     21|            readFloats(stream, &(usage.userValue), 1);
 3065|       |
 3066|     21|            if (pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3066:17): [True: 1, False: 20]
  ------------------
 3067|      1|            {
 3068|      1|                readMeshLodUsageManual(stream, pMesh, i, usage);
 3069|      1|            }
 3070|     20|            else //(!pMesh->hasManualLodLevel())
 3071|     20|            {
 3072|     20|                readMeshLodUsageGenerated(stream, pMesh, i, usage);
 3073|     20|            }
 3074|     21|            usage.edgeData = NULL;
 3075|     21|        }
 3076|  3.26k|        popInnerChunk(stream);
 3077|  3.26k|#endif
 3078|  3.26k|    }
_ZN4Ogre24MeshSerializerImpl_v1_41C2Ev:
 3092|  11.3k|    {
 3093|       |        // Version number
 3094|  11.3k|        mVersion = "[MeshSerializer_v1.41]";
 3095|  11.3k|    }
_ZN4Ogre24MeshSerializerImpl_v1_418readPoseERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 3157|  1.93k|    {
 3158|       |        // char* name (may be blank)
 3159|  1.93k|        String name = readString(stream);
 3160|       |        // unsigned short target
 3161|  1.93k|        unsigned short target;
 3162|  1.93k|        readShorts(stream, &target, 1);
 3163|       |
 3164|  1.93k|        Pose* pose = pMesh->createPose(target, name);
 3165|       |
 3166|       |        // Find all substreams
 3167|  1.93k|        if (!stream->eof())
  ------------------
  |  Branch (3167:13): [True: 1.90k, False: 33]
  ------------------
 3168|  1.90k|        {
 3169|  1.90k|            pushInnerChunk(stream);
 3170|  1.90k|            unsigned short streamID = readChunk(stream);
 3171|  2.45k|            while(!stream->eof() &&
  ------------------
  |  Branch (3171:19): [True: 2.42k, False: 30]
  ------------------
 3172|  2.42k|                (streamID == M_POSE_VERTEX))
  ------------------
  |  Branch (3172:17): [True: 546, False: 1.87k]
  ------------------
 3173|    546|            {
 3174|    546|                switch(streamID)
  ------------------
  |  Branch (3174:24): [True: 546, False: 0]
  ------------------
 3175|    546|                {
 3176|    546|                case M_POSE_VERTEX:
  ------------------
  |  Branch (3176:17): [True: 546, False: 0]
  ------------------
 3177|       |                    // create vertex offset
 3178|    546|                    uint32 vertIndex;
 3179|    546|                    Vector3f offset;
 3180|       |                    // unsigned long vertexIndex
 3181|    546|                    readInts(stream, &vertIndex, 1);
 3182|       |                    // float xoffset, yoffset, zoffset
 3183|    546|                    readFloats(stream, offset.ptr(), 3);
 3184|       |
 3185|    546|                    pose->addVertex(vertIndex, offset);
 3186|    546|                    break;
 3187|       |
 3188|    546|                }
 3189|       |
 3190|    546|                if (!stream->eof())
  ------------------
  |  Branch (3190:21): [True: 543, False: 3]
  ------------------
 3191|    543|                {
 3192|    543|                    streamID = readChunk(stream);
 3193|    543|                }
 3194|       |
 3195|    546|            }
 3196|  1.90k|            if (!stream->eof())
  ------------------
  |  Branch (3196:17): [True: 1.87k, False: 30]
  ------------------
 3197|  1.87k|            {
 3198|       |                // Backpedal back to start of stream
 3199|  1.87k|                backpedalChunkHeader(stream);
 3200|  1.87k|            }
 3201|  1.90k|            popInnerChunk(stream);
 3202|  1.90k|        }
 3203|  1.93k|    }
_ZN4Ogre23MeshSerializerImpl_v1_4C2Ev:
 3246|  9.08k|    {
 3247|       |        // Version number
 3248|  9.08k|        mVersion = "[MeshSerializer_v1.40]";
 3249|  9.08k|    }
_ZN4Ogre23MeshSerializerImpl_v1_416readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 3338|    216|    {
 3339|       |#if OGRE_NO_MESHLOD
 3340|       |
 3341|       |        /*
 3342|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 3343|       |        // We need to walk through the data to not rely on the chunk size!
 3344|       |        stream->skip(mCurrentstreamLen);
 3345|       |
 3346|       |        // Since we got here, we have already read the chunk header.
 3347|       |        backpedalChunkHeader(stream);
 3348|       |        */
 3349|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 3350|       |        // String strategyName = readString(stream); // missing in v1_4
 3351|       |        uint16 numLods;
 3352|       |        readShorts(stream, &numLods, 1);
 3353|       |        if (!checkStreamRemainingSize(stream, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 3354|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds stream size");
 3355|       |        bool manual;
 3356|       |        readBools(stream, &manual, 1); // missing in v1_9
 3357|       |        pushInnerChunk(stream);
 3358|       |        for (uint16 i = 1; i < numLods; ++i)
 3359|       |        {
 3360|       |            uint16 streamID = readChunk(stream);
 3361|       |            if (streamID != M_MESH_LOD_USAGE)
 3362|       |            {
 3363|       |                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3364|       |                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3365|       |                    "MeshSerializerImpl::readMeshLodInfo");
 3366|       |            }
 3367|       |            float usageValue;
 3368|       |            readFloats(stream, &usageValue, 1);
 3369|       |
 3370|       |            if (manual)
 3371|       |            {
 3372|       |                // Read detail stream
 3373|       |                streamID = readChunk(stream);
 3374|       |                if (streamID != M_MESH_LOD_MANUAL)
 3375|       |                {
 3376|       |                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3377|       |                        "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 3378|       |                        "MeshSerializerImpl::readMeshLodUsageManual");
 3379|       |                }
 3380|       |
 3381|       |                String manualName = readString(stream);
 3382|       |            }
 3383|       |            else
 3384|       |            {
 3385|       |                pushInnerChunk(stream);
 3386|       |                for (uint16 n = 0; n < numSubs; ++n)
 3387|       |                {
 3388|       |                    streamID = readChunk(stream);
 3389|       |                    if (streamID != M_MESH_LOD_GENERATED)
 3390|       |                    {
 3391|       |                        OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3392|       |                            "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 3393|       |                            "MeshSerializerImpl::readMeshLodUsageGenerated");
 3394|       |                    }
 3395|       |
 3396|       |                    unsigned int numIndexes;
 3397|       |                    readInts(stream, &numIndexes, 1);
 3398|       |
 3399|       |                    bool idx32Bit;
 3400|       |                    readBools(stream, &idx32Bit, 1);
 3401|       |
 3402|       |                    size_t buffSize = numIndexes * (idx32Bit ? 4 : 2);
 3403|       |                    stream->skip(buffSize);
 3404|       |                }
 3405|       |                popInnerChunk(stream);
 3406|       |            }
 3407|       |        }
 3408|       |        popInnerChunk(stream);
 3409|       |#else
 3410|    216|        unsigned short streamID, i;
 3411|       |
 3412|       |        // Use the old strategy for this mesh
 3413|    216|        LodStrategy *strategy = DistanceLodSphereStrategy::getSingletonPtr();
 3414|    216|        pMesh->setLodStrategy(strategy);
 3415|       |
 3416|       |        // unsigned short numLevels;
 3417|    216|        uint16 numLods;
 3418|    216|        readShorts(stream, &numLods, 1);
 3419|    216|        numLods = std::max<ushort>(numLods, 1);
 3420|       |
 3421|    216|        if (!checkStreamRemainingSize(stream, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (3421:13): [True: 7, False: 209]
  ------------------
 3422|    216|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds stream size");
 3423|       |
 3424|    209|        pMesh->mNumLods = numLods;
 3425|    209|        pMesh->mMeshLodUsageList.resize(pMesh->mNumLods);
 3426|    209|        bool manual; // true for manual alternate meshes, false for generated
 3427|    209|        readBools(stream, &manual, 1);
 3428|       |
 3429|    209|        pMesh->mHasManualLodLevel = manual;
 3430|       |
 3431|    209|        pMesh->mMeshLodUsageList.resize(pMesh->mNumLods);
 3432|       |        // Preallocate submesh LOD face data if not manual
 3433|    209|        if (!manual)
  ------------------
  |  Branch (3433:13): [True: 22, False: 187]
  ------------------
 3434|     22|        {
 3435|     22|            for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (3435:26): [True: 17, False: 22]
  ------------------
 3436|     17|            {
 3437|     17|                assert(s->mLodFaceList.empty());
 3438|     17|                s->mLodFaceList.resize(pMesh->mNumLods - 1);
 3439|     17|            }
 3440|     22|        }
 3441|    209|        pushInnerChunk(stream);
 3442|       |        // Loop from 1 rather than 0 (full detail index is not in file)
 3443|    212|        for (i = 1; i < pMesh->mNumLods; ++i)
  ------------------
  |  Branch (3443:21): [True: 9, False: 203]
  ------------------
 3444|      9|        {
 3445|      9|            streamID = readChunk(stream);
 3446|      9|            if (streamID != M_MESH_LOD_USAGE)
  ------------------
  |  Branch (3446:17): [True: 6, False: 3]
  ------------------
 3447|      6|            {
 3448|      6|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3449|      6|                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3450|      6|                    "MeshSerializerImpl::readMeshLodInfo");
 3451|      6|            }
 3452|       |            // Read depth
 3453|      3|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[i];
 3454|      3|            readFloats(stream, &(usage.value), 1);
 3455|      3|            usage.userValue = Math::Sqrt(usage.value);
 3456|       |
 3457|      3|            if (manual)
  ------------------
  |  Branch (3457:17): [True: 0, False: 3]
  ------------------
 3458|      0|            {
 3459|      0|                readMeshLodUsageManual(stream, pMesh, i, usage);
 3460|      0|            }
 3461|      3|            else //(!pMesh->isLodManual)
 3462|      3|            {
 3463|      3|                readMeshLodUsageGenerated(stream, pMesh, i, usage);
 3464|      3|            }
 3465|      3|            usage.edgeData = NULL;
 3466|      3|        }
 3467|    203|        popInnerChunk(stream);
 3468|    203|#endif
 3469|    203|    }
_ZN4Ogre23MeshSerializerImpl_v1_3C2Ev:
 3475|  6.81k|    {
 3476|       |        // Version number
 3477|  6.81k|        mVersion = "[MeshSerializer_v1.30]";
 3478|  6.81k|    }
_ZN4Ogre23MeshSerializerImpl_v1_319readEdgeListLodInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_8EdgeDataE:
 3486|      3|    {
 3487|       |#if OGRE_NO_MESHLOD
 3488|       |        if (edgeData == NULL) { // skip it!
 3489|       |            // unsigned long numTriangles
 3490|       |            uint32 numTriangles;
 3491|       |            readInts(stream, &numTriangles, 1);
 3492|       |            // unsigned long numEdgeGroups
 3493|       |            uint32 numEdgeGroups;
 3494|       |            readInts(stream, &numEdgeGroups, 1);
 3495|       |            stream->skip(numTriangles * (8 * sizeof(uint32) + 4 * sizeof(float)));
 3496|       |
 3497|       |            pushInnerChunk(stream);
 3498|       |            uint32 tmp[6];
 3499|       |            for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
 3500|       |            {
 3501|       |                unsigned short streamID = readChunk(stream);
 3502|       |                if (streamID != M_EDGE_GROUP)
 3503|       |                {
 3504|       |                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 3505|       |                        "Missing M_EDGE_GROUP stream",
 3506|       |                        "MeshSerializerImpl_v1_3::readEdgeListLodInfo");
 3507|       |                }
 3508|       |
 3509|       |                // unsigned long vertexSet
 3510|       |                readInts(stream, tmp, 1);
 3511|       |                // unsigned long numEdges
 3512|       |                uint32 numEdges;
 3513|       |                readInts(stream, &numEdges, 1);
 3514|       |                // Edge* edgeList
 3515|       |                stream->skip(numEdges * (6 * sizeof(uint32) + sizeof(bool)));
 3516|       |            }
 3517|       |            popInnerChunk(stream);
 3518|       |            return;
 3519|       |        }
 3520|       |#endif
 3521|       |        // unsigned long numTriangles
 3522|      3|        uint32 numTriangles;
 3523|      3|        readInts(stream, &numTriangles, 1);
 3524|       |        // Allocate correct amount of memory
 3525|      3|        edgeData->triangles.resize(numTriangles);
 3526|      3|        edgeData->triangleFaceNormals.resize(numTriangles);
 3527|      3|        edgeData->triangleLightFacings.resize(numTriangles);
 3528|       |        // unsigned long numEdgeGroups
 3529|      3|        uint32 numEdgeGroups;
 3530|      3|        readInts(stream, &numEdgeGroups, 1);
 3531|       |        // Allocate correct amount of memory
 3532|      3|        edgeData->edgeGroups.resize(numEdgeGroups);
 3533|       |        // Triangle* triangleList
 3534|      3|        uint32 tmp[3];
 3535|  9.10M|        for (size_t t = 0; t < numTriangles; ++t)
  ------------------
  |  Branch (3535:28): [True: 9.10M, False: 3]
  ------------------
 3536|  9.10M|        {
 3537|  9.10M|            EdgeData::Triangle& tri = edgeData->triangles[t];
 3538|       |            // unsigned long indexSet
 3539|  9.10M|            readInts(stream, tmp, 1);
 3540|  9.10M|            tri.indexSet = tmp[0];
 3541|       |            // unsigned long vertexSet
 3542|  9.10M|            readInts(stream, tmp, 1);
 3543|  9.10M|            tri.vertexSet = tmp[0];
 3544|       |            // unsigned long vertIndex[3]
 3545|  9.10M|            readInts(stream, tmp, 3);
 3546|  9.10M|            tri.vertIndex[0] = tmp[0];
 3547|  9.10M|            tri.vertIndex[1] = tmp[1];
 3548|  9.10M|            tri.vertIndex[2] = tmp[2];
 3549|       |            // unsigned long sharedVertIndex[3]
 3550|  9.10M|            readInts(stream, tmp, 3);
 3551|  9.10M|            tri.sharedVertIndex[0] = tmp[0];
 3552|  9.10M|            tri.sharedVertIndex[1] = tmp[1];
 3553|  9.10M|            tri.sharedVertIndex[2] = tmp[2];
 3554|       |            // float normal[4]
 3555|  9.10M|            readFloats(stream, &(edgeData->triangleFaceNormals[t].x), 4);
 3556|       |
 3557|  9.10M|        }
 3558|       |
 3559|       |        // Assume the mesh is closed, it will update later
 3560|      3|        edgeData->isClosed = true;
 3561|       |
 3562|      3|        pushInnerChunk(stream);
 3563|      3|        for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
  ------------------
  |  Branch (3563:29): [True: 3, False: 0]
  ------------------
 3564|      3|        {
 3565|      3|            unsigned short streamID = readChunk(stream);
 3566|      3|            if (streamID != M_EDGE_GROUP)
  ------------------
  |  Branch (3566:17): [True: 3, False: 0]
  ------------------
 3567|      3|            {
 3568|      3|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 3569|      3|                    "Missing M_EDGE_GROUP stream",
 3570|      3|                    "MeshSerializerImpl_v1_3::readEdgeListLodInfo");
 3571|      3|            }
 3572|      0|            EdgeData::EdgeGroup& edgeGroup = edgeData->edgeGroups[eg];
 3573|       |
 3574|       |            // unsigned long vertexSet
 3575|      0|            readInts(stream, tmp, 1);
 3576|      0|            edgeGroup.vertexSet = tmp[0];
 3577|       |            // unsigned long numEdges
 3578|      0|            uint32 numEdges;
 3579|      0|            readInts(stream, &numEdges, 1);
 3580|      0|            edgeGroup.edges.resize(numEdges);
 3581|       |            // Edge* edgeList
 3582|      0|            for (uint32 e = 0; e < numEdges; ++e)
  ------------------
  |  Branch (3582:32): [True: 0, False: 0]
  ------------------
 3583|      0|            {
 3584|      0|                EdgeData::Edge& edge = edgeGroup.edges[e];
 3585|       |                // unsigned long  triIndex[2]
 3586|      0|                readInts(stream, tmp, 2);
 3587|      0|                edge.triIndex[0] = tmp[0];
 3588|      0|                edge.triIndex[1] = tmp[1];
 3589|       |                // unsigned long  vertIndex[2]
 3590|      0|                readInts(stream, tmp, 2);
 3591|      0|                edge.vertIndex[0] = tmp[0];
 3592|      0|                edge.vertIndex[1] = tmp[1];
 3593|       |                // unsigned long  sharedVertIndex[2]
 3594|      0|                readInts(stream, tmp, 2);
 3595|      0|                edge.sharedVertIndex[0] = tmp[0];
 3596|      0|                edge.sharedVertIndex[1] = tmp[1];
 3597|       |                // bool degenerate
 3598|      0|                readBools(stream, &(edge.degenerate), 1);
 3599|       |
 3600|       |                // The mesh is closed only if no degenerate edge here
 3601|      0|                if (edge.degenerate)
  ------------------
  |  Branch (3601:21): [True: 0, False: 0]
  ------------------
 3602|      0|                {
 3603|      0|                    edgeData->isClosed = false;
 3604|      0|                }
 3605|      0|            }
 3606|      0|        }
 3607|      0|        popInnerChunk(stream);
 3608|      0|        reorganiseTriangles(edgeData);
 3609|      0|    }
_ZN4Ogre23MeshSerializerImpl_v1_2C2Ev:
 3898|  4.54k|    {
 3899|       |        // Version number
 3900|  4.54k|        mVersion = "[MeshSerializer_v1.20]";
 3901|  4.54k|    }
_ZN4Ogre23MeshSerializerImpl_v1_28readMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 3908|  2.25k|    {
 3909|  2.25k|        MeshSerializerImpl::readMesh(stream, pMesh, listener);
 3910|       |        // Always automatically build edge lists for this version
 3911|  2.25k|        pMesh->mAutoBuildEdgeLists = true;
 3912|       |
 3913|  2.25k|    }
_ZN4Ogre23MeshSerializerImpl_v1_212readGeometryERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
 3917|    917|    {
 3918|    917|        unsigned short bindIdx = 0;
 3919|       |
 3920|    917|        dest->vertexStart = 0;
 3921|       |
 3922|    917|        unsigned int vertexCount = 0;
 3923|    917|        readInts(stream, &vertexCount, 1);
 3924|    917|        dest->vertexCount = vertexCount;
 3925|       |
 3926|       |        // Vertex buffers
 3927|       |
 3928|    917|        readGeometryPositions(bindIdx, stream, pMesh, dest);
 3929|    917|        ++bindIdx;
 3930|       |        // Find optional geometry streams
 3931|    917|        if (!stream->eof())
  ------------------
  |  Branch (3931:13): [True: 897, False: 20]
  ------------------
 3932|    897|        {
 3933|    897|            pushInnerChunk(stream);
 3934|    897|            unsigned short streamID = readChunk(stream);
 3935|    897|            unsigned short texCoordSet = 0;
 3936|       |            
 3937|  1.83k|            while(!stream->eof() &&
  ------------------
  |  Branch (3937:19): [True: 1.78k, False: 46]
  ------------------
 3938|  1.78k|                (streamID == M_GEOMETRY_NORMALS ||
  ------------------
  |  Branch (3938:18): [True: 307, False: 1.48k]
  ------------------
 3939|  1.48k|                 streamID == M_GEOMETRY_COLOURS ||
  ------------------
  |  Branch (3939:18): [True: 537, False: 943]
  ------------------
 3940|    943|                 streamID == M_GEOMETRY_TEXCOORDS ))
  ------------------
  |  Branch (3940:18): [True: 104, False: 839]
  ------------------
 3941|    948|            {
 3942|    948|                switch (streamID)
  ------------------
  |  Branch (3942:25): [True: 948, False: 0]
  ------------------
 3943|    948|                {
 3944|    307|                case M_GEOMETRY_NORMALS:
  ------------------
  |  Branch (3944:17): [True: 307, False: 641]
  ------------------
 3945|    307|                    readGeometryNormals(bindIdx++, stream, pMesh, dest);
 3946|    307|                    break;
 3947|    537|                case M_GEOMETRY_COLOURS:
  ------------------
  |  Branch (3947:17): [True: 537, False: 411]
  ------------------
 3948|    537|                    readGeometryColours(bindIdx++, stream, pMesh, dest);
 3949|    537|                    break;
 3950|    104|                case M_GEOMETRY_TEXCOORDS:
  ------------------
  |  Branch (3950:17): [True: 104, False: 844]
  ------------------
 3951|    104|                    readGeometryTexCoords(bindIdx++, stream, pMesh, dest, texCoordSet++);
 3952|    104|                    break;
 3953|    948|                }
 3954|       |                // Get next stream
 3955|    936|                if (!stream->eof())
  ------------------
  |  Branch (3955:21): [True: 931, False: 5]
  ------------------
 3956|    931|                {
 3957|    931|                    streamID = readChunk(stream);
 3958|    931|                }
 3959|    936|            }
 3960|    885|            if (!stream->eof())
  ------------------
  |  Branch (3960:17): [True: 839, False: 46]
  ------------------
 3961|    839|            {
 3962|       |                // Backpedal back to start of non-submesh stream
 3963|    839|                backpedalChunkHeader(stream);
 3964|    839|            }
 3965|    885|            popInnerChunk(stream);
 3966|    885|        }
 3967|    917|    }
_ZN4Ogre23MeshSerializerImpl_v1_221readGeometryPositionsEtRKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
 3971|    917|    {
 3972|    917|        HardwareVertexBufferSharedPtr vbuf;
 3973|       |        // float* pVertices (x, y, z order x numVertices)
 3974|    917|        dest->vertexDeclaration->addElement(bindIdx, 0, VET_FLOAT3, VES_POSITION);
 3975|    917|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
 3976|    917|            dest->vertexDeclaration->getVertexSize(bindIdx),
 3977|    917|            dest->vertexCount,
 3978|    917|            pMesh->mVertexBufferUsage,
 3979|    917|            pMesh->mVertexBufferShadowBuffer);
 3980|    917|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 3981|    917|        readFloats(stream, static_cast<float*>(vbufLock.pData), dest->vertexCount * 3);
 3982|    917|        dest->vertexBufferBinding->setBinding(bindIdx, vbuf);
 3983|    917|    }
_ZN4Ogre23MeshSerializerImpl_v1_219readGeometryNormalsEtRKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
 3987|    307|    {
 3988|    307|        HardwareVertexBufferSharedPtr vbuf;
 3989|       |        // float* pNormals (x, y, z order x numVertices)
 3990|    307|        dest->vertexDeclaration->addElement(bindIdx, 0, VET_FLOAT3, VES_NORMAL);
 3991|    307|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
 3992|    307|            dest->vertexDeclaration->getVertexSize(bindIdx),
 3993|    307|            dest->vertexCount,
 3994|    307|            pMesh->mVertexBufferUsage,
 3995|    307|            pMesh->mVertexBufferShadowBuffer);
 3996|    307|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 3997|    307|        readFloats(stream, static_cast<float*>(vbufLock.pData), dest->vertexCount * 3);
 3998|    307|        dest->vertexBufferBinding->setBinding(bindIdx, vbuf);
 3999|    307|    }
_ZN4Ogre23MeshSerializerImpl_v1_219readGeometryColoursEtRKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
 4003|    537|    {
 4004|    537|        HardwareVertexBufferSharedPtr vbuf;
 4005|       |        // unsigned long* pColours (RGBA 8888 format x numVertices)
 4006|    537|        dest->vertexDeclaration->addElement(bindIdx, 0, VET_COLOUR, VES_DIFFUSE);
 4007|    537|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
 4008|    537|            dest->vertexDeclaration->getVertexSize(bindIdx),
 4009|    537|            dest->vertexCount,
 4010|    537|            pMesh->mVertexBufferUsage,
 4011|    537|            pMesh->mVertexBufferShadowBuffer);
 4012|    537|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 4013|    537|        readInts(stream, static_cast<RGBA*>(vbufLock.pData), dest->vertexCount);
 4014|    537|        dest->vertexBufferBinding->setBinding(bindIdx, vbuf);
 4015|    537|    }
_ZN4Ogre23MeshSerializerImpl_v1_221readGeometryTexCoordsEtRKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataEt:
 4019|     21|    {
 4020|     21|        HardwareVertexBufferSharedPtr vbuf;
 4021|       |        // unsigned short dimensions    (1 for 1D, 2 for 2D, 3 for 3D)
 4022|     21|        unsigned short dim;
 4023|     21|        readShorts(stream, &dim, 1);
 4024|       |        // float* pTexCoords  (u [v] [w] order, dimensions x numVertices)
 4025|     21|        dest->vertexDeclaration->addElement(
 4026|     21|            bindIdx,
 4027|     21|            0,
 4028|     21|            VertexElement::multiplyTypeCount(VET_FLOAT1, dim),
 4029|     21|            VES_TEXTURE_COORDINATES,
 4030|     21|            texCoordSet);
 4031|     21|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
 4032|     21|            dest->vertexDeclaration->getVertexSize(bindIdx),
 4033|     21|            dest->vertexCount,
 4034|     21|            pMesh->mVertexBufferUsage,
 4035|     21|            pMesh->mVertexBufferShadowBuffer);
 4036|     21|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 4037|     21|        readFloats(stream, static_cast<float*>(vbufLock.pData), dest->vertexCount * dim);
 4038|     21|        dest->vertexBufferBinding->setBinding(bindIdx, vbuf);
 4039|     21|    }
_ZN4Ogre23MeshSerializerImpl_v1_1C2Ev:
 4044|  2.27k|    {
 4045|       |        // Version number
 4046|  2.27k|        mVersion = "[MeshSerializer_v1.10]";
 4047|  2.27k|    }
_ZN4Ogre23MeshSerializerImpl_v1_121readGeometryTexCoordsEtRKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataEt:
 4055|     83|    {
 4056|     83|        float *pFloat = 0;
 4057|     83|        HardwareVertexBufferSharedPtr vbuf;
 4058|       |        // unsigned short dimensions    (1 for 1D, 2 for 2D, 3 for 3D)
 4059|     83|        unsigned short dim;
 4060|     83|        readShorts(stream, &dim, 1);
 4061|       |        // float* pTexCoords  (u [v] [w] order, dimensions x numVertices)
 4062|     83|        dest->vertexDeclaration->addElement(
 4063|     83|            bindIdx,
 4064|     83|            0,
 4065|     83|            VertexElement::multiplyTypeCount(VET_FLOAT1, dim),
 4066|     83|            VES_TEXTURE_COORDINATES,
 4067|     83|            texCoordSet);
 4068|     83|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
 4069|     83|            dest->vertexDeclaration->getVertexSize(bindIdx),
 4070|     83|            dest->vertexCount,
 4071|     83|            pMesh->getVertexBufferUsage(),
 4072|     83|            pMesh->isVertexBufferShadowed());
 4073|     83|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 4074|     83|        pFloat = static_cast<float*>(vbufLock.pData);
 4075|     83|        readFloats(stream, pFloat, dest->vertexCount * dim);
 4076|       |
 4077|       |        // Adjust individual v values to (1 - v)
 4078|     83|        if (dim == 2)
  ------------------
  |  Branch (4078:13): [True: 26, False: 57]
  ------------------
 4079|     26|        {
 4080|    548|            for (size_t i = 0; i < dest->vertexCount; ++i)
  ------------------
  |  Branch (4080:32): [True: 522, False: 26]
  ------------------
 4081|    522|            {
 4082|    522|                ++pFloat; // skip u
 4083|    522|                *pFloat = 1.0f - *pFloat; // v = 1 - v
 4084|    522|                ++pFloat;
 4085|    522|            }
 4086|       |
 4087|     26|        }
 4088|     83|        dest->vertexBufferBinding->setBinding(bindIdx, vbuf);
 4089|     83|    }
OgreMeshSerializerImpl.cpp:_ZN4OgreL24checkStreamRemainingSizeERKNS_9SharedPtrINS_10DataStreamEEEmm:
   50|  7.36k|    {
   51|  7.36k|        if (itemCount == 0)
  ------------------
  |  Branch (51:13): [True: 7.05k, False: 318]
  ------------------
   52|  7.05k|            return true;
   53|       |
   54|    318|        if(stream->tell() >= stream->size())
  ------------------
  |  Branch (54:12): [True: 28, False: 290]
  ------------------
   55|    318|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid stream position");
   56|       |
   57|    290|        size_t remaining = stream->size() - stream->tell();
   58|    290|        return remaining / itemSize >= itemCount;
   59|    318|    }

_ZN4Ogre4NodeC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   35|    500|        :mParent(0),
   36|    500|        mName(name),
   37|    500|        mNeedParentUpdate(false),
   38|    500|        mNeedChildUpdate(false),
   39|    500|        mParentNotified(false),
   40|    500|        mQueuedForUpdate(false),
   41|    500|        mInheritOrientation(true),
   42|    500|        mInheritScale(true),
   43|    500|        mCachedTransformOutOfDate(true),
   44|    500|        mOrientation(Quaternion::IDENTITY),
   45|    500|        mPosition(Vector3::ZERO),
   46|    500|        mScale(Vector3::UNIT_SCALE),
   47|    500|        mDerivedOrientation(Quaternion::IDENTITY),
   48|    500|        mDerivedPosition(Vector3::ZERO),
   49|    500|        mDerivedScale(Vector3::UNIT_SCALE),
   50|    500|        mInitialPosition(Vector3::ZERO),
   51|    500|        mInitialOrientation(Quaternion::IDENTITY),
   52|    500|        mInitialScale(Vector3::UNIT_SCALE),
   53|    500|        mListener(0)
   54|    500|    {
   55|    500|        needUpdate();
   56|    500|    }
_ZN4Ogre4Node9setParentEPS0_:
   89|      6|    {
   90|      6|        bool different = (parent != mParent);
   91|       |
   92|      6|        mParent = parent;
   93|       |        // Request update from parent
   94|      6|        mParentNotified = false ;
   95|      6|        needUpdate();
   96|       |
   97|       |        // Call listener (note, only called if there's something to do)
   98|      6|        if (mListener && different)
  ------------------
  |  Branch (98:13): [True: 0, False: 6]
  |  Branch (98:26): [True: 0, False: 0]
  ------------------
   99|      0|        {
  100|      0|            if (mParent)
  ------------------
  |  Branch (100:17): [True: 0, False: 0]
  ------------------
  101|      0|                mListener->nodeAttached(this);
  102|      0|            else
  103|      0|                mListener->nodeDetached(this);
  104|      0|        }
  105|       |
  106|      6|    }
_ZNK4Ogre4Node17_updateFromParentEv:
  196|    127|    {
  197|    127|        updateFromParentImpl();
  198|       |
  199|       |        // Call listener (note, this method only called if there's something to do)
  200|    127|        if (mListener)
  ------------------
  |  Branch (200:13): [True: 0, False: 127]
  ------------------
  201|      0|        {
  202|      0|            mListener->nodeUpdated(this);
  203|      0|        }
  204|    127|    }
_ZNK4Ogre4Node20updateFromParentImplEv:
  207|    127|    {
  208|    127|        mCachedTransformOutOfDate = true;
  209|       |
  210|    127|        if (mParent)
  ------------------
  |  Branch (210:13): [True: 0, False: 127]
  ------------------
  211|      0|        {
  212|       |#if OGRE_NODE_INHERIT_TRANSFORM
  213|       |            // Decompose full transform to position, orientation and scale, shear is lost here.
  214|       |            _getFullTransform().decomposition(mDerivedPosition, mDerivedScale, mDerivedOrientation);
  215|       |#else
  216|       |            // Update orientation
  217|      0|            const Quaternion& parentOrientation = mParent->_getDerivedOrientation();
  218|      0|            if (mInheritOrientation)
  ------------------
  |  Branch (218:17): [True: 0, False: 0]
  ------------------
  219|      0|            {
  220|       |                // Combine orientation with that of parent
  221|      0|                mDerivedOrientation = parentOrientation * mOrientation;
  222|      0|            }
  223|      0|            else
  224|      0|            {
  225|       |                // No inheritance
  226|      0|                mDerivedOrientation = mOrientation;
  227|      0|            }
  228|       |
  229|       |            // Update scale
  230|      0|            const Vector3& parentScale = mParent->_getDerivedScale();
  231|      0|            if (mInheritScale)
  ------------------
  |  Branch (231:17): [True: 0, False: 0]
  ------------------
  232|      0|            {
  233|       |                // Scale own position by parent scale, NB just combine
  234|       |                // as equivalent axes, no shearing
  235|      0|                mDerivedScale = parentScale * mScale;
  236|      0|            }
  237|      0|            else
  238|      0|            {
  239|       |                // No inheritance
  240|      0|                mDerivedScale = mScale;
  241|      0|            }
  242|       |
  243|       |            // Change position vector based on parent's orientation & scale
  244|      0|            mDerivedPosition = parentOrientation * (parentScale * mPosition);
  245|       |
  246|       |            // Add altered position vector to parents
  247|      0|            mDerivedPosition += mParent->_getDerivedPosition();
  248|      0|#endif
  249|      0|        }
  250|    127|        else
  251|    127|        {
  252|       |            // Root node, no parent
  253|    127|            mDerivedOrientation = mOrientation;
  254|    127|            mDerivedPosition = mPosition;
  255|    127|            mDerivedScale = mScale;
  256|    127|        }
  257|       |
  258|    127|        mNeedParentUpdate = false;
  259|       |
  260|    127|    }
_ZN4Ogre4Node8addChildEPS0_:
  284|      7|    {
  285|      7|        if (child->mParent)
  ------------------
  |  Branch (285:13): [True: 1, False: 6]
  ------------------
  286|      1|        {
  287|      1|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
  288|      1|                        "Node '" + child->getName() + "' already is a child of '" + child->mParent->getName() + "'");
  289|      1|        }
  290|       |
  291|      6|        mChildren.push_back(child);
  292|      6|        child->setParent(this);
  293|       |
  294|      6|    }
_ZN4Ogre4Node14setOrientationERKNS_10QuaternionE:
  343|    500|    {
  344|    500|#ifndef OGRE_FAST_MATH
  345|    500|        OgreAssertDbg(!q.isNaN(), "Invalid orientation supplied as parameter");
  346|    500|#endif
  347|    500|        mOrientation = q;
  348|    500|        mOrientation.normalise();
  349|    500|        needUpdate();
  350|    500|    }
_ZN4Ogre4Node11setPositionERKNS_6VectorILi3EfEE:
  365|    500|    {
  366|    500|#ifndef OGRE_FAST_MATH
  367|       |        assert(!pos.isNaN() && "Invalid vector supplied as parameter");
  368|    500|#endif
  369|    500|        mPosition = pos;
  370|    500|        needUpdate();
  371|    500|    }
_ZNK4Ogre4Node22_getDerivedOrientationEv:
  452|    127|    {
  453|    127|        if (mNeedParentUpdate)
  ------------------
  |  Branch (453:13): [True: 0, False: 127]
  ------------------
  454|      0|        {
  455|      0|            _updateFromParent();
  456|      0|        }
  457|    127|        return mDerivedOrientation;
  458|    127|    }
_ZNK4Ogre4Node19_getDerivedPositionEv:
  461|    127|    {
  462|    127|        if (mNeedParentUpdate)
  ------------------
  |  Branch (462:13): [True: 127, False: 0]
  ------------------
  463|    127|        {
  464|    127|            _updateFromParent();
  465|    127|        }
  466|    127|        return mDerivedPosition;
  467|    127|    }
_ZNK4Ogre4Node16_getDerivedScaleEv:
  470|    127|    {
  471|    127|        if (mNeedParentUpdate)
  ------------------
  |  Branch (471:13): [True: 0, False: 127]
  ------------------
  472|      0|        {
  473|      0|            _updateFromParent();
  474|      0|        }
  475|    127|        return mDerivedScale;
  476|    127|    }
_ZN4Ogre4Node8setScaleERKNS_6VectorILi3EfEE:
  563|     11|    {
  564|     11|#ifndef OGRE_FAST_MATH
  565|       |        assert(!inScale.isNaN() && "Invalid vector supplied as parameter");
  566|     11|#endif
  567|     11|        mScale = inScale;
  568|     11|        needUpdate();
  569|     11|    }
_ZN4Ogre4Node15setInitialStateEv:
  600|    127|    {
  601|    127|        mInitialPosition = mPosition;
  602|    127|        mInitialOrientation = mOrientation;
  603|    127|        mInitialScale = mScale;
  604|    127|    }
_ZN4Ogre4Node10needUpdateEb:
  680|  1.51k|    {
  681|       |
  682|  1.51k|        mNeedParentUpdate = true;
  683|  1.51k|        mNeedChildUpdate = true;
  684|  1.51k|        mCachedTransformOutOfDate = true;
  685|       |
  686|       |        // Make sure we're not root and parent hasn't been notified before
  687|  1.51k|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (687:13): [True: 6, False: 1.51k]
  |  Branch (687:25): [True: 6, False: 0]
  |  Branch (687:45): [True: 0, False: 0]
  ------------------
  688|      6|        {
  689|      6|            mParent->requestUpdate(this, forceParentUpdate);
  690|      6|            mParentNotified = true ;
  691|      6|        }
  692|       |
  693|       |        // all children will be updated
  694|  1.51k|        mChildrenToUpdate.clear();
  695|  1.51k|    }
_ZN4Ogre4Node13requestUpdateEPS0_b:
  698|      6|    {
  699|       |        // If we're already going to update everything this doesn't matter
  700|      6|        if (mNeedChildUpdate)
  ------------------
  |  Branch (700:13): [True: 6, False: 0]
  ------------------
  701|      6|        {
  702|      6|            return;
  703|      6|        }
  704|       |
  705|      0|        mChildrenToUpdate.insert(child);
  706|       |        // Request selective update of me, if we didn't do it before
  707|      0|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  |  Branch (707:25): [True: 0, False: 0]
  |  Branch (707:45): [True: 0, False: 0]
  ------------------
  708|      0|        {
  709|      0|            mParent->requestUpdate(this, forceParentUpdate);
  710|      0|            mParentNotified = true ;
  711|      0|        }
  712|       |
  713|      0|    }

_ZN4Ogre13OptimisedUtil21_detectImplementationEv:
  326|      2|    {
  327|       |        //
  328|       |        // Some speed test results (averaged number of CPU timestamp (RDTSC) per-function call):
  329|       |        //
  330|       |        //   Dagon SkeletonAnimation sample - softwareVertexSkinning:
  331|       |        //
  332|       |        //                                      Pentium 4 3.0G HT       Athlon XP 2500+     Athlon 64 X2 Dual Core 3800+
  333|       |        //
  334|       |        //      Shared Buffers, General C       763677                  462903              473038
  335|       |        //      Shared Buffers, Unrolled SSE    210030 *best*           369762              228328 *best*
  336|       |        //      Shared Buffers, General SSE     286202                  352412 *best*       302796
  337|       |        //
  338|       |        //      Separated Buffers, General C    762640                  464840              478740
  339|       |        //      Separated Buffers, Unrolled SSE 219222 *best*           287992 *best*       238770 *best*
  340|       |        //      Separated Buffers, General SSE  290129                  341614              307262
  341|       |        //
  342|       |        //      PosOnly, General C              388663                  257350              262831
  343|       |        //      PosOnly, Unrolled SSE           139814 *best*           200323 *best*       168995 *best*
  344|       |        //      PosOnly, General SSE            172693                  213704              175447
  345|       |        //
  346|       |        //   Another my own test scene - softwareVertexSkinning:
  347|       |        //
  348|       |        //                                      Pentium P4 3.0G HT      Athlon XP 2500+
  349|       |        //
  350|       |        //      Shared Buffers, General C       74527                   -
  351|       |        //      Shared Buffers, Unrolled SSE    22743 *best*            -
  352|       |        //      Shared Buffers, General SSE     28527                   -
  353|       |        //
  354|       |        //
  355|       |        // Note that speed test appears unaligned load/store instruction version
  356|       |        // loss performance 5%-10% than aligned load/store version, even if both
  357|       |        // of them access to aligned data. Thus, we should use aligned load/store
  358|       |        // as soon as possible.
  359|       |        //
  360|       |        //
  361|       |        // We are pick up the implementation based on test results above.
  362|       |        //
  363|       |#ifdef __DO_PROFILE__
  364|       |        {
  365|       |            static OptimisedUtilProfiler msOptimisedUtilProfiler;
  366|       |            return &msOptimisedUtilProfiler;
  367|       |        }
  368|       |
  369|       |#else   // !__DO_PROFILE__
  370|       |
  371|      2|#if __OGRE_HAVE_SSE
  372|      2|        if (PlatformInformation::getCpuFeatures() & PlatformInformation::CPU_FEATURE_SSE)
  ------------------
  |  Branch (372:13): [True: 2, False: 0]
  ------------------
  373|      2|        {
  374|      2|            return _getOptimisedUtilSSE();
  375|      2|        }
  376|      0|        else
  377|       |#elif __OGRE_HAVE_NEON
  378|       |        if (PlatformInformation::getCpuFeatures() & PlatformInformation::CPU_FEATURE_NEON)
  379|       |        {
  380|       |            return _getOptimisedUtilSSE();
  381|       |        }
  382|       |        else
  383|       |#endif  // __OGRE_HAVE_SSE
  384|      0|        {
  385|      0|            return _getOptimisedUtilGeneral();
  386|      0|        }
  387|       |
  388|      2|#endif  // __DO_PROFILE__
  389|      2|    }

_ZN4Ogre16OptimisedUtilSSEC2Ev:
 1040|      2|        : mPreferGeneralVersionForSharedBuffers(false)
 1041|      2|    {
 1042|       |        // For AMD Athlon XP (but not that for Althon 64), it's prefer to never use
 1043|       |        // unrolled version for shared buffers at all, I guess because that version
 1044|       |        // run out of usable CPU registers, or L1/L2 cache related problem, causing
 1045|       |        // slight performance loss than general version.
 1046|       |        //
 1047|      2|#if __OGRE_HAVE_NEON == 0
 1048|      2|        if (PlatformInformation::getCpuIdentifier().find("AuthenticAMD") != String::npos)
  ------------------
  |  Branch (1048:13): [True: 0, False: 2]
  ------------------
 1049|      0|        {
 1050|       |            // How can I check it's an Athlon XP but not Althon 64?
 1051|       |            // Ok, just test whether supports SSE2/SSE3 or not, if not,
 1052|       |            // assume general version faster than unrolled version :)
 1053|       |            //
 1054|      0|            if (!(PlatformInformation::getCpuFeatures() &
  ------------------
  |  Branch (1054:17): [True: 0, False: 0]
  ------------------
 1055|      0|                (PlatformInformation::CPU_FEATURE_SSE2 | PlatformInformation::CPU_FEATURE_SSE3)))
 1056|      0|            {
 1057|      0|                mPreferGeneralVersionForSharedBuffers = true;
 1058|      0|            }
 1059|      0|        }
 1060|      2|#endif
 1061|      2|    }
_ZN4Ogre20_getOptimisedUtilSSEEv:
 2141|      2|    {
 2142|      2|        static OptimisedUtilSSE msOptimisedUtilSSE;
 2143|       |#if defined(__OGRE_SIMD_ALIGN_STACK)
 2144|       |        static OptimisedUtilWithStackAlign msOptimisedUtilWithStackAlign(&msOptimisedUtilSSE);
 2145|       |        return &msOptimisedUtilWithStackAlign;
 2146|       |#else
 2147|      2|        return &msOptimisedUtilSSE;
 2148|      2|#endif
 2149|      2|    }

_ZN4Ogre4PassC2EPNS_9TechniqueEt:
  122|      1|        : mParent(parent)
  123|      1|        , mHash(0)
  124|      1|        , mAmbient(ColourValue::White)
  125|      1|        , mDiffuse(ColourValue::White)
  126|      1|        , mSpecular(ColourValue::Black)
  127|      1|        , mEmissive(ColourValue::Black)
  128|      1|        , mShininess(0)
  129|      1|        , mTracking(TVC_NONE)
  130|      1|        , mHashDirtyQueued(false)
  131|      1|        , mDepthCheck(true)
  132|      1|        , mDepthWrite(true)
  133|      1|        , mAlphaToCoverageEnabled(false)
  134|      1|        , mTransparentSorting(true)
  135|      1|        , mTransparentSortingForced(false)
  136|      1|        , mLightingEnabled(true)
  137|      1|        , mIteratePerLight(false)
  138|      1|        , mRunOnlyForOneLightType(false)
  139|      1|        , mPolygonModeOverrideable(true)
  140|      1|        , mFogOverride(false)
  141|      1|        , mQueuedForDeletion(false)
  142|      1|        , mLightScissoring(false)
  143|      1|        , mLightClipPlanes(false)
  144|      1|        , mPointSpritesEnabled(false)
  145|      1|        , mPointAttenuationEnabled(false)
  146|      1|        , mContentTypeLookupBuilt(false)
  147|      1|        , mAlphaRejectVal(0)
  148|      1|        , mDepthBiasConstant(0.0f)
  149|      1|        , mDepthBiasSlopeScale(0.0f)
  150|      1|        , mDepthBiasPerIteration(0.0f)
  151|      1|        , mDepthFunc(CMPF_LESS_EQUAL)
  152|      1|        , mAlphaRejectFunc(CMPF_ALWAYS_PASS)
  153|      1|        , mCullMode(CULL_CLOCKWISE)
  154|      1|        , mManualCullMode(MANUAL_CULL_BACK)
  155|      1|        , mMaxSimultaneousLights(OGRE_MAX_SIMULTANEOUS_LIGHTS)
  156|      1|        , mStartLight(0)
  157|      1|        , mLightsPerIteration(1)
  158|      1|        , mIndex(index)
  159|      1|        , mLightMask(0xFFFFFFFF)
  160|      1|        , mFogColour(ColourValue::White)
  161|      1|        , mFogStart(0.0)
  162|      1|        , mFogEnd(1.0)
  163|      1|        , mFogDensity(0.001)
  164|      1|        , mLineWidth(1.0f)
  165|      1|        , mPassIterationCount(1)
  166|      1|        , mPointMinSize(0.0f)
  167|      1|        , mPointMaxSize(0.0f)
  168|      1|        , mPointAttenution(1.0f, 1.0f, 0.0f, 0.0f)
  169|      1|        , mShadeOptions(SO_GOURAUD)
  170|      1|        , mPolygonMode(PM_SOLID)
  171|      1|        , mIlluminationStage(IS_UNKNOWN)
  172|      1|        , mOnlyLightType(Light::LT_POINT)
  173|      1|        , mFogMode(FOG_NONE)
  174|      1|    {
  175|       |        // init the hash inline
  176|      1|        _recalculateHash();
  177|      1|   }
_ZN4Ogre4PassC2EPNS_9TechniqueEtRKS0_:
  181|      2|        : mParent(parent), mQueuedForDeletion(false), mIndex(index), mPassIterationCount(1)
  182|      2|    {
  183|      2|        *this = oth;
  184|      2|        mParent = parent;
  185|      2|        mIndex = index;
  186|      2|        mQueuedForDeletion = false;
  187|       |
  188|       |        // init the hash inline
  189|      2|        _recalculateHash();
  190|      2|    }
_ZN4Ogre4PassaSERKS0_:
  194|      2|    {
  195|      2|        mName = oth.mName;
  196|      2|        mHash = oth.mHash;
  197|      2|        mAmbient = oth.mAmbient;
  198|      2|        mDiffuse = oth.mDiffuse;
  199|      2|        mSpecular = oth.mSpecular;
  200|      2|        mEmissive = oth.mEmissive;
  201|      2|        mShininess = oth.mShininess;
  202|      2|        mTracking = oth.mTracking;
  203|       |
  204|       |        // Copy fog parameters
  205|      2|        mFogOverride = oth.mFogOverride;
  206|      2|        mFogMode = oth.mFogMode;
  207|      2|        mFogColour = oth.mFogColour;
  208|      2|        mFogStart = oth.mFogStart;
  209|      2|        mFogEnd = oth.mFogEnd;
  210|      2|        mFogDensity = oth.mFogDensity;
  211|       |
  212|       |        // Default blending (overwrite)
  213|      2|        mBlendState = oth.mBlendState;
  214|       |
  215|      2|        mDepthCheck = oth.mDepthCheck;
  216|      2|        mDepthWrite = oth.mDepthWrite;
  217|      2|        mAlphaRejectFunc = oth.mAlphaRejectFunc;
  218|      2|        mAlphaRejectVal = oth.mAlphaRejectVal;
  219|      2|        mAlphaToCoverageEnabled = oth.mAlphaToCoverageEnabled;
  220|      2|        mTransparentSorting = oth.mTransparentSorting;
  221|      2|        mTransparentSortingForced = oth.mTransparentSortingForced;
  222|      2|        mDepthFunc = oth.mDepthFunc;
  223|      2|        mDepthBiasConstant = oth.mDepthBiasConstant;
  224|      2|        mDepthBiasSlopeScale = oth.mDepthBiasSlopeScale;
  225|      2|        mDepthBiasPerIteration = oth.mDepthBiasPerIteration;
  226|      2|        mCullMode = oth.mCullMode;
  227|      2|        mManualCullMode = oth.mManualCullMode;
  228|      2|        mLightingEnabled = oth.mLightingEnabled;
  229|      2|        mMaxSimultaneousLights = oth.mMaxSimultaneousLights;
  230|      2|        mStartLight = oth.mStartLight;
  231|      2|        mIteratePerLight = oth.mIteratePerLight;
  232|      2|        mLightsPerIteration = oth.mLightsPerIteration;
  233|      2|        mRunOnlyForOneLightType = oth.mRunOnlyForOneLightType;
  234|      2|        mOnlyLightType = oth.mOnlyLightType;
  235|      2|        mShadeOptions = oth.mShadeOptions;
  236|      2|        mPolygonMode = oth.mPolygonMode;
  237|      2|        mPolygonModeOverrideable = oth.mPolygonModeOverrideable;
  238|      2|        mPassIterationCount = oth.mPassIterationCount;
  239|      2|        mLineWidth = oth.mLineWidth;
  240|      2|        mPointAttenution = oth.mPointAttenution;
  241|      2|        mPointMinSize = oth.mPointMinSize;
  242|      2|        mPointMaxSize = oth.mPointMaxSize;
  243|      2|        mPointSpritesEnabled = oth.mPointSpritesEnabled;
  244|      2|        mPointAttenuationEnabled = oth.mPointAttenuationEnabled;
  245|      2|        mShadowContentTypeLookup = oth.mShadowContentTypeLookup;
  246|      2|        mContentTypeLookupBuilt = oth.mContentTypeLookupBuilt;
  247|      2|        mLightScissoring = oth.mLightScissoring;
  248|      2|        mLightClipPlanes = oth.mLightClipPlanes;
  249|      2|        mIlluminationStage = oth.mIlluminationStage;
  250|      2|        mLightMask = oth.mLightMask;
  251|       |
  252|     12|        for(int i = 0; i < GPT_PIPELINE_COUNT; i++)
  ------------------
  |  Branch (252:24): [True: 10, False: 2]
  ------------------
  253|     10|        {
  254|     10|            auto& programUsage = mProgramUsage[i];
  255|     10|            auto& othUsage = oth.mProgramUsage[i];
  256|     10|            programUsage = othUsage ? std::make_unique<GpuProgramUsage>(*othUsage, this) : nullptr;
  ------------------
  |  Branch (256:28): [True: 0, False: 10]
  ------------------
  257|     10|        }
  258|       |
  259|       |        // Clear texture units but doesn't notify need recompilation in the case
  260|       |        // we are cloning, The parent material will take care of this.
  261|      2|        for (auto *t : mTextureUnitStates)
  ------------------
  |  Branch (261:22): [True: 0, False: 2]
  ------------------
  262|      0|        {
  263|      0|            OGRE_DELETE t;
  264|      0|        }
  265|       |
  266|      2|        mTextureUnitStates.clear();
  267|       |
  268|       |        // Copy texture units
  269|      2|        for (auto *s : oth.mTextureUnitStates)
  ------------------
  |  Branch (269:22): [True: 0, False: 2]
  ------------------
  270|      0|        {
  271|      0|            TextureUnitState* t = OGRE_NEW TextureUnitState(this, *s);
  272|      0|            mTextureUnitStates.push_back(t);
  273|      0|        }
  274|       |
  275|      2|        _dirtyHash();
  276|       |
  277|      2|        return *this;
  278|      2|    }
_ZNK4Ogre4Pass15getProgramUsageENS_14GpuProgramTypeE:
  825|     24|    {
  826|     24|        static std::unique_ptr<GpuProgramUsage> nullUsage;
  827|     24|        auto& ret = mProgramUsage[programType % GPT_PIPELINE_COUNT];
  828|     24|        return ret && ret->getType() == programType ? ret : nullUsage;
  ------------------
  |  Branch (828:16): [True: 0, False: 24]
  |  Branch (828:23): [True: 0, False: 0]
  ------------------
  829|     24|    }
_ZNK4Ogre4Pass17getGpuProgramNameENS_14GpuProgramTypeE:
  843|     24|    {
  844|     24|        OGRE_LOCK_MUTEX(mGpuProgramChangeMutex);
  845|       |
  846|     24|        const std::unique_ptr<GpuProgramUsage>& programUsage = getProgramUsage(type);
  847|     24|        if (!programUsage)
  ------------------
  |  Branch (847:13): [True: 24, False: 0]
  ------------------
  848|     24|            return BLANKSTRING;
  849|      0|        else
  850|      0|            return programUsage->getProgramName();
  851|     24|    }
_ZN4Ogre4Pass16_recalculateHashEv:
  859|      3|    {
  860|       |        /* Hash format is 32-bit, divided as follows (high to low bits)
  861|       |           bits   purpose
  862|       |            4     Pass index (i.e. max 16 passes!)
  863|       |           28     Pass contents
  864|       |       */
  865|      3|        mHash = (*msHashFunc)(this);
  866|       |
  867|       |        // overwrite the 4 upper bits with pass index
  868|      3|        mHash = (uint32(mIndex) << 28) | (mHash >> 4);
  869|      3|    }
_ZN4Ogre4Pass10_dirtyHashEv:
  872|      2|    {
  873|      2|        if (mQueuedForDeletion)
  ------------------
  |  Branch (873:13): [True: 0, False: 2]
  ------------------
  874|      0|            return;
  875|       |
  876|      2|        Material* mat = mParent->getParent();
  877|      2|        if (mat->isLoading() || mat->isLoaded())
  ------------------
  |  Branch (877:13): [True: 0, False: 2]
  |  Branch (877:33): [True: 0, False: 2]
  ------------------
  878|      0|        {
  879|      0|            OGRE_LOCK_MUTEX(msDirtyHashListMutex);
  880|       |            // Mark this hash as for follow up
  881|      0|            msDirtyHashList.insert(this);
  882|      0|            mHashDirtyQueued = false;
  883|      0|        }
  884|      2|        else
  885|      2|        {
  886|      2|            mHashDirtyQueued = true;
  887|      2|        }
  888|      2|    }
_ZNK4Ogre27MinGpuProgramChangeHashFuncclEPKNS_4PassE:
   67|      3|        {
   68|      3|            OGRE_LOCK_MUTEX(p->mGpuProgramChangeMutex);
   69|      3|            uint32 hash = 0;
   70|       |
   71|     27|            for(int i = 0; i < GPT_COUNT; i++)
  ------------------
  |  Branch (71:28): [True: 24, False: 3]
  ------------------
   72|     24|            {
   73|     24|                const String& name = p->getGpuProgramName(GpuProgramType(i));
   74|     24|                if(!name.empty()) {
  ------------------
  |  Branch (74:20): [True: 0, False: 24]
  ------------------
   75|      0|                    hash = FastHash(name.c_str(), name.size(), hash);
   76|      0|                }
   77|     24|            }
   78|       |
   79|      3|            return hash;
   80|      3|        }

_ZN4Ogre25PixelCountLodStrategyBaseC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   37|      2|        : LodStrategy(name)
   38|      2|    { }
_ZNK4Ogre25PixelCountLodStrategyBase12getBaseValueEv:
   41|     37|    {
   42|       |        // Use the maximum possible value as base
   43|     37|        return std::numeric_limits<Real>::max();
   44|     37|    }
_ZN4Ogre29AbsolutePixelCountLodStrategyC2Ev:
   92|      1|        : PixelCountLodStrategyBase("pixel_count")
   93|      1|    { }
_ZN4Ogre32ScreenRatioPixelCountLodStrategyC2Ev:
  172|      1|        : PixelCountLodStrategyBase("screen_ratio_pixel_count")
  173|      1|    { }

_ZN4Ogre19PlatformInformation16getCpuIdentifierEv:
  655|      2|    {
  656|      2|        static const String sIdentifier = _detectCpuIdentifier();
  657|      2|        return sIdentifier;
  658|      2|    }
_ZN4Ogre19PlatformInformation14getCpuFeaturesEv:
  661|      2|    {
  662|      2|        static const uint sFeatures = _detectCpuFeatures();
  663|      2|        return sFeatures;
  664|      2|    }
OgrePlatformInformation.cpp:_ZN4OgreL20_detectCpuIdentifierEv:
  427|      2|    {
  428|       |        // Supports CPUID instruction ?
  429|      2|        if (_isSupportCpuid())
  ------------------
  |  Branch (429:13): [True: 2, False: 0]
  ------------------
  430|      2|        {
  431|      2|            CpuidResult result;
  432|      2|            uint nExIds;
  433|      2|            char CPUString[0x20];
  434|      2|            char CPUBrandString[0x40];
  435|       |
  436|      2|            StringStream detailedIdentStr;
  437|       |
  438|       |
  439|       |            // Has standard feature ?
  440|      2|            if (_performCpuid(0, result))
  ------------------
  |  Branch (440:17): [True: 2, False: 0]
  ------------------
  441|      2|            {
  442|      2|                memset(CPUString, 0, sizeof(CPUString));
  443|      2|                memset(CPUBrandString, 0, sizeof(CPUBrandString));
  444|       |
  445|       |                //*((int*)CPUString) = result._ebx;
  446|       |                //*((int*)(CPUString+4)) = result._edx;
  447|       |                //*((int*)(CPUString+8)) = result._ecx;
  448|      2|                memcpy(CPUString, &result._ebx, sizeof(int));
  449|      2|                memcpy(CPUString+4, &result._edx, sizeof(int));
  450|      2|                memcpy(CPUString+8, &result._ecx, sizeof(int));
  451|       |
  452|      2|                detailedIdentStr << CPUString;
  453|       |
  454|       |                // Calling _performCpuid with 0x80000000 as the query argument
  455|       |                // gets the number of valid extended IDs.
  456|      2|                nExIds = _performCpuid(0x80000000, result);
  457|       |
  458|     20|                for (uint i=0x80000000; i<=nExIds; ++i)
  ------------------
  |  Branch (458:41): [True: 18, False: 2]
  ------------------
  459|     18|                {
  460|     18|                    _performCpuid(i, result);
  461|       |
  462|       |                    // Interpret CPU brand string and cache information.
  463|     18|                    if  (i == 0x80000002)
  ------------------
  |  Branch (463:26): [True: 2, False: 16]
  ------------------
  464|      2|                    {
  465|      2|                        memcpy(CPUBrandString + 0, &result._eax, sizeof(result._eax));
  466|      2|                        memcpy(CPUBrandString + 4, &result._ebx, sizeof(result._ebx));
  467|      2|                        memcpy(CPUBrandString + 8, &result._ecx, sizeof(result._ecx));
  468|      2|                        memcpy(CPUBrandString + 12, &result._edx, sizeof(result._edx));
  469|      2|                    }
  470|     16|                    else if  (i == 0x80000003)
  ------------------
  |  Branch (470:31): [True: 2, False: 14]
  ------------------
  471|      2|                    {
  472|      2|                        memcpy(CPUBrandString + 16 + 0, &result._eax, sizeof(result._eax));
  473|      2|                        memcpy(CPUBrandString + 16 + 4, &result._ebx, sizeof(result._ebx));
  474|      2|                        memcpy(CPUBrandString + 16 + 8, &result._ecx, sizeof(result._ecx));
  475|      2|                        memcpy(CPUBrandString + 16 + 12, &result._edx, sizeof(result._edx));
  476|      2|                    }
  477|     14|                    else if  (i == 0x80000004)
  ------------------
  |  Branch (477:31): [True: 2, False: 12]
  ------------------
  478|      2|                    {
  479|      2|                        memcpy(CPUBrandString + 32 + 0, &result._eax, sizeof(result._eax));
  480|      2|                        memcpy(CPUBrandString + 32 + 4, &result._ebx, sizeof(result._ebx));
  481|      2|                        memcpy(CPUBrandString + 32 + 8, &result._ecx, sizeof(result._ecx));
  482|      2|                        memcpy(CPUBrandString + 32 + 12, &result._edx, sizeof(result._edx));
  483|      2|                    }
  484|     18|                }
  485|       |
  486|      2|                String brand(CPUBrandString);
  487|      2|                StringUtil::trim(brand);
  488|      2|                if (!brand.empty())
  ------------------
  |  Branch (488:21): [True: 2, False: 0]
  ------------------
  489|      2|                    detailedIdentStr << ": " << brand;
  490|       |
  491|      2|                return detailedIdentStr.str();
  492|      2|            }
  493|      2|        }
  494|       |
  495|      0|        return "X86";
  496|      2|    }
OgrePlatformInformation.cpp:_ZN4OgreL13_performCpuidEiRNS_11CpuidResultE:
  151|     30|    {
  152|       |#if OGRE_COMPILER == OGRE_COMPILER_MSVC
  153|       |        int CPUInfo[4];
  154|       |        __cpuid(CPUInfo, query);
  155|       |        result._eax = CPUInfo[0];
  156|       |        result._ebx = CPUInfo[1];
  157|       |        result._ecx = CPUInfo[2];
  158|       |        result._edx = CPUInfo[3];
  159|       |        return result._eax;
  160|       |#elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
  161|       |        #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64
  162|     30|        __asm__
  163|     30|        (
  164|     30|            "cpuid": "=a" (result._eax), "=b" (result._ebx), "=c" (result._ecx), "=d" (result._edx) : "a" (query)
  165|     30|        );
  166|       |        #else
  167|       |        __asm__
  168|       |        (
  169|       |            "pushl  %%ebx           \n\t"
  170|       |            "cpuid                  \n\t"
  171|       |            "movl   %%ebx, %%edi    \n\t"
  172|       |            "popl   %%ebx           \n\t"
  173|       |            : "=a" (result._eax), "=D" (result._ebx), "=c" (result._ecx), "=d" (result._edx)
  174|       |            : "a" (query)
  175|       |        );
  176|       |       #endif // OGRE_ARCHITECTURE_64
  177|     30|        return result._eax;
  178|       |
  179|       |#else
  180|       |        // TODO: Supports other compiler
  181|       |        return 0;
  182|       |#endif
  183|     30|    }
OgrePlatformInformation.cpp:_ZN4OgreL18_detectCpuFeaturesEv:
  408|      2|    {
  409|      2|        uint features = queryCpuFeatures();
  410|       |
  411|      2|        const uint sse_features = 0
  412|      2|            | PlatformInformation::CPU_FEATURE_SSE
  413|      2|            | PlatformInformation::CPU_FEATURE_SSE2
  414|      2|            | PlatformInformation::CPU_FEATURE_SSE3
  415|      2|            | PlatformInformation::CPU_FEATURE_SSE41
  416|      2|            | PlatformInformation::CPU_FEATURE_SSE42;
  417|       |
  418|      2|        if ((features & sse_features) && !_checkOperatingSystemSupportSSE())
  ------------------
  |  Branch (418:13): [True: 2, False: 0]
  |  Branch (418:42): [True: 0, False: 2]
  ------------------
  419|      0|        {
  420|      0|            features &= ~sse_features;
  421|      0|        }
  422|       |
  423|      2|        return features;
  424|      2|    }
OgrePlatformInformation.cpp:_ZN4OgreL16queryCpuFeaturesEv:
  266|      2|    {
  267|       |
  268|      2|#define CPUID_FUNC_VENDOR_ID                 0x0
  269|      2|#define CPUID_FUNC_STANDARD_FEATURES         0x1
  270|      2|#define CPUID_FUNC_EXTENSION_QUERY           0x80000000
  271|      2|#define CPUID_FUNC_EXTENDED_FEATURES         0x80000001
  272|      2|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  273|       |
  274|      2|#define CPUID_STD_FPU               (1<<0)
  275|      2|#define CPUID_STD_TSC               (1<<4)
  276|      2|#define CPUID_STD_CMOV              (1<<15)
  277|      2|#define CPUID_STD_MMX               (1<<23)
  278|      2|#define CPUID_STD_SSE               (1<<25)
  279|      2|#define CPUID_STD_SSE2              (1<<26)
  280|      2|#define CPUID_STD_HTT               (1<<28)     // EDX[28] - Bit 28 set indicates  Hyper-Threading Technology is supported in hardware.
  281|       |
  282|      2|#define CPUID_STD_SSE3              (1<<0)      // ECX[0]  - Bit 0 of standard function 1 indicate SSE3 supported
  283|      2|#define CPUID_STD_SSE41             (1<<19)     // ECX[19] - Bit 0 of standard function 1 indicate SSE41 supported
  284|      2|#define CPUID_STD_SSE42             (1<<20)     // ECX[20] - Bit 0 of standard function 1 indicate SSE42 supported
  285|       |
  286|      2|#define CPUID_FAMILY_ID_MASK        0x0F00      // EAX[11:8] - Bit 11 thru 8 contains family  processor id
  287|      2|#define CPUID_EXT_FAMILY_ID_MASK    0x0F00000   // EAX[23:20] - Bit 23 thru 20 contains extended family processor id
  288|      2|#define CPUID_PENTIUM4_ID           0x0F00      // Pentium 4 family processor id
  289|       |
  290|      2|#define CPUID_EXT_3DNOW             (1<<31)
  291|      2|#define CPUID_EXT_AMD_3DNOWEXT      (1<<30)
  292|      2|#define CPUID_EXT_AMD_MMXEXT        (1<<22)
  293|       |
  294|       |
  295|      2|#define CPUID_APM_INVARIANT_TSC     (1<<8)      // EDX[8] - Bit 8 of function 0x80000007 indicates support for invariant TSC.
  296|       |
  297|      2|        uint features = 0;
  298|       |
  299|       |        // Supports CPUID instruction ?
  300|      2|        if (_isSupportCpuid())
  ------------------
  |  Branch (300:13): [True: 2, False: 0]
  ------------------
  301|      2|        {
  302|      2|            CpuidResult result;
  303|       |
  304|       |            // Has standard feature ?
  305|      2|            if (_performCpuid(CPUID_FUNC_VENDOR_ID, result))
  ------------------
  |  |  268|      2|#define CPUID_FUNC_VENDOR_ID                 0x0
  ------------------
  |  Branch (305:17): [True: 2, False: 0]
  ------------------
  306|      2|            {
  307|       |                // Check vendor strings
  308|      2|                if (memcmp(&result._ebx, "GenuineIntel", 12) == 0)
  ------------------
  |  Branch (308:21): [True: 2, False: 0]
  ------------------
  309|      2|                {
  310|      2|                    if (result._eax > 2)
  ------------------
  |  Branch (310:25): [True: 2, False: 0]
  ------------------
  311|      2|                        features |= PlatformInformation::CPU_FEATURE_PRO;
  312|       |
  313|       |                    // Check standard feature
  314|      2|                    _performCpuid(CPUID_FUNC_STANDARD_FEATURES, result);
  ------------------
  |  |  269|      2|#define CPUID_FUNC_STANDARD_FEATURES         0x1
  ------------------
  315|       |
  316|      2|                    if (result._edx & CPUID_STD_FPU)
  ------------------
  |  |  274|      2|#define CPUID_STD_FPU               (1<<0)
  ------------------
  |  Branch (316:25): [True: 2, False: 0]
  ------------------
  317|      2|                        features |= PlatformInformation::CPU_FEATURE_FPU;
  318|      2|                    if (result._edx & CPUID_STD_TSC)
  ------------------
  |  |  275|      2|#define CPUID_STD_TSC               (1<<4)
  ------------------
  |  Branch (318:25): [True: 2, False: 0]
  ------------------
  319|      2|                        features |= PlatformInformation::CPU_FEATURE_TSC;
  320|      2|                    if (result._edx & CPUID_STD_CMOV)
  ------------------
  |  |  276|      2|#define CPUID_STD_CMOV              (1<<15)
  ------------------
  |  Branch (320:25): [True: 2, False: 0]
  ------------------
  321|      2|                        features |= PlatformInformation::CPU_FEATURE_CMOV;
  322|      2|                    if (result._edx & CPUID_STD_MMX)
  ------------------
  |  |  277|      2|#define CPUID_STD_MMX               (1<<23)
  ------------------
  |  Branch (322:25): [True: 2, False: 0]
  ------------------
  323|      2|                        features |= PlatformInformation::CPU_FEATURE_MMX;
  324|      2|                    if (result._edx & CPUID_STD_SSE)
  ------------------
  |  |  278|      2|#define CPUID_STD_SSE               (1<<25)
  ------------------
  |  Branch (324:25): [True: 2, False: 0]
  ------------------
  325|      2|                        features |= PlatformInformation::CPU_FEATURE_MMXEXT | PlatformInformation::CPU_FEATURE_SSE;
  326|      2|                    if (result._edx & CPUID_STD_SSE2)
  ------------------
  |  |  279|      2|#define CPUID_STD_SSE2              (1<<26)
  ------------------
  |  Branch (326:25): [True: 2, False: 0]
  ------------------
  327|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE2;
  328|      2|                    if (result._ecx & CPUID_STD_SSE3)
  ------------------
  |  |  282|      2|#define CPUID_STD_SSE3              (1<<0)      // ECX[0]  - Bit 0 of standard function 1 indicate SSE3 supported
  ------------------
  |  Branch (328:25): [True: 2, False: 0]
  ------------------
  329|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE3;
  330|      2|                    if (result._ecx & CPUID_STD_SSE41)
  ------------------
  |  |  283|      2|#define CPUID_STD_SSE41             (1<<19)     // ECX[19] - Bit 0 of standard function 1 indicate SSE41 supported
  ------------------
  |  Branch (330:25): [True: 2, False: 0]
  ------------------
  331|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE41;
  332|      2|                    if (result._ecx & CPUID_STD_SSE42)
  ------------------
  |  |  284|      2|#define CPUID_STD_SSE42             (1<<20)     // ECX[20] - Bit 0 of standard function 1 indicate SSE42 supported
  ------------------
  |  Branch (332:25): [True: 2, False: 0]
  ------------------
  333|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE42;
  334|       |
  335|       |                    // Check to see if this is a Pentium 4 or later processor
  336|      2|                    if ((result._eax & CPUID_EXT_FAMILY_ID_MASK) ||
  ------------------
  |  |  287|      2|#define CPUID_EXT_FAMILY_ID_MASK    0x0F00000   // EAX[23:20] - Bit 23 thru 20 contains extended family processor id
  ------------------
  |  Branch (336:25): [True: 0, False: 2]
  ------------------
  337|      2|                        (result._eax & CPUID_FAMILY_ID_MASK) == CPUID_PENTIUM4_ID)
  ------------------
  |  |  286|      2|#define CPUID_FAMILY_ID_MASK        0x0F00      // EAX[11:8] - Bit 11 thru 8 contains family  processor id
  ------------------
                                      (result._eax & CPUID_FAMILY_ID_MASK) == CPUID_PENTIUM4_ID)
  ------------------
  |  |  288|      2|#define CPUID_PENTIUM4_ID           0x0F00      // Pentium 4 family processor id
  ------------------
  |  Branch (337:25): [True: 0, False: 2]
  ------------------
  338|      0|                    {
  339|       |                        // Check hyper-threading technology
  340|      0|                        if (result._edx & CPUID_STD_HTT)
  ------------------
  |  |  280|      0|#define CPUID_STD_HTT               (1<<28)     // EDX[28] - Bit 28 set indicates  Hyper-Threading Technology is supported in hardware.
  ------------------
  |  Branch (340:29): [True: 0, False: 0]
  ------------------
  341|      0|                            features |= PlatformInformation::CPU_FEATURE_HTT;
  342|      0|                    }
  343|       |
  344|       |
  345|      2|                    const uint maxExtensionFunctionSupport = _performCpuid(CPUID_FUNC_EXTENSION_QUERY, result);
  ------------------
  |  |  270|      2|#define CPUID_FUNC_EXTENSION_QUERY           0x80000000
  ------------------
  346|      2|                    if (maxExtensionFunctionSupport >= CPUID_FUNC_ADVANCED_POWER_MANAGEMENT)
  ------------------
  |  |  272|      2|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  |  Branch (346:25): [True: 2, False: 0]
  ------------------
  347|      2|                    {
  348|      2|                        _performCpuid(CPUID_FUNC_ADVANCED_POWER_MANAGEMENT, result);
  ------------------
  |  |  272|      2|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  349|       |
  350|      2|                        if (result._edx & CPUID_APM_INVARIANT_TSC)
  ------------------
  |  |  295|      2|#define CPUID_APM_INVARIANT_TSC     (1<<8)      // EDX[8] - Bit 8 of function 0x80000007 indicates support for invariant TSC.
  ------------------
  |  Branch (350:29): [True: 2, False: 0]
  ------------------
  351|      2|                            features |= PlatformInformation::CPU_FEATURE_INVARIANT_TSC;
  352|      2|                    }
  353|      2|                }
  354|      0|                else if (memcmp(&result._ebx, "AuthenticAMD", 12) == 0)
  ------------------
  |  Branch (354:26): [True: 0, False: 0]
  ------------------
  355|      0|                {
  356|      0|                    features |= PlatformInformation::CPU_FEATURE_PRO;
  357|       |
  358|       |                    // Check standard feature
  359|      0|                    _performCpuid(CPUID_FUNC_STANDARD_FEATURES, result);
  ------------------
  |  |  269|      0|#define CPUID_FUNC_STANDARD_FEATURES         0x1
  ------------------
  360|       |
  361|      0|                    if (result._edx & CPUID_STD_FPU)
  ------------------
  |  |  274|      0|#define CPUID_STD_FPU               (1<<0)
  ------------------
  |  Branch (361:25): [True: 0, False: 0]
  ------------------
  362|      0|                        features |= PlatformInformation::CPU_FEATURE_FPU;
  363|      0|                    if (result._edx & CPUID_STD_TSC)
  ------------------
  |  |  275|      0|#define CPUID_STD_TSC               (1<<4)
  ------------------
  |  Branch (363:25): [True: 0, False: 0]
  ------------------
  364|      0|                        features |= PlatformInformation::CPU_FEATURE_TSC;
  365|      0|                    if (result._edx & CPUID_STD_CMOV)
  ------------------
  |  |  276|      0|#define CPUID_STD_CMOV              (1<<15)
  ------------------
  |  Branch (365:25): [True: 0, False: 0]
  ------------------
  366|      0|                        features |= PlatformInformation::CPU_FEATURE_CMOV;
  367|      0|                    if (result._edx & CPUID_STD_MMX)
  ------------------
  |  |  277|      0|#define CPUID_STD_MMX               (1<<23)
  ------------------
  |  Branch (367:25): [True: 0, False: 0]
  ------------------
  368|      0|                        features |= PlatformInformation::CPU_FEATURE_MMX;
  369|      0|                    if (result._edx & CPUID_STD_SSE)
  ------------------
  |  |  278|      0|#define CPUID_STD_SSE               (1<<25)
  ------------------
  |  Branch (369:25): [True: 0, False: 0]
  ------------------
  370|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE;
  371|      0|                    if (result._edx & CPUID_STD_SSE2)
  ------------------
  |  |  279|      0|#define CPUID_STD_SSE2              (1<<26)
  ------------------
  |  Branch (371:25): [True: 0, False: 0]
  ------------------
  372|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE2;
  373|       |
  374|      0|                    if (result._ecx & CPUID_STD_SSE3)
  ------------------
  |  |  282|      0|#define CPUID_STD_SSE3              (1<<0)      // ECX[0]  - Bit 0 of standard function 1 indicate SSE3 supported
  ------------------
  |  Branch (374:25): [True: 0, False: 0]
  ------------------
  375|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE3;
  376|       |
  377|       |                    // Has extended feature ?
  378|      0|                    const uint maxExtensionFunctionSupport = _performCpuid(CPUID_FUNC_EXTENSION_QUERY, result);
  ------------------
  |  |  270|      0|#define CPUID_FUNC_EXTENSION_QUERY           0x80000000
  ------------------
  379|      0|                    if (maxExtensionFunctionSupport >= CPUID_FUNC_EXTENDED_FEATURES)
  ------------------
  |  |  271|      0|#define CPUID_FUNC_EXTENDED_FEATURES         0x80000001
  ------------------
  |  Branch (379:25): [True: 0, False: 0]
  ------------------
  380|      0|                    {
  381|       |                        // Check extended feature
  382|      0|                        _performCpuid(CPUID_FUNC_EXTENDED_FEATURES, result);
  ------------------
  |  |  271|      0|#define CPUID_FUNC_EXTENDED_FEATURES         0x80000001
  ------------------
  383|       |
  384|      0|                        if (result._edx & CPUID_EXT_3DNOW)
  ------------------
  |  |  290|      0|#define CPUID_EXT_3DNOW             (1<<31)
  ------------------
  |  Branch (384:29): [True: 0, False: 0]
  ------------------
  385|      0|                            features |= PlatformInformation::CPU_FEATURE_3DNOW;
  386|      0|                        if (result._edx & CPUID_EXT_AMD_3DNOWEXT)
  ------------------
  |  |  291|      0|#define CPUID_EXT_AMD_3DNOWEXT      (1<<30)
  ------------------
  |  Branch (386:29): [True: 0, False: 0]
  ------------------
  387|      0|                            features |= PlatformInformation::CPU_FEATURE_3DNOWEXT;
  388|      0|                        if (result._edx & CPUID_EXT_AMD_MMXEXT)
  ------------------
  |  |  292|      0|#define CPUID_EXT_AMD_MMXEXT        (1<<22)
  ------------------
  |  Branch (388:29): [True: 0, False: 0]
  ------------------
  389|      0|                            features |= PlatformInformation::CPU_FEATURE_MMXEXT;
  390|      0|                    }
  391|       |
  392|       |
  393|      0|                    if (maxExtensionFunctionSupport >= CPUID_FUNC_ADVANCED_POWER_MANAGEMENT)
  ------------------
  |  |  272|      0|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  |  Branch (393:25): [True: 0, False: 0]
  ------------------
  394|      0|                    {
  395|      0|                        _performCpuid(CPUID_FUNC_ADVANCED_POWER_MANAGEMENT, result);
  ------------------
  |  |  272|      0|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  396|       |
  397|      0|                        if (result._edx & CPUID_APM_INVARIANT_TSC)
  ------------------
  |  |  295|      0|#define CPUID_APM_INVARIANT_TSC     (1<<8)      // EDX[8] - Bit 8 of function 0x80000007 indicates support for invariant TSC.
  ------------------
  |  Branch (397:29): [True: 0, False: 0]
  ------------------
  398|      0|                            features |= PlatformInformation::CPU_FEATURE_INVARIANT_TSC;
  399|      0|                    }
  400|      0|                }
  401|      2|            }
  402|      2|        }
  403|       |
  404|      2|        return features;
  405|      2|    }
OgrePlatformInformation.cpp:_ZN4OgreL31_checkOperatingSystemSupportSSEEv:
  202|      2|    {
  203|       |#if OGRE_COMPILER == OGRE_COMPILER_MSVC
  204|       |        /*
  205|       |            The FP part of SSE introduces a new architectural state and therefore
  206|       |            requires support from the operating system. So even if CPUID indicates
  207|       |            support for SSE FP, the application might not be able to use it. If
  208|       |            CPUID indicates support for SSE FP, check here whether it is also
  209|       |            supported by the OS, and turn off the SSE FP feature bit if there
  210|       |            is no OS support for SSE FP.
  211|       |
  212|       |            Operating systems that do not support SSE FP return an illegal
  213|       |            instruction exception if execution of an SSE FP instruction is performed.
  214|       |            Here, a sample SSE FP instruction is executed, and is checked for an
  215|       |            exception using the (non-standard) __try/__except mechanism
  216|       |            of Microsoft Visual C/C++.
  217|       |        */
  218|       |        // Visual Studio 2005, Both AMD and Intel x64 support SSE
  219|       |        // note that even though this is a build rather than runtime setting, all
  220|       |        // 64-bit CPUs support this so since binary is 64-bit only we're ok
  221|       |    #if _MSC_VER >= 1400 && defined(_M_X64)
  222|       |            return true;
  223|       |    #else
  224|       |        __try
  225|       |        {
  226|       |            __asm orps  xmm0, xmm0
  227|       |            return true;
  228|       |        }
  229|       |        __except(EXCEPTION_EXECUTE_HANDLER)
  230|       |        {
  231|       |            return false;
  232|       |        }
  233|       |    #endif
  234|       |#elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
  235|       |        #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 
  236|      2|            return true;
  237|       |        #else
  238|       |        // Does gcc have __try/__except similar mechanism?
  239|       |        // Use signal, setjmp/longjmp instead.
  240|       |        void (*oldHandler)(int);
  241|       |        oldHandler = signal(SIGILL, _illegalHandler);
  242|       |
  243|       |        if (setjmp(sIllegalJmpBuf))
  244|       |        {
  245|       |            signal(SIGILL, oldHandler);
  246|       |            return false;
  247|       |        }
  248|       |        else
  249|       |        {
  250|       |            __asm__ __volatile__ ("orps %xmm0, %xmm0");
  251|       |            signal(SIGILL, oldHandler);
  252|       |            return true;
  253|       |        }
  254|       |       #endif
  255|       |#else
  256|       |        // TODO: Supports other compiler, assumed is supported by default
  257|       |        return true;
  258|       |#endif
  259|      2|    }
OgrePlatformInformation.cpp:_ZN4OgreL15_isSupportCpuidEv:
   83|      4|    {
   84|       |#if OGRE_COMPILER == OGRE_COMPILER_MSVC
   85|       |        // Visual Studio 2005 & 64-bit compilers always supports __cpuid intrinsic
   86|       |        // note that even though this is a build rather than runtime setting, all
   87|       |        // 64-bit CPUs support this so since binary is 64-bit only we're ok
   88|       |    #if _MSC_VER >= 1400 && defined(_M_X64)
   89|       |        return true;
   90|       |    #else
   91|       |        // If we can modify flag register bit 21, the cpu is supports CPUID instruction
   92|       |        __asm
   93|       |        {
   94|       |            // Read EFLAG
   95|       |            pushfd
   96|       |            pop     eax
   97|       |            mov     ecx, eax
   98|       |
   99|       |            // Modify bit 21
  100|       |            xor     eax, 0x200000
  101|       |            push    eax
  102|       |            popfd
  103|       |
  104|       |            // Read back EFLAG
  105|       |            pushfd
  106|       |            pop     eax
  107|       |
  108|       |            // Restore EFLAG
  109|       |            push    ecx
  110|       |            popfd
  111|       |
  112|       |            // Check bit 21 modifiable
  113|       |            xor     eax, ecx
  114|       |            neg     eax
  115|       |            sbb     eax, eax
  116|       |
  117|       |            // Return values in eax, no return statement requirement here for VC.
  118|       |        }
  119|       |    #endif
  120|       |#elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
  121|       |        #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64
  122|      4|           return true;
  123|       |       #else
  124|       |        unsigned oldFlags, newFlags;
  125|       |        __asm__
  126|       |        (
  127|       |            "pushfl         \n\t"
  128|       |            "pop    %0      \n\t"
  129|       |            "mov    %0, %1  \n\t"
  130|       |            "xor    %2, %0  \n\t"
  131|       |            "push   %0      \n\t"
  132|       |            "popfl          \n\t"
  133|       |            "pushfl         \n\t"
  134|       |            "pop    %0      \n\t"
  135|       |            "push   %1      \n\t"
  136|       |            "popfl          \n\t"
  137|       |            : "=r" (oldFlags), "=r" (newFlags)
  138|       |            : "n" (0x200000)
  139|       |        );
  140|       |        return oldFlags != newFlags;
  141|       |       #endif // 64
  142|       |#else
  143|       |        // TODO: Supports other compiler
  144|       |        return false;
  145|       |#endif
  146|      4|    }

_ZN4Ogre4PoseC2EtRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   34|  4.40k|        : mTarget(target), mName(name)
   35|  4.40k|    {
   36|  4.40k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEE:
   39|  1.04k|    {
   40|  1.04k|        OgreAssert(mNormalsMap.empty(),
  ------------------
  |  Branch (40:9): [True: 0, False: 1.04k]
  ------------------
   41|  1.04k|                   "Inconsistent calls to addVertex, must include normals always or never");
   42|       |
   43|  1.04k|        if(offset.squaredLength() < 1e-6f)
  ------------------
  |  Branch (43:12): [True: 169, False: 871]
  ------------------
   44|    169|        {
   45|    169|            return;
   46|    169|        }
   47|       |
   48|    871|        mVertexOffsetMap[index] = offset;
   49|    871|        mBuffer.reset();
   50|    871|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEES4_:
   53|  3.57k|    {
   54|  3.57k|        OgreAssert(mVertexOffsetMap.empty() || !mNormalsMap.empty(),
  ------------------
  |  Branch (54:9): [True: 1.35k, False: 2.22k]
  |  Branch (54:9): [True: 2.22k, False: 0]
  ------------------
   55|  3.57k|                   "Inconsistent calls to addVertex, must include normals always or never");
   56|       |
   57|  3.57k|        if(offset.squaredLength() < 1e-6f && normal.squaredLength() < 1e-6f)
  ------------------
  |  Branch (57:12): [True: 716, False: 2.86k]
  |  Branch (57:46): [True: 41, False: 675]
  ------------------
   58|     41|        {
   59|     41|            return;
   60|     41|        }
   61|       |
   62|  3.53k|        mVertexOffsetMap[index] = offset;
   63|  3.53k|        mNormalsMap[index] = normal;
   64|  3.53k|        mBuffer.reset();
   65|  3.53k|    }

_ZNK4Ogre10Quaternion7InverseEv:
  275|    127|    {
  276|    127|        Real fNorm = w*w+x*x+y*y+z*z;
  277|    127|        if ( fNorm > 0.0 )
  ------------------
  |  Branch (277:14): [True: 23, False: 104]
  ------------------
  278|     23|        {
  279|     23|            Real fInvNorm = 1.0f/fNorm;
  280|     23|            return Quaternion(w*fInvNorm,-x*fInvNorm,-y*fInvNorm,-z*fInvNorm);
  281|     23|        }
  282|    104|        else
  283|    104|        {
  284|       |            // return an invalid result to flag the error
  285|    104|            return ZERO;
  286|    104|        }
  287|    127|    }

_ZN4Ogre8ResourceC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   36|  3.75k|        : mCreator(creator), mName(name), mGroup(group), mHandle(handle), 
   37|  3.75k|        mLoadingState(LOADSTATE_UNLOADED), mIsBackgroundLoaded(false),
   38|  3.75k|        mIsManual(isManual), mSize(0),  mLoader(loader), mStateCount(0)
   39|  3.75k|    {
   40|  3.75k|    }
_ZN4Ogre8ResourceD2Ev:
   43|  2.84k|    { 
   44|  2.84k|    }
_ZN4Ogre8ResourceaSERKS0_:
   46|      2|    {
   47|      2|        mName = rhs.mName;
   48|      2|        mGroup = rhs.mGroup;
   49|      2|        mCreator = rhs.mCreator;
   50|      2|        mIsManual = rhs.mIsManual;
   51|      2|        mLoader = rhs.mLoader;
   52|      2|        mHandle = rhs.mHandle;
   53|      2|        mSize = rhs.mSize;
   54|       |
   55|      2|        mLoadingState.store(rhs.mLoadingState.load());
   56|      2|        mIsBackgroundLoaded = rhs.mIsBackgroundLoaded;
   57|       |
   58|      2|        return *this;
   59|      2|    }
_ZN4Ogre8Resource4loadEb:
  153|  10.5k|    {
  154|       |        // Early-out without lock (mitigate perf cost of ensuring loaded)
  155|       |        // Don't load if:
  156|       |        // 1. We're already loaded
  157|       |        // 2. Another thread is loading right now
  158|       |        // 3. We're marked for background loading and this is not the background
  159|       |        //    loading thread we're being called by
  160|       |
  161|  10.5k|        if (mIsBackgroundLoaded && !background) return;
  ------------------
  |  Branch (161:13): [True: 0, False: 10.5k]
  |  Branch (161:36): [True: 0, False: 0]
  ------------------
  162|       |
  163|       |        // This next section is to deal with cases where 2 threads are fighting over
  164|       |        // who gets to prepare / load - this will only usually happen if loading is escalated
  165|  10.5k|        bool keepChecking = true;
  166|  10.5k|        LoadingState old = LOADSTATE_UNLOADED;
  167|  21.0k|        while (keepChecking)
  ------------------
  |  Branch (167:16): [True: 10.5k, False: 10.5k]
  ------------------
  168|  10.5k|        {
  169|       |            // quick check that avoids any synchronisation
  170|  10.5k|            old = mLoadingState.load();
  171|       |
  172|  10.5k|            if ( old == LOADSTATE_PREPARING )
  ------------------
  |  Branch (172:18): [True: 0, False: 10.5k]
  ------------------
  173|      0|            {
  174|      0|                while( mLoadingState.load() == LOADSTATE_PREPARING )
  ------------------
  |  Branch (174:24): [True: 0, False: 0]
  ------------------
  175|      0|                {
  176|      0|                                    OGRE_LOCK_AUTO_MUTEX;
  177|      0|                }
  178|      0|                old = mLoadingState.load();
  179|      0|            }
  180|       |
  181|  10.5k|            if (old!=LOADSTATE_UNLOADED && old!=LOADSTATE_PREPARED && old!=LOADSTATE_LOADING) return;
  ------------------
  |  Branch (181:17): [True: 0, False: 10.5k]
  |  Branch (181:44): [True: 0, False: 0]
  |  Branch (181:71): [True: 0, False: 0]
  ------------------
  182|       |
  183|       |            // atomically do slower check to make absolutely sure,
  184|       |            // and set the load state to LOADING
  185|  10.5k|            if (old==LOADSTATE_LOADING || !mLoadingState.compare_exchange_strong(old,LOADSTATE_LOADING))
  ------------------
  |  Branch (185:17): [True: 0, False: 10.5k]
  |  Branch (185:43): [True: 0, False: 10.5k]
  ------------------
  186|      0|            {
  187|      0|                while( mLoadingState.load() == LOADSTATE_LOADING )
  ------------------
  |  Branch (187:24): [True: 0, False: 0]
  ------------------
  188|      0|                {
  189|      0|                                    OGRE_LOCK_AUTO_MUTEX;
  190|      0|                }
  191|       |
  192|      0|                LoadingState state = mLoadingState.load();
  193|      0|                if( state == LOADSTATE_PREPARED || state == LOADSTATE_PREPARING )
  ------------------
  |  Branch (193:21): [True: 0, False: 0]
  |  Branch (193:52): [True: 0, False: 0]
  ------------------
  194|      0|                {
  195|       |                    // another thread is preparing, loop around
  196|      0|                    continue;
  197|      0|                }
  198|      0|                else if( state != LOADSTATE_LOADED )
  ------------------
  |  Branch (198:26): [True: 0, False: 0]
  ------------------
  199|      0|                {
  200|      0|                    OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Another thread failed in resource operation",
  201|      0|                        "Resource::load");
  202|      0|                }
  203|      0|                return;
  204|      0|            }
  205|  10.5k|            keepChecking = false;
  206|  10.5k|        }
  207|       |
  208|       |        // Scope lock for actual loading
  209|  10.5k|        try
  210|  10.5k|        {
  211|       |
  212|  10.5k|                    OGRE_LOCK_AUTO_MUTEX;
  213|       |
  214|       |
  215|       |
  216|  10.5k|            if (mIsManual)
  ------------------
  |  Branch (216:17): [True: 0, False: 10.5k]
  ------------------
  217|      0|            {
  218|      0|                if (old==LOADSTATE_UNLOADED && mLoader)
  ------------------
  |  Branch (218:21): [True: 0, False: 0]
  |  Branch (218:48): [True: 0, False: 0]
  ------------------
  219|      0|                {
  220|      0|                    mLoader->prepareResource(this);
  221|       |
  222|      0|                    if (!background)
  ------------------
  |  Branch (222:25): [True: 0, False: 0]
  ------------------
  223|      0|                        _firePreparingComplete();
  224|      0|                }
  225|       |
  226|      0|                preLoadImpl();
  227|       |
  228|       |                // Load from manual loader
  229|      0|                if (mLoader)
  ------------------
  |  Branch (229:21): [True: 0, False: 0]
  ------------------
  230|      0|                {
  231|      0|                    mLoader->loadResource(this);
  232|      0|                }
  233|      0|                else
  234|      0|                {
  235|       |                    // Warn that this resource is not reloadable
  236|      0|                    LogManager::getSingleton().stream(LML_TRIVIAL) 
  237|      0|                        << "Note: " << mCreator->getResourceType()
  238|      0|                        << " instance '" << mName << "' was defined as manually "
  239|      0|                        << "loaded, but no manual loader was provided. This Resource "
  240|      0|                        << "will be lost if it has to be reloaded.";
  241|      0|                }
  242|      0|                postLoadImpl();
  243|      0|            }
  244|  10.5k|            else
  245|  10.5k|            {
  246|       |
  247|  10.5k|                if (old==LOADSTATE_UNLOADED)
  ------------------
  |  Branch (247:21): [True: 10.5k, False: 0]
  ------------------
  248|  10.5k|                {
  249|  10.5k|                    prepareImpl();
  250|       |
  251|  10.5k|                    if (!background)
  ------------------
  |  Branch (251:25): [True: 0, False: 10.5k]
  ------------------
  252|      0|                        _firePreparingComplete();
  253|  10.5k|                }
  254|       |
  255|  10.5k|                preLoadImpl();
  256|       |
  257|  10.5k|                if (mGroup == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (257:21): [True: 0, False: 10.5k]
  ------------------
  258|      0|                {
  259|       |                    // Derive resource group
  260|      0|                    changeGroupOwnership(
  261|      0|                        ResourceGroupManager::getSingleton()
  262|      0|                        .findGroupContainingResource(mName));
  263|      0|                }
  264|       |
  265|  10.5k|                loadImpl();
  266|       |
  267|  10.5k|                postLoadImpl();
  268|  10.5k|            }
  269|       |
  270|       |            // Calculate resource size
  271|  10.5k|            mSize = calculateSize();
  272|       |
  273|  10.5k|        }
  274|  10.5k|        catch (...)
  275|  10.5k|        {
  276|       |            // Reset loading in-progress flag, in case failed for some reason.
  277|       |            // We reset it to UNLOADED because the only other case is when
  278|       |            // old == PREPARED in which case the loadImpl should wipe out
  279|       |            // any prepared data since it might be invalid.
  280|  10.5k|            mLoadingState.store(LOADSTATE_UNLOADED);
  281|       |
  282|  10.5k|            OGRE_LOCK_AUTO_MUTEX;
  283|  10.5k|            unloadImpl();
  284|       |
  285|       |            // Re-throw
  286|  10.5k|            throw;
  287|  10.5k|        }
  288|       |
  289|      0|        mLoadingState.store(LOADSTATE_LOADED);
  290|      0|        _dirtyState();
  291|       |
  292|       |        // Notify manager
  293|      0|        if(mCreator)
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|            mCreator->_notifyResourceLoaded(this);
  295|       |
  296|       |        // Fire events, if not background
  297|      0|        if (!background)
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|            _fireLoadingComplete();
  299|       |
  300|       |
  301|      0|    }
_ZN4Ogre8Resource6unloadEv:
  333|  2.84k|    { 
  334|       |        // Early-out without lock (mitigate perf cost of ensuring unloaded)
  335|  2.84k|        LoadingState old = mLoadingState.load();
  336|  2.84k|        if (old!=LOADSTATE_LOADED && old!=LOADSTATE_PREPARED) return;
  ------------------
  |  Branch (336:13): [True: 2.84k, False: 0]
  |  Branch (336:38): [True: 2.84k, False: 0]
  ------------------
  337|       |
  338|       |
  339|      0|        if (!mLoadingState.compare_exchange_strong(old,LOADSTATE_UNLOADING)) return;
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  ------------------
  340|       |
  341|       |        // Scope lock for actual unload
  342|      0|        {
  343|      0|                    OGRE_LOCK_AUTO_MUTEX;
  344|      0|            if (old==LOADSTATE_PREPARED) {
  ------------------
  |  Branch (344:17): [True: 0, False: 0]
  ------------------
  345|      0|                unprepareImpl();
  346|      0|            } else {
  347|      0|                preUnloadImpl();
  348|      0|                unloadImpl();
  349|      0|                postUnloadImpl();
  350|      0|            }
  351|      0|        }
  352|       |
  353|      0|        mLoadingState.store(LOADSTATE_UNLOADED);
  354|       |
  355|       |        // Notify manager
  356|       |        // Note if we have gone from PREPARED to UNLOADED, then we haven't actually
  357|       |        // unloaded, i.e. there is no memory freed on the GPU.
  358|      0|        if(old==LOADSTATE_LOADED && mCreator)
  ------------------
  |  Branch (358:12): [True: 0, False: 0]
  |  Branch (358:37): [True: 0, False: 0]
  ------------------
  359|      0|            mCreator->_notifyResourceUnloaded(this);
  360|       |
  361|      0|        _fireUnloadingComplete();
  362|       |
  363|       |
  364|      0|    }

_ZN4Ogre20ResourceGroupManager12getSingletonEv:
   40|  42.8k|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|  42.8k|    }
_ZN4Ogre20ResourceGroupManagerC2Ev:
   58|      1|        : mLoadingListener(0), mCurrentGroup(0)
   59|      1|    {
   60|       |        // Create the 'General' group
   61|      1|        createResourceGroup(DEFAULT_RESOURCE_GROUP_NAME, true); // the "General" group is synonymous to global pool
   62|       |        // Create the 'Internal' group
   63|      1|        createResourceGroup(INTERNAL_RESOURCE_GROUP_NAME, true);
   64|       |        // Create the 'Autodetect' group (only used for temp storage)
   65|      1|        createResourceGroup(AUTODETECT_RESOURCE_GROUP_NAME, true); // autodetect includes the global pool
   66|       |        // default world group to the default group
   67|      1|        mWorldGroupName = DEFAULT_RESOURCE_GROUP_NAME;
   68|      1|    }
_ZN4Ogre20ResourceGroupManager19createResourceGroupERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
   83|      3|    {
   84|      3|        LogManager::getSingleton().logMessage("Creating resource group " + name);
   85|      3|        if (getResourceGroup(name))
  ------------------
  |  Branch (85:13): [True: 0, False: 3]
  ------------------
   86|      0|        {
   87|      0|            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, 
   88|      0|                "Resource group with name '" + name + "' already exists!", 
   89|      0|                "ResourceGroupManager::createResourceGroup");
   90|      0|        }
   91|      3|        ResourceGroup* grp = OGRE_NEW_T(ResourceGroup, MEMCATEGORY_RESOURCE)();
   92|      3|        grp->groupStatus = ResourceGroup::UNINITIALSED;
   93|      3|        grp->name = name;
   94|      3|        grp->inGlobalPool = inGlobalPool;
   95|      3|        grp->customStageCount = 0;
   96|       |
   97|      3|        OGRE_LOCK_AUTO_MUTEX;
   98|      3|        mResourceGroupMap.emplace(name, grp);
   99|      3|    }
_ZNK4Ogre20ResourceGroupManager16openResourceImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_8ResourceEb:
  515|  10.5k|    {
  516|  10.5k|        OgreAssert(!resourceName.empty(), "resourceName is empty string");
  ------------------
  |  Branch (516:9): [True: 0, False: 10.5k]
  ------------------
  517|  10.5k|        if(mLoadingListener)
  ------------------
  |  Branch (517:12): [True: 0, False: 10.5k]
  ------------------
  518|      0|        {
  519|      0|            DataStreamPtr stream = mLoadingListener->resourceLoading(resourceName, groupName, resourceBeingLoaded);
  520|      0|            if(stream)
  ------------------
  |  Branch (520:16): [True: 0, False: 0]
  ------------------
  521|      0|                return stream;
  522|      0|        }
  523|       |
  524|       |        // Try to find in resource index first
  525|  10.5k|        ResourceGroup* grp = getResourceGroup(groupName, throwOnFailure);
  526|  10.5k|        if (!grp)
  ------------------
  |  Branch (526:13): [True: 0, False: 10.5k]
  ------------------
  527|      0|        {
  528|       |            // we only get here if throwOnFailure is false
  529|      0|            return DataStreamPtr();
  530|      0|        }
  531|       |
  532|  10.5k|        Archive* pArch = resourceExists(grp, resourceName);
  533|       |
  534|  10.5k|        if (pArch == NULL && (searchGroupsIfNotFound ||
  ------------------
  |  Branch (534:13): [True: 10.5k, False: 0]
  |  Branch (534:31): [True: 0, False: 10.5k]
  ------------------
  535|  10.5k|            groupName == AUTODETECT_RESOURCE_GROUP_NAME || grp->inGlobalPool ||
  ------------------
  |  Branch (535:13): [True: 0, False: 10.5k]
  |  Branch (535:60): [True: 10.5k, False: 0]
  ------------------
  536|      0|            (!OGRE_RESOURCEMANAGER_STRICT && (groupName == DEFAULT_RESOURCE_GROUP_NAME))))
  ------------------
  |  Branch (536:14): [Folded, False: 0]
  |  Branch (536:46): [True: 0, False: 0]
  ------------------
  537|  10.5k|        {
  538|  10.5k|            std::pair<Archive*, ResourceGroup*> ret = resourceExistsInAnyGroupImpl(resourceName);
  539|       |
  540|  10.5k|            if(ret.second && resourceBeingLoaded && !ret.second->inGlobalPool) {
  ------------------
  |  Branch (540:16): [True: 0, False: 10.5k]
  |  Branch (540:30): [True: 0, False: 0]
  |  Branch (540:53): [True: 0, False: 0]
  ------------------
  541|      0|                resourceBeingLoaded->changeGroupOwnership(ret.second->name);
  542|      0|            }
  543|       |
  544|  10.5k|            pArch = ret.first;
  545|  10.5k|        }
  546|       |
  547|  10.5k|        if (pArch)
  ------------------
  |  Branch (547:13): [True: 0, False: 10.5k]
  ------------------
  548|      0|        {
  549|      0|            DataStreamPtr stream = pArch->open(resourceName);
  550|      0|            if (mLoadingListener)
  ------------------
  |  Branch (550:17): [True: 0, False: 0]
  ------------------
  551|      0|                mLoadingListener->resourceStreamOpened(resourceName, groupName, resourceBeingLoaded, stream);
  552|      0|            return stream;
  553|      0|        }
  554|       |
  555|  10.5k|        if(!throwOnFailure)
  ------------------
  |  Branch (555:12): [True: 0, False: 10.5k]
  ------------------
  556|      0|            return DataStreamPtr();
  557|       |
  558|  10.5k|        OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND, "Cannot locate resource " + 
  559|  10.5k|            resourceName + " in resource group " + groupName + ".", 
  560|  10.5k|            "ResourceGroupManager::openResource");
  561|       |
  562|  10.5k|    }
_ZN4Ogre20ResourceGroupManager24_registerResourceManagerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_15ResourceManagerE:
  702|      3|    {
  703|      3|        OGRE_LOCK_AUTO_MUTEX;
  704|       |
  705|      3|        LogManager::getSingleton().logMessage(
  706|      3|            "Registering ResourceManager for type " + resourceType);
  707|      3|        mResourceManagerMap[resourceType] = rm;
  708|      3|    }
_ZNK4Ogre20ResourceGroupManager22_notifyResourceCreatedERNS_9SharedPtrINS_8ResourceEEE:
  869|  3.75k|    {
  870|  3.75k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (870:13): [True: 0, False: 3.75k]
  |  Branch (870:30): [True: 0, False: 0]
  ------------------
  871|      0|        {
  872|       |            // Use current group (batch loading)
  873|      0|            addCreatedResource(res, *mCurrentGroup);
  874|      0|        }
  875|  3.75k|        else
  876|  3.75k|        {
  877|       |            // Find group
  878|  3.75k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  879|  3.75k|            if (grp)
  ------------------
  |  Branch (879:17): [True: 3.75k, False: 0]
  ------------------
  880|  3.75k|            {
  881|  3.75k|                addCreatedResource(res, *grp);
  882|  3.75k|            }
  883|  3.75k|        }
  884|       |
  885|  3.75k|        fireResourceCreated(res);
  886|  3.75k|    }
_ZNK4Ogre20ResourceGroupManager22_notifyResourceRemovedERKNS_9SharedPtrINS_8ResourceEEE:
  889|  2.84k|    {
  890|  2.84k|        fireResourceRemove(res);
  891|       |
  892|  2.84k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (892:13): [True: 0, False: 2.84k]
  |  Branch (892:30): [True: 0, False: 0]
  ------------------
  893|      0|        {
  894|       |            // Do nothing - we're batch unloading so list will be cleared
  895|      0|        }
  896|  2.84k|        else
  897|  2.84k|        {
  898|       |            // Find group
  899|  2.84k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  900|  2.84k|            if (grp)
  ------------------
  |  Branch (900:17): [True: 2.84k, False: 0]
  ------------------
  901|  2.84k|            {
  902|  2.84k|                            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
  903|  2.84k|                ResourceGroup::LoadResourceOrderMap::iterator i = 
  904|  2.84k|                    grp->loadResourceOrderMap.find(
  905|  2.84k|                        res->getCreator()->getLoadingOrder());
  906|  2.84k|                if (i != grp->loadResourceOrderMap.end())
  ------------------
  |  Branch (906:21): [True: 2.84k, False: 0]
  ------------------
  907|  2.84k|                {
  908|       |                    // Iterate over the resource list and remove
  909|  2.84k|                    LoadUnloadResourceList& resList = i->second;
  910|  2.84k|                    for (LoadUnloadResourceList::iterator l = resList.begin();
  911|   166k|                        l != resList.end(); ++ l)
  ------------------
  |  Branch (911:25): [True: 166k, False: 0]
  ------------------
  912|   166k|                    {
  913|   166k|                        if ((*l).get() == res.get())
  ------------------
  |  Branch (913:29): [True: 2.84k, False: 163k]
  ------------------
  914|  2.84k|                        {
  915|       |                            // this is the one
  916|  2.84k|                            resList.erase(l);
  917|  2.84k|                            break;
  918|  2.84k|                        }
  919|   166k|                    }
  920|  2.84k|                }
  921|  2.84k|            }
  922|  2.84k|        }
  923|  2.84k|    }
_ZNK4Ogre20ResourceGroupManager18addCreatedResourceERNS_9SharedPtrINS_8ResourceEEERNS0_13ResourceGroupE:
  996|  3.75k|    {
  997|  3.75k|            OGRE_LOCK_MUTEX(grp.OGRE_AUTO_MUTEX_NAME);
  998|  3.75k|        Real order = res->getCreator()->getLoadingOrder();
  999|       |
 1000|  3.75k|        ResourceGroup::LoadResourceOrderMap::iterator i = grp.loadResourceOrderMap.find(order);
 1001|  3.75k|        LoadUnloadResourceList& loadList =
 1002|  3.75k|            i == grp.loadResourceOrderMap.end() ? grp.loadResourceOrderMap[order] : i->second;
  ------------------
  |  Branch (1002:13): [True: 3, False: 3.75k]
  ------------------
 1003|       |
 1004|  3.75k|        loadList.push_back(res);
 1005|  3.75k|    }
_ZNK4Ogre20ResourceGroupManager16getResourceGroupERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 1009|  39.1k|    {
 1010|  39.1k|        OGRE_LOCK_AUTO_MUTEX;
 1011|  39.1k|        ResourceGroupMap::const_iterator i = mResourceGroupMap.find(name);
 1012|       |
 1013|  39.1k|        if (i == mResourceGroupMap.end())
  ------------------
  |  Branch (1013:13): [True: 3, False: 39.1k]
  ------------------
 1014|      3|        {
 1015|      3|            if (throwOnFailure)
  ------------------
  |  Branch (1015:17): [True: 0, False: 3]
  ------------------
 1016|      3|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Cannot locate a resource group called '" + name + "'");
 1017|       |
 1018|      3|            return nullptr;
 1019|      3|        }
 1020|       |
 1021|  39.1k|        return i->second;
 1022|  39.1k|    }
_ZNK4Ogre20ResourceGroupManager19fireResourceCreatedERKNS_9SharedPtrINS_8ResourceEEE:
 1209|  3.75k|    {
 1210|  3.75k|        OGRE_LOCK_AUTO_MUTEX;
 1211|  3.75k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1211:21): [True: 0, False: 3.75k]
  ------------------
 1212|      0|        {
 1213|      0|            l->resourceCreated(resource);
 1214|      0|        }
 1215|  3.75k|    }
_ZNK4Ogre20ResourceGroupManager18fireResourceRemoveERKNS_9SharedPtrINS_8ResourceEEE:
 1218|  2.84k|    {
 1219|  2.84k|        OGRE_LOCK_AUTO_MUTEX;
 1220|  2.84k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1220:21): [True: 0, False: 2.84k]
  ------------------
 1221|      0|        {
 1222|      0|            l->resourceRemove(resource);
 1223|      0|        }
 1224|  2.84k|    }
_ZNK4Ogre20ResourceGroupManager14resourceExistsEPNS0_13ResourceGroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1323|  42.1k|    {
 1324|       |
 1325|  42.1k|            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
 1326|       |
 1327|       |        // Try indexes first
 1328|  42.1k|        ResourceLocationIndex::iterator rit = grp->resourceIndexCaseSensitive.find(resourceName);
 1329|  42.1k|        if (rit != grp->resourceIndexCaseSensitive.end())
  ------------------
  |  Branch (1329:13): [True: 0, False: 42.1k]
  ------------------
 1330|      0|        {
 1331|       |            // Found in the index
 1332|      0|            return rit->second;
 1333|      0|        }
 1334|       |
 1335|       |#if !OGRE_RESOURCEMANAGER_STRICT
 1336|       |        // try case insensitive
 1337|       |        String lcResourceName = resourceName;
 1338|       |        StringUtil::toLowerCase(lcResourceName);
 1339|       |        rit = grp->resourceIndexCaseInsensitive.find(lcResourceName);
 1340|       |        if (rit != grp->resourceIndexCaseInsensitive.end())
 1341|       |        {
 1342|       |            // Found in the index
 1343|       |            return rit->second;
 1344|       |        }
 1345|       |
 1346|       |        // Search the hard way
 1347|       |        for (auto& li : grp->locationList)
 1348|       |        {
 1349|       |            if (li.archive->exists(resourceName))
 1350|       |            {
 1351|       |                return li.archive;
 1352|       |            }
 1353|       |        }
 1354|       |#endif
 1355|       |
 1356|  42.1k|        return NULL;
 1357|       |
 1358|  42.1k|    }
_ZNK4Ogre20ResourceGroupManager28resourceExistsInAnyGroupImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1380|  10.5k|    {
 1381|  10.5k|        OgreAssert(!filename.empty(), "resourceName is empty string");
  ------------------
  |  Branch (1381:9): [True: 0, False: 10.5k]
  ------------------
 1382|  10.5k|            OGRE_LOCK_AUTO_MUTEX;
 1383|       |
 1384|       |            // Iterate over resource groups and find
 1385|  10.5k|        for (const auto & i : mResourceGroupMap)
  ------------------
  |  Branch (1385:29): [True: 31.5k, False: 10.5k]
  ------------------
 1386|  31.5k|        {
 1387|  31.5k|            Archive* arch = resourceExists(i.second, filename);
 1388|  31.5k|            if (arch)
  ------------------
  |  Branch (1388:17): [True: 0, False: 31.5k]
  ------------------
 1389|      0|                return std::make_pair(arch, i.second);
 1390|  31.5k|        }
 1391|       |        // Not found
 1392|  10.5k|        return std::pair<Archive*, ResourceGroup*>();
 1393|  10.5k|    }
_ZNK4Ogre20ResourceGroupManager27isResourceGroupInGlobalPoolERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1468|  22.0k|    {
 1469|  22.0k|        return getResourceGroup(name, true)->inGlobalPool;
 1470|  22.0k|    }
_ZNK4Ogre20ResourceGroupManager18getLoadingListenerEv:
 1501|  3.75k|    {
 1502|  3.75k|        return mLoadingListener;
 1503|  3.75k|    }

_ZN4Ogre15ResourceManagerC2Ev:
   35|      3|        : mNextHandle(1), mMemoryUsage(0), mVerbose(true), mLoadOrder(0)
   36|      3|    {
   37|       |        // Init memory limit & usage
   38|      3|        mMemoryBudget = std::numeric_limits<unsigned long>::max();
   39|      3|    }
_ZN4Ogre15ResourceManager14createResourceERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   53|  3.75k|    {
   54|  3.75k|        OgreAssert(!name.empty(), "resource name must not be empty");
  ------------------
  |  Branch (54:9): [True: 0, False: 3.75k]
  ------------------
   55|       |
   56|       |        // Call creation implementation
   57|  3.75k|        ResourcePtr ret = ResourcePtr(
   58|  3.75k|            createImpl(name, getNextHandle(), group, isManual, loader, params));
   59|  3.75k|        if (params)
  ------------------
  |  Branch (59:13): [True: 0, False: 3.75k]
  ------------------
   60|      0|            ret->setParameterList(*params);
   61|       |
   62|  3.75k|        addImpl(ret);
   63|       |        // Tell resource group manager
   64|  3.75k|        if(ret)
  ------------------
  |  Branch (64:12): [True: 3.75k, False: 0]
  ------------------
   65|  3.75k|            ResourceGroupManager::getSingleton()._notifyResourceCreated(ret);
   66|  3.75k|        return ret;
   67|       |
   68|  3.75k|    }
_ZN4Ogre15ResourceManager16createOrRetrieveERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   75|  10.5k|    {
   76|       |        // Lock for the whole get / insert
   77|  10.5k|            OGRE_LOCK_AUTO_MUTEX;
   78|       |
   79|  10.5k|        ResourcePtr res = getResourceByName(name, group);
   80|  10.5k|        bool created = false;
   81|  10.5k|        if (!res)
  ------------------
  |  Branch (81:13): [True: 909, False: 9.61k]
  ------------------
   82|    909|        {
   83|    909|            created = true;
   84|    909|            res = createResource(name, group, isManual, loader, params);
   85|    909|        }
   86|       |
   87|  10.5k|        return ResourceCreateOrRetrieveResult(res, created);
   88|  10.5k|    }
_ZN4Ogre15ResourceManager4loadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
  103|  10.5k|    {
  104|  10.5k|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
  105|       |        // ensure loaded
  106|  10.5k|        r->load(backgroundThread);
  107|       |
  108|  10.5k|        return r;
  109|  10.5k|    }
_ZN4Ogre15ResourceManager7addImplERNS_9SharedPtrINS_8ResourceEEE:
  112|  3.75k|    {
  113|  3.75k|            OGRE_LOCK_AUTO_MUTEX;
  114|       |
  115|  3.75k|            std::pair<ResourceMap::iterator, bool> result;
  116|  3.75k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (116:12): [True: 3.75k, False: 0]
  ------------------
  117|  3.75k|        {
  118|  3.75k|            result = mResources.emplace(res->getName(), res);
  119|  3.75k|        }
  120|      0|        else
  121|      0|        {
  122|       |            // we will create the group if it doesn't exists in our list
  123|      0|            auto resgroup = mResourcesWithGroup.emplace(res->getGroup(), ResourceMap()).first;
  124|      0|            result = resgroup->second.emplace(res->getName(), res);
  125|      0|        }
  126|       |
  127|       |        // Attempt to resolve the collision
  128|  3.75k|        ResourceLoadingListener* listener = ResourceGroupManager::getSingleton().getLoadingListener();
  129|  3.75k|        if (!result.second && listener)
  ------------------
  |  Branch (129:13): [True: 0, False: 3.75k]
  |  Branch (129:31): [True: 0, False: 0]
  ------------------
  130|      0|        {
  131|      0|            if(listener->resourceCollision(res.get(), this) == false)
  ------------------
  |  Branch (131:16): [True: 0, False: 0]
  ------------------
  132|      0|            {
  133|       |                // explicitly use previous instance and destroy current
  134|      0|                res.reset();
  135|      0|                return;
  136|      0|            }
  137|       |
  138|       |            // Try to do the addition again, no seconds attempts to resolve collisions are allowed
  139|      0|            if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (139:16): [True: 0, False: 0]
  ------------------
  140|      0|            {
  141|      0|                result = mResources.emplace(res->getName(), res);
  142|      0|            }
  143|      0|            else
  144|      0|            {
  145|      0|                auto resgroup = mResourcesWithGroup.emplace(res->getGroup(), ResourceMap()).first;
  146|      0|                result = resgroup->second.emplace(res->getName(), res);
  147|      0|            }
  148|      0|        }
  149|       |
  150|  3.75k|        if (!result.second)
  ------------------
  |  Branch (150:13): [True: 0, False: 3.75k]
  ------------------
  151|      0|        {
  152|      0|            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, getResourceType()+" with the name " + res->getName() +
  153|      0|                " already exists.", "ResourceManager::add");
  154|      0|        }
  155|       |
  156|       |        // Insert the handle
  157|  3.75k|        std::pair<ResourceHandleMap::iterator, bool> resultHandle = mResourcesByHandle.emplace(res->getHandle(), res);
  158|  3.75k|        if (!resultHandle.second)
  ------------------
  |  Branch (158:13): [True: 0, False: 3.75k]
  ------------------
  159|      0|        {
  160|       |            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, getResourceType()+" with the handle " +
  161|      0|                StringConverter::toString((long) (res->getHandle())) +
  162|      0|                " already exists.", "ResourceManager::add");
  163|      0|        }
  164|  3.75k|    }
_ZN4Ogre15ResourceManager10removeImplERKNS_9SharedPtrINS_8ResourceEEE:
  167|  2.84k|    {
  168|  2.84k|        OgreAssert(res, "attempting to remove nullptr");
  ------------------
  |  Branch (168:9): [True: 0, False: 2.84k]
  ------------------
  169|       |
  170|  2.84k|#if OGRE_RESOURCEMANAGER_STRICT
  171|  2.84k|        if (res->getCreator() != this)
  ------------------
  |  Branch (171:13): [True: 0, False: 2.84k]
  ------------------
  172|  2.84k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Resource '" + res->getName() + "' was not created by the '" +
  173|  2.84k|                                                          getResourceType() + "' ResourceManager");
  174|  2.84k|#endif
  175|       |
  176|  2.84k|        OGRE_LOCK_AUTO_MUTEX;
  177|       |
  178|  2.84k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (178:12): [True: 2.84k, False: 0]
  ------------------
  179|  2.84k|        {
  180|  2.84k|            ResourceMap::iterator nameIt = mResources.find(res->getName());
  181|  2.84k|            if (nameIt != mResources.end())
  ------------------
  |  Branch (181:17): [True: 2.84k, False: 0]
  ------------------
  182|  2.84k|            {
  183|  2.84k|                mResources.erase(nameIt);
  184|  2.84k|            }
  185|  2.84k|        }
  186|      0|        else
  187|      0|        {
  188|      0|            ResourceWithGroupMap::iterator groupIt = mResourcesWithGroup.find(res->getGroup());
  189|      0|            if (groupIt != mResourcesWithGroup.end())
  ------------------
  |  Branch (189:17): [True: 0, False: 0]
  ------------------
  190|      0|            {
  191|      0|                ResourceMap::iterator nameIt = groupIt->second.find(res->getName());
  192|      0|                if (nameIt != groupIt->second.end())
  ------------------
  |  Branch (192:21): [True: 0, False: 0]
  ------------------
  193|      0|                {
  194|      0|                    groupIt->second.erase(nameIt);
  195|      0|                }
  196|       |
  197|      0|                if (groupIt->second.empty())
  ------------------
  |  Branch (197:21): [True: 0, False: 0]
  ------------------
  198|      0|                {
  199|      0|                    mResourcesWithGroup.erase(groupIt);
  200|      0|                }
  201|      0|            }
  202|      0|        }
  203|       |
  204|  2.84k|        ResourceHandleMap::iterator handleIt = mResourcesByHandle.find(res->getHandle());
  205|  2.84k|        if (handleIt != mResourcesByHandle.end())
  ------------------
  |  Branch (205:13): [True: 2.84k, False: 0]
  ------------------
  206|  2.84k|        {
  207|  2.84k|            mResourcesByHandle.erase(handleIt);
  208|  2.84k|        }
  209|       |        // Tell resource group manager
  210|  2.84k|        ResourceGroupManager::getSingleton()._notifyResourceRemoved(res);
  211|  2.84k|    }
_ZN4Ogre15ResourceManager6removeERKNS_9SharedPtrINS_8ResourceEEE:
  298|  2.84k|    {
  299|  2.84k|        removeImpl(res);
  300|  2.84k|    }
_ZNK4Ogre15ResourceManager17getResourceByNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  368|  15.4k|    {
  369|  15.4k|        OGRE_LOCK_AUTO_MUTEX;
  370|       |
  371|       |        // resource should be in global pool
  372|  15.4k|        bool isGlobal = ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(groupName);
  373|       |
  374|  15.4k|        if(isGlobal)
  ------------------
  |  Branch (374:12): [True: 15.4k, False: 0]
  ------------------
  375|  15.4k|        {
  376|  15.4k|            auto it = mResources.find(name);
  377|  15.4k|            if( it != mResources.end())
  ------------------
  |  Branch (377:17): [True: 9.61k, False: 5.78k]
  ------------------
  378|  9.61k|            {
  379|  9.61k|                return it->second;
  380|  9.61k|            }
  381|  15.4k|        }
  382|       |
  383|       |        // look in all grouped pools
  384|  5.78k|        if (groupName == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (384:13): [True: 0, False: 5.78k]
  ------------------
  385|      0|        {
  386|      0|            for (auto& r : mResourcesWithGroup)
  ------------------
  |  Branch (386:26): [True: 0, False: 0]
  ------------------
  387|      0|            {
  388|      0|                auto resMapIt = r.second.find(name);
  389|       |
  390|      0|                if( resMapIt != r.second.end())
  ------------------
  |  Branch (390:21): [True: 0, False: 0]
  ------------------
  391|      0|                {
  392|      0|                    return resMapIt->second;
  393|      0|                }
  394|      0|            }
  395|      0|        }
  396|  5.78k|        else if (!isGlobal)
  ------------------
  |  Branch (396:18): [True: 0, False: 5.78k]
  ------------------
  397|      0|        {
  398|       |            // look in the grouped pool
  399|      0|            auto itGroup = mResourcesWithGroup.find(groupName);
  400|      0|            if (itGroup != mResourcesWithGroup.end())
  ------------------
  |  Branch (400:17): [True: 0, False: 0]
  ------------------
  401|      0|            {
  402|      0|                auto it = itGroup->second.find(name);
  403|       |
  404|      0|                if( it != itGroup->second.end())
  ------------------
  |  Branch (404:21): [True: 0, False: 0]
  ------------------
  405|      0|                {
  406|      0|                    return it->second;
  407|      0|                }
  408|      0|            }
  409|       |
  410|       |#if !OGRE_RESOURCEMANAGER_STRICT
  411|       |            // fall back to global
  412|       |            auto it = mResources.find(name);
  413|       |            if( it != mResources.end())
  414|       |            {
  415|       |                return it->second;
  416|       |            }
  417|       |#endif
  418|      0|        }
  419|       |    
  420|  5.78k|        return ResourcePtr();
  421|  5.78k|    }
_ZN4Ogre15ResourceManager13getNextHandleEv:
  431|  3.75k|    {
  432|       |        // This is an atomic operation and hence needs no locking
  433|  3.75k|        return mNextHandle++;
  434|  3.75k|    }

_ZN4Ogre4Root15getSingletonPtrEv:
   86|  18.3k|    {
   87|  18.3k|        return msSingleton;
   88|  18.3k|    }

_ZN4Ogre10SerializerC2Ev:
   36|  29.2k|        mVersion("[Serializer_v1.00]"), // Version number
   37|  29.2k|        mFlipEndian(false)
   38|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
   39|       |        , mReportChunkErrors(true)
   40|       |#endif
   41|  29.2k|    {
   42|  29.2k|    }
_ZN4Ogre10SerializerD2Ev:
   46|  29.2k|    {
   47|  29.2k|    }
_ZN4Ogre10Serializer19determineEndiannessERKNS_9SharedPtrINS_10DataStreamEEE:
   50|  5.10k|    {
   51|  5.10k|        if (stream->tell() != 0)
  ------------------
  |  Branch (51:13): [True: 0, False: 5.10k]
  ------------------
   52|      0|        {
   53|      0|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   54|      0|                "Can only determine the endianness of the input stream if it "
   55|      0|                "is at the start", "Serializer::determineEndianness");
   56|      0|        }
   57|       |                
   58|  5.10k|        uint16 dest;
   59|       |        // read header id manually (no conversion)
   60|  5.10k|        size_t actually_read = stream->read(&dest, sizeof(uint16));
   61|       |        // skip back
   62|  5.10k|        stream->skip(0 - (long)actually_read);
   63|  5.10k|        if (actually_read != sizeof(uint16))
  ------------------
  |  Branch (63:13): [True: 0, False: 5.10k]
  ------------------
   64|      0|        {
   65|       |            // end of file?
   66|      0|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   67|      0|                        "Couldn't read 16 bit header value from input stream.",
   68|      0|                        "Serializer::determineEndianness");
   69|      0|        }
   70|  5.10k|        if (dest == HEADER_STREAM_ID)
  ------------------
  |  Branch (70:13): [True: 1.30k, False: 3.79k]
  ------------------
   71|  1.30k|        {
   72|  1.30k|            mFlipEndian = false;
   73|  1.30k|        }
   74|  3.79k|        else if (dest == OTHER_ENDIAN_HEADER_STREAM_ID)
  ------------------
  |  Branch (74:18): [True: 3.79k, False: 4]
  ------------------
   75|  3.79k|        {
   76|  3.79k|            mFlipEndian = true;
   77|  3.79k|        }
   78|      4|        else
   79|      4|        {
   80|       |            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   81|      4|                "Header chunk didn't match either endian: Corrupted stream?",
   82|      4|                "Serializer::determineEndianness");
   83|      4|        }
   84|  5.10k|    }
_ZN4Ogre10Serializer14readFileHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  235|  2.25k|    {
  236|  2.25k|        unsigned short headerID;
  237|       |        
  238|       |        // Read header ID
  239|  2.25k|        readShorts(stream, &headerID, 1);
  240|       |        
  241|  2.25k|        if (headerID == HEADER_STREAM_ID)
  ------------------
  |  Branch (241:13): [True: 2.25k, False: 0]
  ------------------
  242|  2.25k|        {
  243|       |            // Read version
  244|  2.25k|            String ver = readString(stream);
  245|  2.25k|            if (ver != mVersion)
  ------------------
  |  Branch (245:17): [True: 0, False: 2.25k]
  ------------------
  246|      0|            {
  247|      0|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, 
  248|      0|                    "Invalid file: version incompatible, file reports " + String(ver) +
  249|      0|                    " Serializer is version " + mVersion,
  250|      0|                    "Serializer::readFileHeader");
  251|      0|            }
  252|  2.25k|        }
  253|      0|        else
  254|      0|        {
  255|      0|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid file: no header", 
  256|      0|                "Serializer::readFileHeader");
  257|      0|        }
  258|       |
  259|  2.25k|    }
_ZN4Ogre10Serializer9readChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  262|   358k|    {
  263|   358k|        size_t pos = stream->tell();
  264|   358k|        unsigned short id;
  265|   358k|        readShorts(stream, &id, 1);
  266|       |        
  267|   358k|        readInts(stream, &mCurrentstreamLen, 1);
  268|       |
  269|   358k|        if (!stream->eof())
  ------------------
  |  Branch (269:13): [True: 356k, False: 1.07k]
  ------------------
  270|   356k|        {
  271|       |            // chunk size cant be smaller than the header size, and must fit within the stream
  272|   356k|            if (mCurrentstreamLen < calcChunkHeaderSize() || pos + mCurrentstreamLen > stream->size())
  ------------------
  |  Branch (272:17): [True: 113, False: 356k]
  |  Branch (272:62): [True: 1.35k, False: 355k]
  ------------------
  273|   356k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Corrupt chunk length");
  274|   356k|        }
  275|       |
  276|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  277|       |        if (!mChunkSizeStack.empty() && !stream->eof()){
  278|       |            if (pos != static_cast<size_t>(mChunkSizeStack.back()) && mReportChunkErrors){
  279|       |                LogManager::getSingleton().logMessage("Corrupted chunk detected! Stream name: '" + stream->getName() + "' Chunk id: " + StringConverter::toString(id));
  280|       |            }
  281|       |            mChunkSizeStack.back() = pos + mCurrentstreamLen;
  282|       |        }
  283|       |#endif
  284|   356k|        return id;
  285|   358k|    }
_ZN4Ogre10Serializer9readBoolsERKNS_9SharedPtrINS_10DataStreamEEEPbm:
  288|  61.8k|    {
  289|  61.8k|        static_assert(sizeof(bool) == 1, "add conversion to char for your platform");
  290|  61.8k|        stream->read(pDest, sizeof(bool) * count);
  291|  61.8k|    }
_ZN4Ogre10Serializer10readFloatsERKNS_9SharedPtrINS_10DataStreamEEEPfm:
  294|  13.9M|    {
  295|  13.9M|        stream->read(pDest, sizeof(float) * count);
  296|  13.9M|        flipFromLittleEndian(pDest, sizeof(float), count);
  297|  13.9M|    }
_ZN4Ogre10Serializer10readShortsERKNS_9SharedPtrINS_10DataStreamEEEPtm:
  315|   480k|    {
  316|   480k|        stream->read(pDest, sizeof(unsigned short) * count);
  317|   480k|        flipFromLittleEndian(pDest, sizeof(unsigned short), count);
  318|   480k|    }
_ZN4Ogre10Serializer8readIntsERKNS_9SharedPtrINS_10DataStreamEEEPjm:
  321|  56.0M|    {
  322|  56.0M|        stream->read(pDest, sizeof(uint32) * count);
  323|  56.0M|        flipFromLittleEndian(pDest, sizeof(uint32), count);
  324|  56.0M|    }
_ZN4Ogre10Serializer10readStringERKNS_9SharedPtrINS_10DataStreamEEE:
  327|  71.7k|    {
  328|  71.7k|        return stream->getLine(false);
  329|  71.7k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_6VectorILi3EfEE:
  348|    511|    {
  349|    511|        readFloats(stream, pDest.ptr(), 3);
  350|    511|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_10QuaternionE:
  353|    500|    {
  354|    500|        float tmp[4];
  355|    500|        readFloats(stream, tmp, 4);
  356|    500|        pDest.x = tmp[0];
  357|    500|        pDest.y = tmp[1];
  358|    500|        pDest.z = tmp[2];
  359|    500|        pDest.w = tmp[3];
  360|    500|    }
_ZN4Ogre10Serializer20flipFromLittleEndianEPvmm:
  373|  70.5M|    {
  374|  70.5M|        if(mFlipEndian)
  ------------------
  |  Branch (374:12): [True: 70.4M, False: 89.9k]
  ------------------
  375|  70.4M|        {
  376|  70.4M|	        Bitwise::bswapChunks(pData, size, count);
  377|  70.4M|        }
  378|  70.5M|    }
_ZN4Ogre10Serializer14pushInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  381|   143k|    {
  382|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  383|       |        mChunkSizeStack.push_back(stream->tell());
  384|       |#endif
  385|   143k|    }
_ZN4Ogre10Serializer20backpedalChunkHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  387|   129k|    {
  388|   129k|        if (!stream->eof()){
  ------------------
  |  Branch (388:13): [True: 129k, False: 0]
  ------------------
  389|   129k|            stream->skip(-(int)calcChunkHeaderSize());
  390|   129k|        }
  391|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  392|       |        mChunkSizeStack.back() = stream->tell();
  393|       |#endif
  394|   129k|    }
_ZN4Ogre10Serializer13popInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  396|   139k|    {
  397|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  398|       |        if (!mChunkSizeStack.empty()){
  399|       |            size_t pos = stream->tell();
  400|       |            if (pos != static_cast<size_t>(mChunkSizeStack.back()) && !stream->eof() && mReportChunkErrors){
  401|       |                LogManager::getSingleton().logMessage("Corrupted chunk detected! Stream name: " + stream->getName());
  402|       |            }
  403|       |
  404|       |            mChunkSizeStack.pop_back();
  405|       |        }
  406|       |#endif
  407|   139k|    }

_ZN4Ogre8SkeletonC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   49|  1.48k|        : Resource(creator, name, handle, group, isManual, loader), 
   50|  1.48k|        mBlendState(ANIMBLEND_AVERAGE)
   51|       |        // set animation blending to weighted, not cumulative
   52|  1.48k|    {
   53|  1.48k|        if (createParamDictionary("Skeleton"))
  ------------------
  |  Branch (53:13): [True: 1, False: 1.48k]
  ------------------
   54|      1|        {
   55|       |            // no custom params
   56|      1|        }
   57|  1.48k|    }
_ZN4Ogre8SkeletonD2Ev:
   60|    574|    {
   61|       |        // have to call this here reather than in Resource destructor
   62|       |        // since calling virtual methods in base destructors causes crash
   63|    574|        unload(); 
   64|    574|    }
_ZN4Ogre8Skeleton11prepareImplEv:
   67|  10.5k|    {
   68|  10.5k|        SkeletonSerializer serializer;
   69|       |
   70|  10.5k|        if (getCreator()->getVerbose())
  ------------------
  |  Branch (70:13): [True: 10.5k, False: 0]
  ------------------
   71|  10.5k|            LogManager::getSingleton().stream() << "Skeleton: Loading " << mName;
   72|       |
   73|  10.5k|        DataStreamPtr stream = ResourceGroupManager::getSingleton().openResource(mName, mGroup, this);
   74|       |
   75|  10.5k|        serializer.importSkeleton(stream, this);
   76|       |
   77|       |        // Load any linked skeletons
   78|  10.5k|        for (auto& s : mLinkedSkeletonAnimSourceList)
  ------------------
  |  Branch (78:22): [True: 0, False: 10.5k]
  ------------------
   79|      0|        {
   80|      0|            s.pSkeleton = static_pointer_cast<Skeleton>(
   81|      0|                SkeletonManager::getSingleton().prepare(s.skeletonName, mGroup));
   82|      0|        }
   83|  10.5k|    }
_ZN4Ogre8Skeleton13unprepareImplEv:
   86|  10.5k|    {
   87|       |        // destroy bones
   88|  10.5k|        for (auto *b : mBoneList)
  ------------------
  |  Branch (88:22): [True: 0, False: 10.5k]
  ------------------
   89|      0|        {
   90|      0|            OGRE_DELETE b;
   91|      0|        }
   92|  10.5k|        mBoneList.clear();
   93|  10.5k|        mBoneListByName.clear();
   94|  10.5k|        mRootBones.clear();
   95|  10.5k|        mManualBones.clear();
   96|  10.5k|        mManualBonesDirty = false;
   97|       |
   98|       |        // Destroy animations
   99|  10.5k|        for (auto& ai : mAnimationsList)
  ------------------
  |  Branch (99:23): [True: 0, False: 10.5k]
  ------------------
  100|      0|        {
  101|      0|            OGRE_DELETE ai.second;
  102|      0|        }
  103|  10.5k|        mAnimationsList.clear();
  104|       |
  105|       |        // Remove all linked skeletons
  106|  10.5k|        mLinkedSkeletonAnimSourceList.clear();
  107|  10.5k|    }
_ZN4Ogre8Skeleton10createBoneERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEt:
  125|    524|    {
  126|    524|        OgreAssert(handle < OGRE_MAX_NUM_BONES, "Exceeded the maximum number of bones per skeleton");
  ------------------
  |  Branch (126:9): [True: 0, False: 524]
  ------------------
  127|       |        // Check handle not used
  128|    524|        if (handle < mBoneList.size() && mBoneList[handle] != NULL)
  ------------------
  |  Branch (128:13): [True: 23, False: 501]
  |  Branch (128:42): [True: 23, False: 0]
  ------------------
  129|     23|        {
  130|     23|            OGRE_EXCEPT(
  131|     23|                Exception::ERR_DUPLICATE_ITEM,
  132|     23|                "A bone with the handle " + StringConverter::toString(handle) + " already exists",
  133|     23|                "Skeleton::createBone" );
  134|     23|        }
  135|       |        // Check name not used
  136|    501|        if (mBoneListByName.find(name) != mBoneListByName.end())
  ------------------
  |  Branch (136:13): [True: 1, False: 500]
  ------------------
  137|      1|        {
  138|      1|            OGRE_EXCEPT(
  139|      1|                Exception::ERR_DUPLICATE_ITEM,
  140|      1|                "A bone with the name " + name + " already exists",
  141|      1|                "Skeleton::createBone" );
  142|      1|        }
  143|    500|        Bone* ret = OGRE_NEW Bone(name, handle, this);
  144|    500|        if (mBoneList.size() <= handle)
  ------------------
  |  Branch (144:13): [True: 500, False: 0]
  ------------------
  145|    500|        {
  146|    500|            mBoneList.resize(handle+1);
  147|    500|        }
  148|    500|        mBoneList[handle] = ret;
  149|    500|        mBoneListByName[name] = ret;
  150|    500|        return ret;
  151|    501|    }
_ZN4Ogre8Skeleton14setBindingPoseEv:
  223|    176|    {
  224|       |        // Update the derived transforms
  225|    176|        _updateTransforms();
  226|       |
  227|    176|        for (auto *b : mBoneList)
  ------------------
  |  Branch (227:22): [True: 127, False: 176]
  ------------------
  228|    127|        {            
  229|    127|            b->setBindingPose();
  230|    127|        }
  231|    176|    }
_ZN4Ogre8Skeleton15createAnimationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
  243|  1.85k|    {
  244|       |        // Check name not used
  245|  1.85k|        if (mAnimationsList.find(name) != mAnimationsList.end())
  ------------------
  |  Branch (245:13): [True: 12, False: 1.83k]
  ------------------
  246|     12|        {
  247|     12|            OGRE_EXCEPT(
  248|     12|                Exception::ERR_DUPLICATE_ITEM,
  249|     12|                "An animation with the name " + name + " already exists",
  250|     12|                "Skeleton::createAnimation");
  251|     12|        }
  252|       |
  253|  1.83k|        Animation* ret = OGRE_NEW Animation(name, length);
  254|  1.83k|        ret->_notifyContainer(this);
  255|       |
  256|       |        // Add to list
  257|  1.83k|        mAnimationsList[name] = ret;
  258|       |
  259|  1.83k|        return ret;
  260|       |
  261|  1.85k|    }
_ZN4Ogre8Skeleton17_updateTransformsEv:
  548|    176|    {
  549|    176|        for (auto *b : mRootBones)
  ------------------
  |  Branch (549:22): [True: 0, False: 176]
  ------------------
  550|      0|        {
  551|      0|            b->_update(true, false);
  552|      0|        }
  553|    176|        mManualBonesDirty = false;
  554|    176|    }
_ZN4Ogre8Skeleton32addLinkedSkeletonAnimationSourceERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
  591|  2.73k|    {
  592|       |        // Check not already linked
  593|  2.73k|        for (auto& l : mLinkedSkeletonAnimSourceList)
  ------------------
  |  Branch (593:22): [True: 24.2k, False: 1.36k]
  ------------------
  594|  24.2k|        {
  595|  24.2k|            if (skelName == l.skeletonName)
  ------------------
  |  Branch (595:17): [True: 1.37k, False: 22.8k]
  ------------------
  596|  1.37k|                return; // don't bother
  597|  24.2k|        }
  598|       |
  599|  1.36k|        if (isPrepared() || isLoaded())
  ------------------
  |  Branch (599:13): [True: 0, False: 1.36k]
  |  Branch (599:29): [True: 0, False: 1.36k]
  ------------------
  600|      0|        {
  601|       |            // Load immediately
  602|      0|            SkeletonPtr skelPtr = static_pointer_cast<Skeleton>(
  603|      0|                SkeletonManager::getSingleton().prepare(skelName, mGroup));
  604|      0|            mLinkedSkeletonAnimSourceList.push_back(
  605|      0|                LinkedSkeletonAnimationSource(skelName, scale, skelPtr));
  606|       |
  607|      0|        }
  608|  1.36k|        else
  609|  1.36k|        {
  610|       |            // Load later
  611|  1.36k|            mLinkedSkeletonAnimSourceList.push_back(
  612|  1.36k|                LinkedSkeletonAnimationSource(skelName, scale));
  613|  1.36k|        }
  614|       |
  615|  1.36k|    }

_ZN4Ogre15SkeletonManager12getSingletonEv:
   40|  11.6k|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|  11.6k|    }
_ZN4Ogre15SkeletonManagerC2Ev:
   45|      1|    {
   46|      1|        mLoadOrder = 300.0f;
   47|      1|        mResourceType = "Skeleton";
   48|       |
   49|      1|        ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
   50|      1|    }
_ZN4Ogre15SkeletonManager6createERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   60|    574|    {
   61|    574|        return static_pointer_cast<Skeleton>(createResource(name,group,isManual,loader,createParams));
   62|    574|    }
_ZN4Ogre15SkeletonManager10createImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmS9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   72|  1.48k|    {
   73|       |        return OGRE_NEW Skeleton(this, name, handle, group, isManual, loader);
   74|  1.48k|    }

_ZN4Ogre18SkeletonSerializerC2Ev:
   42|  11.1k|    {
   43|       |        // Version number
   44|       |        // NB changed to include bone names in 1.1
   45|  11.1k|        mVersion = "[Unknown]";
   46|  11.1k|    }
_ZN4Ogre18SkeletonSerializer14importSkeletonERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  105|    574|    {
  106|       |        // Determine endianness (must be the first thing we do!)
  107|    574|        determineEndianness(stream);
  108|       |
  109|       |        // Check header
  110|    574|        unsigned short headerID;
  111|    574|        readShorts(stream, &headerID, 1);
  112|    574|        if (headerID != HEADER_STREAM_ID_EXT)
  ------------------
  |  Branch (112:13): [True: 0, False: 574]
  ------------------
  113|      0|        {
  114|      0|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "File header not found",
  115|      0|                "SkeletonSerializer::importSkeleton");
  116|      0|        }
  117|       |
  118|       |        // Read version
  119|    574|        String ver = readString(stream);
  120|    574|        if ((ver != "[Serializer_v1.10]") &&
  ------------------
  |  Branch (120:13): [True: 570, False: 4]
  ------------------
  121|    570|            (ver != "[Serializer_v1.80]"))
  ------------------
  |  Branch (121:13): [True: 18, False: 552]
  ------------------
  122|     18|        {
  123|     18|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  124|     18|                "Invalid file: version incompatible, file reports " + String(ver),
  125|     18|                "SkeletonSerializer::importSkeleton");
  126|     18|        }
  127|    556|        mVersion = ver;
  128|       |
  129|    556|        pushInnerChunk(stream);
  130|    556|        unsigned short streamID = readChunk(stream);
  131|       |
  132|  6.55k|        while(!stream->eof())
  ------------------
  |  Branch (132:15): [True: 6.13k, False: 419]
  ------------------
  133|  6.13k|        {
  134|  6.13k|            switch (streamID)
  135|  6.13k|            {
  136|      8|            case SKELETON_BLENDMODE:
  ------------------
  |  Branch (136:13): [True: 8, False: 6.12k]
  ------------------
  137|      8|            {
  138|       |                // Optional blend mode
  139|      8|                uint16 blendMode;
  140|      8|                readShorts(stream, &blendMode, 1);
  141|      8|                pSkel->setBlendMode(static_cast<SkeletonAnimationBlendMode>(blendMode));
  142|      8|                break;
  143|      0|            }
  144|    546|            case SKELETON_BONE:
  ------------------
  |  Branch (144:13): [True: 546, False: 5.58k]
  ------------------
  145|    546|                readBone(stream, pSkel);
  146|    546|                break;
  147|     14|            case SKELETON_BONE_PARENT:
  ------------------
  |  Branch (147:13): [True: 14, False: 6.11k]
  ------------------
  148|     14|                readBoneParent(stream, pSkel);
  149|     14|                break;
  150|  1.85k|            case SKELETON_ANIMATION:
  ------------------
  |  Branch (150:13): [True: 1.85k, False: 4.28k]
  ------------------
  151|  1.85k|                readAnimation(stream, pSkel);
  152|  1.85k|                break;
  153|  2.73k|            case SKELETON_ANIMATION_LINK:
  ------------------
  |  Branch (153:13): [True: 2.73k, False: 3.39k]
  ------------------
  154|  2.73k|                readSkeletonAnimationLink(stream, pSkel);
  155|  2.73k|                break;
  156|    976|            default:
  ------------------
  |  Branch (156:13): [True: 976, False: 5.15k]
  ------------------
  157|    976|                break;
  158|  6.13k|            }
  159|       |
  160|  5.99k|            streamID = readChunk(stream);
  161|  5.99k|        }
  162|       |        // Assume bones are stored in the binding pose
  163|    419|        pSkel->setBindingPose();
  164|    419|        popInnerChunk(stream);
  165|       |
  166|    419|    }
_ZN4Ogre18SkeletonSerializer24calcBoneSizeWithoutScaleEPKNS_8SkeletonEPKNS_4BoneE:
  337|    500|    {
  338|    500|        size_t size = SSTREAM_OVERHEAD_SIZE;
  339|       |
  340|       |        // TODO: Add this for next skeleton format!
  341|       |        // Currently it is broken, because to determine that we have scale, it will compare chunk size.
  342|       |        //size += calcStringSize(pBone->getName());
  343|       |
  344|       |        // handle
  345|    500|        size += sizeof(unsigned short);
  346|       |
  347|       |        // position
  348|    500|        size += sizeof(float) * 3;
  349|       |
  350|       |        // orientation
  351|    500|        size += sizeof(float) * 4;
  352|       |
  353|    500|        return size;
  354|    500|    }
_ZN4Ogre18SkeletonSerializer8readBoneERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  446|    546|    {
  447|       |        // char* name
  448|    546|        String name = readString(stream);
  449|       |        // unsigned short handle            : handle of the bone, should be contiguous & start at 0
  450|    546|        unsigned short handle;
  451|    546|        readShorts(stream, &handle, 1);
  452|       |
  453|    546|        if (handle > pSkel->getNumBones())
  ------------------
  |  Branch (453:13): [True: 22, False: 524]
  ------------------
  454|    546|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone handles must be contiguous");
  455|       |
  456|       |        // Create new bone
  457|    524|        Bone* pBone = pSkel->createBone(name, handle);
  458|       |
  459|       |        // Vector3 position                 : position of this bone relative to parent 
  460|    524|        Vector3 pos;
  461|    524|        readObject(stream, pos);
  462|    524|        pBone->setPosition(pos);
  463|       |        // Quaternion orientation           : orientation of this bone relative to parent 
  464|    524|        Quaternion q;
  465|    524|        readObject(stream, q);
  466|    524|        pBone->setOrientation(q);
  467|       |
  468|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  469|       |        // Hack to fix chunk size validation:
  470|       |        mChunkSizeStack.back() += calcStringSize(name);
  471|       |#endif
  472|       |        // TODO: don't depend on mCurrentstreamLen in next skeleton format!
  473|       |        // Currently we use wrong chunk sizes, but we can't fix it, because we depend on mCurrentstreamLen
  474|       |        // Do we have scale?
  475|    524|        if (mCurrentstreamLen > calcBoneSizeWithoutScale(pSkel, pBone))
  ------------------
  |  Branch (475:13): [True: 11, False: 513]
  ------------------
  476|     11|        {
  477|     11|            Vector3 scale;
  478|     11|            readObject(stream, scale);
  479|     11|            pBone->setScale(scale);
  480|     11|        }
  481|       |        
  482|    524|    }
_ZN4Ogre18SkeletonSerializer14readBoneParentERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  485|     14|    {
  486|       |        // All bones have been created by this point
  487|     14|        Bone *child, *parent;
  488|     14|        unsigned short childHandle, parentHandle;
  489|       |
  490|       |        // unsigned short handle             : child bone
  491|     14|        readShorts(stream, &childHandle, 1);
  492|       |        // unsigned short parentHandle   : parent bone
  493|     14|        readShorts(stream, &parentHandle, 1);
  494|       |
  495|     14|        auto numBones = pSkel->getBones().size();
  496|     14|        if (parentHandle >= numBones || childHandle >= numBones)
  ------------------
  |  Branch (496:13): [True: 4, False: 10]
  |  Branch (496:41): [True: 1, False: 9]
  ------------------
  497|     14|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone handle out of range");
  498|       |
  499|      9|        if (childHandle == parentHandle)
  ------------------
  |  Branch (499:13): [True: 2, False: 7]
  ------------------
  500|      9|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "A bone cannot be parent of itself");
  501|       |
  502|       |        // Find bones
  503|      7|        parent = pSkel->getBone(parentHandle);
  504|      7|        child = pSkel->getBone(childHandle);
  505|       |
  506|       |        // attach
  507|      7|        parent->addChild(child);
  508|       |
  509|      7|    }
_ZN4Ogre18SkeletonSerializer13readAnimationERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  512|  1.85k|    {
  513|       |        // char* name                       : Name of the animation
  514|  1.85k|        String name;
  515|  1.85k|        name = readString(stream);
  516|       |        // float length                      : Length of the animation in seconds
  517|  1.85k|        float len;
  518|  1.85k|        readFloats(stream, &len, 1);
  519|       |
  520|  1.85k|        Animation *pAnim = pSkel->createAnimation(name, len);
  521|       |        // Read all tracks
  522|  1.85k|        if (!stream->eof())
  ------------------
  |  Branch (522:13): [True: 1.75k, False: 95]
  ------------------
  523|  1.75k|        {
  524|  1.75k|            pushInnerChunk(stream);
  525|  1.75k|            unsigned short streamID = readChunk(stream);
  526|       |            // Optional base info is possible
  527|  1.75k|            if (streamID == SKELETON_ANIMATION_BASEINFO)
  ------------------
  |  Branch (527:17): [True: 47, False: 1.70k]
  ------------------
  528|     47|            {
  529|       |                // char baseAnimationName
  530|     47|                String baseAnimName = readString(stream);
  531|       |                // float baseKeyFrameTime
  532|     47|                float baseKeyTime;
  533|     47|                readFloats(stream, &baseKeyTime, 1);
  534|       |                
  535|     47|                pAnim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
  536|       |                
  537|     47|                if (!stream->eof())
  ------------------
  |  Branch (537:21): [True: 45, False: 2]
  ------------------
  538|     45|                {
  539|       |                    // Get next stream
  540|     45|                    streamID = readChunk(stream);
  541|     45|                }
  542|     47|            }
  543|       |            
  544|  1.75k|            while(streamID == SKELETON_ANIMATION_TRACK && !stream->eof())
  ------------------
  |  Branch (544:19): [True: 4, False: 1.75k]
  |  Branch (544:59): [True: 3, False: 1]
  ------------------
  545|      3|            {
  546|      3|                readAnimationTrack(stream, pAnim, pSkel);
  547|       |
  548|      3|                if (!stream->eof())
  ------------------
  |  Branch (548:21): [True: 0, False: 3]
  ------------------
  549|      0|                {
  550|       |                    // Get next stream
  551|      0|                    streamID = readChunk(stream);
  552|      0|                }
  553|      3|            }
  554|  1.75k|            if (!stream->eof())
  ------------------
  |  Branch (554:17): [True: 1.68k, False: 74]
  ------------------
  555|  1.68k|            {
  556|       |                // Backpedal back to start of this stream if we've found a non-track
  557|  1.68k|                backpedalChunkHeader(stream);
  558|  1.68k|            }
  559|  1.75k|            popInnerChunk(stream);
  560|  1.75k|        }
  561|  1.85k|    }
_ZN4Ogre18SkeletonSerializer18readAnimationTrackERNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_8SkeletonE:
  565|      3|    {
  566|       |        // unsigned short boneIndex     : Index of bone to apply to
  567|      3|        unsigned short boneHandle;
  568|      3|        readShorts(stream, &boneHandle, 1);
  569|       |
  570|       |        // Find bone
  571|      3|        if (boneHandle >= pSkel->getBones().size())
  ------------------
  |  Branch (571:13): [True: 3, False: 0]
  ------------------
  572|      3|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track boneHandle out of range");
  573|      0|        Bone* targetBone = pSkel->getBone(boneHandle);
  574|       |
  575|       |        // Create track
  576|      0|        NodeAnimationTrack* pTrack = anim->createNodeTrack(boneHandle, targetBone);
  577|       |
  578|       |        // Keep looking for nested keyframes
  579|      0|        if (!stream->eof())
  ------------------
  |  Branch (579:13): [True: 0, False: 0]
  ------------------
  580|      0|        {
  581|      0|            pushInnerChunk(stream);
  582|      0|            unsigned short streamID = readChunk(stream);
  583|      0|            while(streamID == SKELETON_ANIMATION_TRACK_KEYFRAME && !stream->eof())
  ------------------
  |  Branch (583:19): [True: 0, False: 0]
  |  Branch (583:68): [True: 0, False: 0]
  ------------------
  584|      0|            {
  585|      0|                readKeyFrame(stream, pTrack, pSkel);
  586|       |
  587|      0|                if (!stream->eof())
  ------------------
  |  Branch (587:21): [True: 0, False: 0]
  ------------------
  588|      0|                {
  589|       |                    // Get next stream
  590|      0|                    streamID = readChunk(stream);
  591|      0|                }
  592|      0|            }
  593|      0|            if (!stream->eof())
  ------------------
  |  Branch (593:17): [True: 0, False: 0]
  ------------------
  594|      0|            {
  595|       |                // Backpedal back to start of this stream if we've found a non-keyframe
  596|      0|                backpedalChunkHeader(stream);
  597|      0|            }
  598|      0|            popInnerChunk(stream);
  599|      0|        }
  600|       |
  601|       |
  602|      0|    }
_ZN4Ogre18SkeletonSerializer25readSkeletonAnimationLinkERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  659|  2.73k|    {
  660|       |        // char* skeletonName
  661|  2.73k|        String skelName = readString(stream);
  662|       |        // float scale
  663|  2.73k|        float scale;
  664|  2.73k|        readFloats(stream, &scale, 1);
  665|       |
  666|  2.73k|        pSkel->addLinkedSkeletonAnimationSource(skelName, scale);
  667|       |
  668|  2.73k|    }

_ZN4Ogre16StreamSerialiserC2ERKNS_9SharedPtrINS_10DataStreamEEENS0_6EndianEbNS0_17RealStorageFormatE:
  109|     56|        : mStream(stream)
  110|     56|        , mEndian(endianMode)
  111|     56|        , mFlipEndian(false)
  112|     56|        , mReadWriteHeader(autoHeader)
  113|     56|        , mRealFormat(realFormat)
  114|     56|    {
  115|     56|        if (mEndian != ENDIAN_AUTO)
  ------------------
  |  Branch (115:13): [True: 0, False: 56]
  ------------------
  116|      0|        {
  117|       |#if OGRE_ENDIAN == OGRE_ENDIAN_BIG
  118|       |            if (mEndian == ENDIAN_LITTLE)
  119|       |                mFlipEndian = true;
  120|       |#else
  121|      0|            if (mEndian == ENDIAN_BIG)
  ------------------
  |  Branch (121:17): [True: 0, False: 0]
  ------------------
  122|      0|                mFlipEndian = true;
  123|      0|#endif
  124|       |
  125|      0|        }
  126|       |
  127|       |        OgreAssert(mStream, "Stream is null");
  ------------------
  |  Branch (127:9): [True: 0, False: 56]
  ------------------
  128|     56|    }
_ZN4Ogre16StreamSerialiserD2Ev:
  131|     56|    {
  132|       |        // really this should be empty if read/write was complete, but be tidy
  133|     56|        if (!mChunkStack.empty())
  ------------------
  |  Branch (133:13): [True: 0, False: 56]
  ------------------
  134|      0|        {
  135|      0|            LogManager::getSingleton().stream(LML_WARNING) <<
  136|      0|                "Warning: stream " << mStream->getName() << " was not fully read / written; " <<
  137|      0|                mChunkStack.size() << " chunks remain unterminated.";
  138|      0|        }
  139|     56|        for (auto & i : mChunkStack)
  ------------------
  |  Branch (139:23): [True: 0, False: 56]
  ------------------
  140|      0|            delete i;
  141|     56|        mChunkStack.clear();
  142|       |
  143|     56|    }
_ZN4Ogre16StreamSerialiser14makeIdentifierERA5_Kc:
  146|      2|    {
  147|      2|        uint32 ret = 0;
  148|     10|        for (size_t i = 0; i < 4; ++i)
  ------------------
  |  Branch (148:28): [True: 8, False: 2]
  ------------------
  149|      8|        {
  150|      8|            ret += (code[i] << (i * 8));
  151|      8|        }
  152|      2|        return ret;
  153|       |
  154|      2|    }
_ZN4Ogre16StreamSerialiser14readChunkBeginEv:
  165|    112|    {
  166|       |        // Have we figured out the endian mode yet?
  167|    112|        if (mReadWriteHeader)
  ------------------
  |  Branch (167:13): [True: 56, False: 56]
  ------------------
  168|     56|            readHeader();
  169|       |
  170|    112|        OgreAssert(mEndian != ENDIAN_AUTO,
  ------------------
  |  Branch (170:9): [True: 0, False: 112]
  ------------------
  171|    112|                   "Endian mode has not been determined, did you disable header without setting?");
  172|       |
  173|    112|        Chunk* chunk = readChunkImpl();
  174|    112|        mChunkStack.push_back(chunk);
  175|       |
  176|    112|        return chunk;
  177|       |
  178|    112|    }
_ZN4Ogre16StreamSerialiser10readHeaderEv:
  261|     56|    {
  262|     56|        uint32 headerid = 0;
  263|     56|        size_t actually_read = mStream->read(&headerid, sizeof(uint32));
  264|       |        // skip back
  265|     56|        mStream->skip(0 - (long)actually_read);
  266|       |        // validate that this is a header chunk
  267|     56|        if (headerid == REVERSE_HEADER_ID)
  ------------------
  |  Branch (267:13): [True: 0, False: 56]
  ------------------
  268|      0|        {
  269|      0|            mFlipEndian = true;
  270|      0|        }
  271|     56|        else if (headerid == HEADER_ID)
  ------------------
  |  Branch (271:18): [True: 56, False: 0]
  ------------------
  272|     56|        {
  273|     56|            mFlipEndian = false;
  274|     56|        }
  275|      0|        else
  276|      0|        {
  277|       |            // no good
  278|      0|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, 
  279|      0|                "Cannot determine endian mode because header is missing", 
  280|      0|                "StreamSerialiser::readHeader");
  281|      0|        }
  282|     56|        determineEndianness();
  283|       |
  284|     56|        mReadWriteHeader = false;
  285|       |
  286|     56|        const Chunk* c = readChunkBegin();
  287|       |        // endian should be flipped now
  288|     56|        assert(c->id == HEADER_ID);
  289|     56|        (void)c; // Silence warning
  290|       |
  291|       |        // read real storage format
  292|     56|        bool realIsDouble;
  293|     56|        read(&realIsDouble);
  294|     56|        mRealFormat = realIsDouble? REAL_DOUBLE : REAL_FLOAT;
  ------------------
  |  Branch (294:23): [True: 0, False: 56]
  ------------------
  295|       |
  296|     56|        readChunkEnd(HEADER_ID);
  297|       |
  298|     56|    }
_ZN4Ogre16StreamSerialiser19determineEndiannessEv:
  301|     56|    {
  302|       |#if OGRE_ENDIAN == OGRE_ENDIAN_BIG
  303|       |        if (mFlipEndian)
  304|       |            mEndian = ENDIAN_LITTLE;
  305|       |        else
  306|       |            mEndian = ENDIAN_BIG;
  307|       |#else
  308|     56|        if (mFlipEndian)
  ------------------
  |  Branch (308:13): [True: 0, False: 56]
  ------------------
  309|      0|            mEndian = ENDIAN_BIG;
  310|     56|        else
  311|     56|            mEndian = ENDIAN_LITTLE;
  312|     56|#endif
  313|     56|    }
_ZNK4Ogre16StreamSerialiser11checkStreamEbbb:
  330|    168|    {
  331|    168|        OgreAssert(mStream, "Stream is null");
  ------------------
  |  Branch (331:9): [True: 0, False: 168]
  ------------------
  332|       |
  333|    168|        if (failOnEof && mStream->eof())
  ------------------
  |  Branch (333:13): [True: 168, False: 0]
  |  Branch (333:26): [True: 0, False: 168]
  ------------------
  334|    168|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Invalid operation, end of file on stream");
  335|       |
  336|    168|        if (validateReadable && !mStream->isReadable())
  ------------------
  |  Branch (336:13): [True: 168, False: 0]
  |  Branch (336:33): [True: 0, False: 168]
  ------------------
  337|    168|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Invalid operation, file is not readable");
  338|       |
  339|    168|        if (validateWriteable && !mStream->isWriteable())
  ------------------
  |  Branch (339:13): [True: 0, False: 168]
  |  Branch (339:34): [True: 0, False: 0]
  ------------------
  340|       |            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Invalid operation, file is not writeable");
  341|    168|    }
_ZN4Ogre16StreamSerialiser13readChunkImplEv:
  421|     56|    {
  422|     56|        auto chunk = std::make_unique<Chunk>();
  423|     56|        chunk->offset = static_cast<uint32>(mStream->tell());
  424|     56|        read(&chunk->id);
  425|     56|        read(&chunk->version);
  426|     56|        read(&chunk->length);
  427|       |
  428|     56|        if (chunk->length > mStream->size() - mStream->tell())
  ------------------
  |  Branch (428:13): [True: 56, False: 0]
  ------------------
  429|     56|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Chunk length field exceeds remaining stream data");
  430|       |
  431|      0|        uint32 checksum;
  432|      0|        read(&checksum);
  433|       |        
  434|      0|        if (checksum != calculateChecksum(chunk.get()))
  ------------------
  |  Branch (434:13): [True: 0, False: 0]
  ------------------
  435|      0|        {
  436|       |            // no good, this is an invalid chunk
  437|      0|            uint32 off = chunk->offset;
  438|      0|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, 
  439|      0|                "Corrupt chunk detected in stream " + mStream->getName() + " at byte "
  440|      0|                + StringConverter::toString(off), 
  441|      0|                "StreamSerialiser::readChunkImpl");
  442|      0|        }
  443|       |
  444|      0|        return chunk.release();
  445|       |
  446|       |
  447|      0|    }
_ZN4Ogre16StreamSerialiser8readDataEPvmm:
  617|    168|    {
  618|    168|        checkStream(true, true, false);
  619|       |
  620|    168|        size_t totSize = size * count;
  621|    168|        mStream->read(buf, totSize);
  622|       |
  623|    168|        if (mFlipEndian)
  ------------------
  |  Branch (623:13): [True: 0, False: 168]
  ------------------
  624|      0|			Bitwise::bswapChunks(buf, size, count);
  625|       |
  626|    168|    }

_ZN4Ogre10StringUtil4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbb:
   42|  92.2k|    {
   43|       |        /*
   44|       |        size_t lspaces, rspaces, len = length(), i;
   45|       |
   46|       |        lspaces = rspaces = 0;
   47|       |
   48|       |        if( left )
   49|       |        {
   50|       |            // Find spaces / tabs on the left
   51|       |            for( i = 0;
   52|       |                i < len && ( at(i) == ' ' || at(i) == '\t' || at(i) == '\r');
   53|       |                ++lspaces, ++i );
   54|       |        }
   55|       |        
   56|       |        if( right && lspaces < len )
   57|       |        {
   58|       |            // Find spaces / tabs on the right
   59|       |            for( i = len - 1;
   60|       |                i >= 0 && ( at(i) == ' ' || at(i) == '\t' || at(i) == '\r');
   61|       |                rspaces++, i-- );
   62|       |        }
   63|       |
   64|       |        *this = substr(lspaces, len-lspaces-rspaces);
   65|       |        */
   66|  92.2k|        static const String delims = " \t\r\n";
   67|  92.2k|        if(right)
  ------------------
  |  Branch (67:12): [True: 92.2k, False: 0]
  ------------------
   68|  92.2k|            str.erase(str.find_last_not_of(delims)+1); // trim right
   69|  92.2k|        if(left)
  ------------------
  |  Branch (69:12): [True: 92.2k, False: 0]
  ------------------
   70|  92.2k|            str.erase(0, str.find_first_not_of(delims)); // trim left
   71|  92.2k|    }
_ZN4Ogre10StringUtil6formatEPKcz:
  488|  4.87k|    {
  489|       |        // try to use a stack buffer and fall back to heap for large strings
  490|  4.87k|        char sbuf[1024];
  491|  4.87k|        size_t bsize = sizeof(sbuf);
  492|  4.87k|        std::vector<char> hbuf;
  493|  4.87k|        char* pbuf = sbuf;
  494|       |
  495|  4.98k|        while (true)
  ------------------
  |  Branch (495:16): [True: 4.98k, Folded]
  ------------------
  496|  4.98k|        {
  497|  4.98k|            va_list va;
  498|  4.98k|            va_start(va, fmt);
  499|  4.98k|            int len = vsnprintf(pbuf, bsize, fmt, va);
  500|  4.98k|            va_end(va);
  501|       |
  502|  4.98k|            OgreAssert(len >= 0, "Check format string for errors");
  ------------------
  |  Branch (502:13): [True: 0, False: 4.98k]
  ------------------
  503|  4.98k|            if (size_t(len) >= bsize)
  ------------------
  |  Branch (503:17): [True: 106, False: 4.87k]
  ------------------
  504|    106|            {
  505|    106|                hbuf.resize(len + 1);
  506|    106|                pbuf = hbuf.data();
  507|    106|                bsize = hbuf.size();
  508|    106|                continue;
  509|    106|            }
  510|  4.87k|            pbuf[bsize - 1] = 0;
  511|  4.87k|            return String(pbuf, len);
  512|  4.98k|        }
  513|  4.87k|    }

_ZN4Ogre15ParamDictionaryC2Ev:
   36|      2|    ParamDictionary::ParamDictionary() {}
_ZN4Ogre15ParamDictionaryD2Ev:
   37|      4|    ParamDictionary::~ParamDictionary() {}
_ZN4Ogre15StringInterface21createParamDictionaryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   72|  1.48k|    {
   73|  1.48k|        OGRE_LOCK_MUTEX( msDictionaryMutex );
   74|       |
   75|  1.48k|        ParamDictionaryMap::iterator it = msDictionary.find(className);
   76|       |
   77|  1.48k|        if ( it == msDictionary.end() )
  ------------------
  |  Branch (77:14): [True: 2, False: 1.48k]
  ------------------
   78|      2|        {
   79|      2|            mParamDict = &msDictionary.insert( std::make_pair( className, ParamDictionary() ) ).first->second;
   80|      2|            mParamDictName = className;
   81|      2|            return true;
   82|      2|        }
   83|  1.48k|        else
   84|  1.48k|        {
   85|  1.48k|            mParamDict = &it->second;
   86|  1.48k|            mParamDictName = className;
   87|  1.48k|            return false;
   88|  1.48k|        }
   89|  1.48k|    }

_ZN4Ogre7SubMeshC2Ev:
   33|  4.87k|        : vertexData(0)
   34|  4.87k|        , parent(0)
   35|  4.87k|        , useSharedVertices(true)
   36|  4.87k|        , operationType(RenderOperation::OT_TRIANGLE_LIST)
   37|  4.87k|        , mBoneAssignmentsOutOfDate(false)
   38|  4.87k|        , mVertexAnimationType(VAT_NONE)
   39|  4.87k|        , mVertexAnimationIncludesNormals(false)
   40|  4.87k|        , mBuildEdgesEnabled(true)
   41|  4.87k|    {
   42|       |        indexData = OGRE_NEW IndexData();
   43|  4.87k|    }
_ZN4Ogre7SubMesh17addBoneAssignmentERKNS_20VertexBoneAssignmentE:
   81|      1|    {
   82|      1|        OgreAssert(!useSharedVertices,
  ------------------
  |  Branch (82:9): [True: 1, False: 0]
  ------------------
   83|      0|                   "This SubMesh uses shared geometry, you must assign bones to the Mesh, not the SubMesh");
   84|      0|        mBoneAssignments.emplace(vertBoneAssign.vertexIndex, vertBoneAssign);
   85|      0|        mBoneAssignmentsOutOfDate = true;
   86|      0|    }

_ZN4Ogre9TechniqueC2EPNS_8MaterialE:
   35|      3|        : mParent(parent), mIlluminationPassesCompilationPhase(IPS_NOT_COMPILED), mIsSupported(false), mLodIndex(0), mSchemeIndex(0)
   36|      3|    {
   37|       |        // See above, defaults to unsupported until examined
   38|      3|    }
_ZNK4Ogre9Technique11isSupportedEv:
   54|      2|    {
   55|      2|        return mIsSupported;
   56|      2|    }
_ZN4Ogre9Technique10createPassEv:
  310|      1|    {
  311|       |        Pass* newPass = OGRE_NEW Pass(this, static_cast<unsigned short>(mPasses.size()));
  312|      1|        mPasses.push_back(newPass);
  313|      1|        return newPass;
  314|      1|    }
_ZN4Ogre9Technique15removeAllPassesEv:
  341|      2|    {
  342|      2|        for (auto *p : mPasses)
  ------------------
  |  Branch (342:22): [True: 0, False: 2]
  ------------------
  343|      0|        {
  344|      0|            p->queueForDeletion();
  345|      0|        }
  346|      2|        mPasses.clear();
  347|      2|    }
_ZN4Ogre9TechniqueaSERKS0_:
  398|      2|    {
  399|      2|        if (this == &rhs)
  ------------------
  |  Branch (399:13): [True: 0, False: 2]
  ------------------
  400|      0|            return *this;
  401|       |
  402|      2|        mName = rhs.mName;
  403|      2|        this->mIsSupported = rhs.mIsSupported;
  404|      2|        this->mLodIndex = rhs.mLodIndex;
  405|      2|        this->mSchemeIndex = rhs.mSchemeIndex;
  406|      2|        this->mShadowCasterMaterial = rhs.mShadowCasterMaterial;
  407|      2|        this->mShadowCasterMaterialName = rhs.mShadowCasterMaterialName;
  408|      2|        this->mShadowReceiverMaterial = rhs.mShadowReceiverMaterial;
  409|      2|        this->mShadowReceiverMaterialName = rhs.mShadowReceiverMaterialName;
  410|      2|        this->mGPUVendorRules = rhs.mGPUVendorRules;
  411|      2|        this->mGPUDeviceNameRules = rhs.mGPUDeviceNameRules;
  412|       |
  413|       |        // copy passes
  414|      2|        removeAllPasses();
  415|      2|        for (auto *rp : rhs.mPasses)
  ------------------
  |  Branch (415:23): [True: 2, False: 2]
  ------------------
  416|      2|        {
  417|      2|            Pass* p = OGRE_NEW Pass(this, rp->getIndex(), *(rp));
  418|      2|            mPasses.push_back(p);
  419|      2|        }
  420|       |        // Compile for categorised illumination on demand
  421|      2|        clearIlluminationPasses();
  422|      2|        mIlluminationPassesCompilationPhase = IPS_NOT_COMPILED;
  423|      2|        return *this;
  424|      2|    }
_ZN4Ogre9Technique18setLightingEnabledEb:
  631|      1|    void Technique::setLightingEnabled(bool enabled) { ALL_PASSES(setLightingEnabled(enabled)); }
  ------------------
  |  |  581|      1|    #define ALL_PASSES(fncall) for(auto p : mPasses) p->fncall
  |  |  ------------------
  |  |  |  Branch (581:43): [True: 1, False: 1]
  |  |  ------------------
  ------------------
_ZN4Ogre9Technique23clearIlluminationPassesEv:
  958|      2|    {
  959|      2|        if(MaterialManager::getSingletonPtr())
  ------------------
  |  Branch (959:12): [True: 2, False: 0]
  ------------------
  960|      2|            MaterialManager::getSingleton()._notifyBeforeIlluminationPassesCleared(this);
  961|       |
  962|      2|        for (auto *i : mIlluminationPasses)
  ------------------
  |  Branch (962:22): [True: 0, False: 2]
  ------------------
  963|      0|        {
  964|      0|            if (i->destroyOnShutdown)
  ------------------
  |  Branch (964:17): [True: 0, False: 0]
  ------------------
  965|      0|            {
  966|      0|                i->pass->queueForDeletion();
  967|      0|            }
  968|       |            OGRE_DELETE i;
  969|      0|        }
  970|      2|        mIlluminationPasses.clear();
  971|      2|    }

_ZN4Ogre7SamplerC2Ev:
   40|      2|        : mBorderColour(ColourValue::Black)
   41|      2|        , mMaxAniso(1)
   42|      2|        , mMipmapBias(0)
   43|      2|        , mMinFilter(FO_LINEAR)
   44|      2|        , mMagFilter(FO_LINEAR)
   45|      2|        , mMipFilter(FO_POINT)
   46|      2|        , mCompareFunc(CMPF_GREATER_EQUAL)
   47|      2|        , mCompareEnabled(false)
   48|      2|        , mDirty(true)
   49|      2|    {
   50|      2|        setAddressingMode(TAM_WRAP);
   51|      2|    }
_ZN4Ogre7Sampler17setAddressingModeERKNS0_17UVWAddressingModeE:
   55|      2|    {
   56|      2|        mAddressMode = uvw;
   57|      2|        mDirty = true;
   58|      2|    }

_ZN4Ogre10VertexDataC2EPNS_25HardwareBufferManagerBaseE:
  172|  18.6k|    {
  173|  18.6k|        mMgr = mgr ? mgr : HardwareBufferManager::getSingletonPtr();
  ------------------
  |  Branch (173:16): [True: 0, False: 18.6k]
  ------------------
  174|  18.6k|        vertexBufferBinding = mMgr->createVertexBufferBinding();
  175|  18.6k|        vertexDeclaration = mMgr->createVertexDeclaration();
  176|  18.6k|        mDeleteDclBinding = true;
  177|  18.6k|        vertexCount = 0;
  178|  18.6k|        vertexStart = 0;
  179|  18.6k|        hwAnimDataItemsUsed = 0;
  180|       |
  181|  18.6k|    }
_ZN4Ogre10VertexDataD2Ev:
  196|  17.7k|    {
  197|  17.7k|        if (mDeleteDclBinding)
  ------------------
  |  Branch (197:13): [True: 17.7k, False: 0]
  ------------------
  198|  17.7k|        {
  199|  17.7k|            mMgr->destroyVertexBufferBinding(vertexBufferBinding);
  200|  17.7k|            mMgr->destroyVertexDeclaration(vertexDeclaration);
  201|  17.7k|        }
  202|  17.7k|    }
_ZN4Ogre10VertexData20convertVertexElementENS_21VertexElementSemanticENS_17VertexElementTypeEt:
  269|    753|    {
  270|    753|        auto elem = vertexDeclaration->findElementBySemantic(semantic, index);
  271|       |
  272|    753|        if(!elem)
  ------------------
  |  Branch (272:12): [True: 741, False: 12]
  ------------------
  273|    741|            return; // nothing to do
  274|       |
  275|     12|        auto srcBaseType = VertexElement::getBaseType(elem->getType());
  276|     12|        if (srcBaseType == VET_FLOAT1 && srcBaseType == VertexElement::getBaseType(dstType))
  ------------------
  |  Branch (276:13): [True: 1, False: 11]
  |  Branch (276:42): [True: 1, False: 0]
  ------------------
  277|      1|            return; // silently ignore floatX > floatY conversions
  278|       |
  279|     11|        auto srcType = elem->getType();
  280|     11|        auto vbuf = vertexBufferBinding->getBuffer(elem->getSource());
  281|       |
  282|     11|        uint32 newElemSize = VertexElement::getTypeSize(dstType);
  283|     11|        size_t newVertexSize = vbuf->getVertexSize() - elem->getSize() + newElemSize;
  284|     11|        auto newVBuf = vbuf->getManager()->createVertexBuffer(newVertexSize, vbuf->getNumVertices(), vbuf->getUsage(),
  285|     11|                                                              vbuf->hasShadowBuffer());
  286|       |
  287|     11|        {
  288|     11|            HardwareBufferLockGuard dst(newVBuf, HardwareBuffer::HBL_DISCARD);
  289|     11|            auto pDst = static_cast<uint8*>(dst.pData);
  290|       |
  291|     11|            if(dstType == VET_INT_10_10_10_2_NORM)
  ------------------
  |  Branch (291:16): [True: 0, False: 11]
  ------------------
  292|      0|            {
  293|      0|                if(srcType == VET_FLOAT3)
  ------------------
  |  Branch (293:20): [True: 0, False: 0]
  ------------------
  294|      0|                    spliceElement(elem, vbuf, pDst, pDst, newElemSize, pack_10_10_10_2<false>);
  295|      0|                else
  296|      0|                {
  297|      0|                    OgreAssert(srcType == VET_FLOAT4, "unsupported conversion");
  ------------------
  |  Branch (297:21): [True: 0, False: 0]
  ------------------
  298|      0|                    spliceElement(elem, vbuf, pDst, pDst, newElemSize, pack_10_10_10_2<true>);
  299|      0|                }
  300|      0|            }
  301|     11|            else if(dstType == VET_FLOAT3)
  ------------------
  |  Branch (301:21): [True: 2, False: 9]
  ------------------
  302|      2|            {
  303|      2|                OgreAssert(srcType == VET_INT_10_10_10_2_NORM, "unsupported conversion");
  ------------------
  |  Branch (303:17): [True: 2, False: 0]
  ------------------
  304|      0|                spliceElement(elem, vbuf, pDst, pDst, newElemSize, unpack_10_10_10_2<false>);
  305|      0|            }
  306|      9|            else if(dstType == VET_FLOAT4)
  ------------------
  |  Branch (306:21): [True: 0, False: 9]
  ------------------
  307|      0|            {
  308|      0|                OgreAssert(srcType == VET_INT_10_10_10_2_NORM, "unsupported conversion");
  ------------------
  |  Branch (308:17): [True: 0, False: 0]
  ------------------
  309|      0|                spliceElement(elem, vbuf, pDst, pDst, newElemSize, unpack_10_10_10_2<true>);
  310|      0|            }
  311|      9|            else if(dstType == VET_HALF3)
  ------------------
  |  Branch (311:21): [True: 0, False: 9]
  ------------------
  312|      0|            {
  313|      0|                OgreAssert(srcType == VET_FLOAT3, "unsupported conversion");
  ------------------
  |  Branch (313:17): [True: 0, False: 0]
  ------------------
  314|      0|                spliceElement(elem, vbuf, pDst, pDst, newElemSize, float_to_half_3);
  315|      0|            }
  316|      9|            else if(dstType == VET_HALF4 || dstType == VET_SHORT4 || dstType == VET_USHORT4)
  ------------------
  |  Branch (316:21): [True: 9, False: 0]
  |  Branch (316:45): [True: 0, False: 0]
  |  Branch (316:70): [True: 0, False: 0]
  ------------------
  317|      0|            {
  318|       |                // pad 16x3 formats to 16x4
  319|      0|                OgreAssert(srcType == VET_HALF3 || srcType == VET_SHORT3 || srcType == VET_USHORT3, "unsupported conversion");
  ------------------
  |  Branch (319:17): [True: 0, False: 0]
  |  Branch (319:17): [True: 0, False: 0]
  |  Branch (319:17): [True: 0, False: 0]
  ------------------
  320|      0|                spliceElement(elem, vbuf, pDst, pDst, newElemSize, pad_16x3);
  321|      0|            }
  322|      9|            else
  323|      9|            {
  324|      9|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "unsupported dstType");
  325|      9|            }
  326|     11|        }
  327|       |
  328|       |        // Bind the new buffer
  329|      0|        vertexBufferBinding->setBinding(elem->getSource(), newVBuf);
  330|      0|        updateVertexDeclaration(vertexDeclaration, elem, dstType, elem->getSource());
  331|      0|    }
_ZN4Ogre10VertexData19convertPackedColourENS_17VertexElementTypeES1_:
  645|  17.4k|    {
  646|  17.4k|        OgreAssert(destType == VET_UBYTE4_NORM, "Not supported");
  ------------------
  |  Branch (646:9): [True: 0, False: 17.4k]
  ------------------
  647|       |
  648|  17.4k|        const VertexBufferBinding::VertexBufferBindingMap& bindMap = 
  649|  17.4k|            vertexBufferBinding->getBindings();
  650|  17.4k|        for (auto& m : bindMap)
  ------------------
  |  Branch (650:22): [True: 529, False: 17.4k]
  ------------------
  651|    529|        {
  652|    529|            const auto& elems =
  653|    529|                vertexDeclaration->findElementsBySource(m.first);
  654|    529|            bool conversionNeeded = false;
  655|    529|            for (auto& e : elems)
  ------------------
  |  Branch (655:26): [True: 565, False: 529]
  ------------------
  656|    565|            {
  657|    565|                if (e.getType() == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (657:21): [True: 30, False: 535]
  ------------------
  658|     30|                {
  659|     30|                    conversionNeeded = true;
  660|     30|                }
  661|    565|            }
  662|       |
  663|    529|            if (conversionNeeded)
  ------------------
  |  Branch (663:17): [True: 30, False: 499]
  ------------------
  664|     30|            {
  665|     30|                void* pBase = m.second->lock(HardwareBuffer::HBL_NORMAL);
  666|       |
  667|  1.00k|                for (size_t v = 0; v < m.second->getNumVertices(); ++v)
  ------------------
  |  Branch (667:36): [True: 978, False: 30]
  ------------------
  668|    978|                {
  669|       |
  670|    978|                    for (auto& e : elems)
  ------------------
  |  Branch (670:34): [True: 1.95k, False: 978]
  ------------------
  671|  1.95k|                    {
  672|  1.95k|                        if (e.getType() == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (672:29): [True: 978, False: 978]
  ------------------
  673|    978|                        {
  674|    978|                            uint32* pRGBA;
  675|    978|                            e.baseVertexPointerToElement(pBase, &pRGBA);
  676|    978|                            swapPackedRB(pRGBA);
  677|    978|                        }
  678|  1.95k|                    }
  679|    978|                    pBase = static_cast<void*>(
  680|    978|                        static_cast<char*>(pBase) + m.second->getVertexSize());
  681|    978|                }
  682|     30|                m.second->unlock();
  683|       |
  684|       |                // Modify the elements to reflect the changed type
  685|     30|                const VertexDeclaration::VertexElementList& allelems = 
  686|     30|                    vertexDeclaration->getElements();
  687|     30|                unsigned short elemIndex = 0;
  688|     30|                for (auto& e : allelems)
  ------------------
  |  Branch (688:30): [True: 60, False: 30]
  ------------------
  689|     60|                {
  690|     60|                    if (e.getType() == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (690:25): [True: 30, False: 30]
  ------------------
  691|     30|                    {
  692|     30|                        vertexDeclaration->modifyElement(elemIndex,
  693|     30|                            e.getSource(), e.getOffset(), destType,
  694|     30|                            e.getSemantic(), e.getIndex());
  695|     30|                    }
  696|     60|                    ++elemIndex;
  697|     60|                }
  698|     30|            }
  699|    529|        } // each buffer
  700|  17.4k|    }
_ZN4Ogre9IndexDataC2Ev:
  770|  4.87k|    {
  771|  4.87k|        indexCount = 0;
  772|  4.87k|        indexStart = 0;
  773|       |        
  774|  4.87k|    }
OgreVertexIndexData.cpp:_ZN4OgreL12swapPackedRBEPj:
   36|    978|    {
   37|    978|        auto cptr = (uint8*)ptr;
   38|    978|        std::swap(cptr[0], cptr[2]);
   39|    978|    }

LLVMFuzzerTestOneInput:
  167|  3.29k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  168|  3.29k|  if (size < 2)
  ------------------
  |  Branch (168:7): [True: 0, False: 3.29k]
  ------------------
  169|      0|    return 0;
  170|       |
  171|  3.29k|  global_init();
  172|       |
  173|  3.29k|  FuzzedDataProvider provider(data, size);
  174|  3.29k|  uint8_t target = provider.ConsumeIntegral<uint8_t>() % FUZZ_TARGET_COUNT;
  175|  3.29k|  auto remaining = provider.ConsumeRemainingBytes<uint8_t>();
  176|       |
  177|  3.29k|  if (remaining.empty())
  ------------------
  |  Branch (177:7): [True: 0, False: 3.29k]
  ------------------
  178|      0|    return 0;
  179|       |
  180|  3.29k|  switch (target) {
  ------------------
  |  Branch (180:11): [True: 3.29k, False: 0]
  ------------------
  181|  2.27k|  case FUZZ_MESH:
  ------------------
  |  Branch (181:3): [True: 2.27k, False: 1.02k]
  ------------------
  182|  2.27k|    fuzz_mesh(remaining.data(), remaining.size());
  183|  2.27k|    break;
  184|    574|  case FUZZ_SKELETON:
  ------------------
  |  Branch (184:3): [True: 574, False: 2.72k]
  ------------------
  185|    574|    fuzz_skeleton(remaining.data(), remaining.size());
  186|    574|    break;
  187|    396|  case FUZZ_CONFIG:
  ------------------
  |  Branch (187:3): [True: 396, False: 2.90k]
  ------------------
  188|    396|    fuzz_config(remaining.data(), remaining.size());
  189|    396|    break;
  190|     56|  case FUZZ_STREAM_SERIALISER:
  ------------------
  |  Branch (190:3): [True: 56, False: 3.24k]
  ------------------
  191|     56|    fuzz_stream_serialiser(remaining.data(), remaining.size());
  192|     56|    break;
  193|  3.29k|  }
  194|       |
  195|  3.29k|  return 0;
  196|  3.29k|}
ogre_deep_fuzz.cpp:_ZL11global_initv:
   57|  3.29k|static void global_init() {
   58|  3.29k|  if (g_initialized)
  ------------------
  |  Branch (58:7): [True: 3.29k, False: 1]
  ------------------
   59|  3.29k|    return;
   60|       |
   61|       |  /* Suppress all log output */
   62|      1|  auto *logMgr = new Ogre::LogManager();
   63|      1|  logMgr->createLog("fuzz.log", true, false, true); /* suppressFileOutput */
   64|      1|  logMgr->setMinLogLevel(Ogre::LML_CRITICAL);
   65|       |
   66|       |  /* Create singletons needed for Mesh/Skeleton operations */
   67|      1|  new Ogre::ResourceGroupManager();
   68|      1|  new Ogre::LodStrategyManager();
   69|      1|  new Ogre::DefaultHardwareBufferManager();
   70|      1|  new Ogre::MeshManager();
   71|      1|  new Ogre::SkeletonManager();
   72|      1|  auto *matMgr = new Ogre::MaterialManager();
   73|      1|  matMgr->initialise();
   74|       |
   75|      1|  g_initialized = true;
   76|      1|}
ogre_deep_fuzz.cpp:_ZL9fuzz_meshPKhm:
   78|  2.27k|static void fuzz_mesh(const uint8_t *data, size_t size) {
   79|  2.27k|  Ogre::MeshPtr mesh =
   80|  2.27k|      Ogre::MeshManager::getSingleton().create("fuzz.mesh", "General");
   81|       |
   82|  2.27k|  Ogre::DataStreamPtr stream(
   83|  2.27k|      new Ogre::MemoryDataStream(const_cast<uint8_t *>(data), size, false, true));
   84|       |
   85|  2.27k|  Ogre::MeshSerializer serializer;
   86|  2.27k|  try {
   87|  2.27k|    serializer.importMesh(stream, mesh.get());
   88|  2.27k|  } catch (Ogre::Exception &) {
   89|  1.46k|  } catch (std::exception &) {
   90|      3|  }
   91|       |
   92|  2.27k|  Ogre::MeshManager::getSingleton().remove(mesh);
   93|  2.27k|}
ogre_deep_fuzz.cpp:_ZL13fuzz_skeletonPKhm:
   95|    574|static void fuzz_skeleton(const uint8_t *data, size_t size) {
   96|    574|  Ogre::SkeletonPtr skeleton =
   97|    574|      Ogre::SkeletonManager::getSingleton().create("fuzz.skeleton", "General");
   98|       |
   99|    574|  Ogre::DataStreamPtr stream(
  100|    574|      new Ogre::MemoryDataStream(const_cast<uint8_t *>(data), size, false, true));
  101|       |
  102|    574|  Ogre::SkeletonSerializer serializer;
  103|    574|  try {
  104|    574|    serializer.importSkeleton(stream, skeleton.get());
  105|    574|  } catch (Ogre::Exception &) {
  106|    398|  } catch (std::exception &) {
  107|      0|  }
  108|       |
  109|    574|  Ogre::SkeletonManager::getSingleton().remove(skeleton);
  110|    574|}
ogre_deep_fuzz.cpp:_ZL11fuzz_configPKhm:
  112|    396|static void fuzz_config(const uint8_t *data, size_t size) {
  113|    396|  Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(
  114|    396|      "fuzz.cfg", const_cast<uint8_t *>(data), size, false, true));
  115|       |
  116|    396|  Ogre::ConfigFile cf;
  117|    396|  try {
  118|    396|    cf.load(stream);
  119|       |
  120|       |    /* Exercise iteration over parsed sections and settings */
  121|  3.97k|    for (auto &sec : cf.getSettingsBySection()) {
  ------------------
  |  Branch (121:20): [True: 3.97k, False: 396]
  ------------------
  122|  24.6k|      for (auto &kv : sec.second) {
  ------------------
  |  Branch (122:21): [True: 24.6k, False: 3.97k]
  ------------------
  123|  24.6k|        volatile const char *k = kv.first.c_str();
  124|  24.6k|        volatile const char *v = kv.second.c_str();
  125|  24.6k|        (void)k;
  126|  24.6k|        (void)v;
  127|  24.6k|      }
  128|  3.97k|    }
  129|    396|  } catch (Ogre::Exception &) {
  130|      0|  } catch (std::exception &) {
  131|      0|  }
  132|    396|}
ogre_deep_fuzz.cpp:_ZL22fuzz_stream_serialiserPKhm:
  134|     56|static void fuzz_stream_serialiser(const uint8_t *data, size_t size) {
  135|     56|  Ogre::DataStreamPtr stream(
  136|     56|      new Ogre::MemoryDataStream(const_cast<uint8_t *>(data), size, false, true));
  137|       |
  138|     56|  try {
  139|     56|    Ogre::StreamSerialiser serialiser(stream);
  140|       |
  141|       |    /* Try to read multiple chunks, exercising the chunk state machine */
  142|     56|    for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (142:21): [True: 56, False: 0]
  ------------------
  143|     56|      const Ogre::StreamSerialiser::Chunk *c = serialiser.readChunkBegin();
  144|     56|      if (!c)
  ------------------
  |  Branch (144:11): [True: 0, False: 56]
  ------------------
  145|      0|        break;
  146|       |
  147|       |      /* Try reading various data types from the chunk */
  148|     56|      Ogre::String str;
  149|     56|      try { serialiser.read(&str); } catch (...) {}
  150|       |
  151|     56|      Ogre::Real r;
  152|      0|      try { serialiser.read(&r); } catch (...) {}
  153|       |
  154|      0|      Ogre::Vector3 v3;
  155|      0|      try { serialiser.read(&v3); } catch (...) {}
  156|       |
  157|      0|      Ogre::Vector4 v4;
  158|      0|      try { serialiser.read(&v4); } catch (...) {}
  159|       |
  160|      0|      serialiser.readChunkEnd(c->id);
  161|      0|    }
  162|     56|  } catch (Ogre::Exception &) {
  163|     56|  } catch (std::exception &) {
  164|      0|  }
  165|     56|}

