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

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

_ZN4Ogre8EdgeData8TriangleC2Ev:
   71|  1.65k|            Triangle() :indexSet(0), vertexSet(0) {}

_ZN4Ogre8KeyFrameD2Ev:
   62|  3.40k|        virtual ~KeyFrame() {}
_ZNK4Ogre8KeyFrame7getTimeEv:
   65|  25.0k|        Real getTime(void) const { return mTime; }
_ZN4Ogre19VertexMorphKeyFrameD2Ev:
  158|    577|        ~VertexMorphKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrameD2Ev:
  187|  1.90k|        ~VertexPoseKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrame7PoseRefC2Etf:
  208|  2.12k|            PoseRef(ushort p, float i) : poseIndex(p), influence(i) {}

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

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

_ZNK4Ogre9SharedPtrINS_4MeshEEptEv:
   63|  3.86k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_10DataStreamEEC2INS_16MemoryDataStreamEEEPT_:
   50|  5.99k|        explicit SharedPtr(Y* ptr) : shared_ptr<T>(ptr) {}
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_4MeshEEERKNS0_IT_EE:
   55|  3.86k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}
_ZNK4Ogre9SharedPtrINS_8SkeletonEEptEv:
   63|    998|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_8SkeletonEEERKNS0_IT_EE:
   55|    998|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}

_ZN4Ogre16StreamSerialiser5ChunkC2Ev:
  105|  1.00k|            Chunk() : id(0), version(1), length(0), offset(0) {}
_ZN4Ogre16StreamSerialiser4readIjEEvPT_m:
  301|  3.32k|        {
  302|  3.32k|            readData(pT, sizeof(T), count);
  303|  3.32k|        }
_ZN4Ogre16StreamSerialiser4readItEEvPT_m:
  301|    896|        {
  302|    896|            readData(pT, sizeof(T), count);
  303|    896|        }
_ZN4Ogre16StreamSerialiser4readIcEEvPT_m:
  301|    250|        {
  302|    250|            readData(pT, sizeof(T), count);
  303|    250|        }
_ZN4Ogre16StreamSerialiser13readConvertedIfdEEvPT_T0_m:
  372|    588|        {
  373|    588|            std::vector<U> tmp(count);
  374|    588|            readData(tmp.data(), sizeof(U), count);
  375|    588|            for (auto& e : tmp)
  ------------------
  |  Branch (375:26): [True: 1.37k, False: 588]
  ------------------
  376|  1.37k|                *dst++ = static_cast<T>(e);
  377|    588|        }

_ZN4Ogre6VectorILi3EfEC2Ev:
  285|    586|        Vector() {}
_ZN4Ogre10VectorBaseILi3EfEC2Ev:
  130|    586|        VectorBase() {}
_ZN4Ogre6VectorILi4EfEC2Ev:
  285|    586|        Vector() {}
_ZN4Ogre10VectorBaseILi4EfEC2Ev:
  259|    586|        VectorBase() {}

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

_ZN4Ogre9AnimationC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
   39|  3.52k|        : mName(name)
   40|  3.52k|        , mLength(length)
   41|  3.52k|        , mInterpolationMode(msDefaultInterpolationMode)
   42|  3.52k|        , mRotationInterpolationMode(msDefaultRotationInterpolationMode)
   43|  3.52k|        , mKeyFrameTimesDirty(false)
   44|  3.52k|        , mUseBaseKeyFrame(false)
   45|  3.52k|        , mBaseKeyFrameTime(0.0f)
   46|  3.52k|        , mBaseKeyFrameAnimationName(BLANKSTRING)
   47|  3.52k|        , mContainer(0)
   48|  3.52k|    {
   49|  3.52k|    }
_ZN4Ogre9AnimationD2Ev:
   52|  3.52k|    {
   53|  3.52k|        destroyAllTracks();
   54|  3.52k|    }
_ZN4Ogre9Animation15createNodeTrackEt:
   67|    185|    {
   68|    185|        if (hasNodeTrack(handle))
  ------------------
  |  Branch (68:13): [True: 5, False: 180]
  ------------------
   69|      5|        {
   70|      5|            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM,
   71|      5|                "Node track with the specified handle " +
   72|      5|                StringConverter::toString(handle) + " already exists",
   73|      5|                "Animation::createNodeTrack");
   74|      5|        }
   75|       |
   76|    180|        NodeAnimationTrack* ret = OGRE_NEW NodeAnimationTrack(this, handle);
   77|       |
   78|    180|        mNodeTrackList[handle] = ret;
   79|    180|        return ret;
   80|    185|    }
_ZN4Ogre9Animation15createNodeTrackEtPNS_4NodeE:
   83|    185|    {
   84|    185|        NodeAnimationTrack* ret = createNodeTrack(handle);
   85|       |
   86|    185|        ret->setAssociatedNode(node);
   87|       |
   88|    185|        return ret;
   89|    185|    }
_ZNK4Ogre9Animation12hasNodeTrackEt:
   97|    185|    {
   98|    185|        return (mNodeTrackList.find(handle) != mNodeTrackList.end());
   99|    185|    }
_ZN4Ogre9Animation20destroyAllNodeTracksEv:
  130|  3.52k|    {
  131|  3.52k|        for (auto& t : mNodeTrackList)
  ------------------
  |  Branch (131:22): [True: 180, False: 3.52k]
  ------------------
  132|    180|        {
  133|       |            OGRE_DELETE t.second;
  134|    180|        }
  135|  3.52k|        mNodeTrackList.clear();
  136|  3.52k|        _keyFrameListChanged();
  137|  3.52k|    }
_ZN4Ogre9Animation23destroyAllNumericTracksEv:
  194|  3.52k|    {
  195|  3.52k|        for (auto& t : mNumericTrackList)
  ------------------
  |  Branch (195:22): [True: 0, False: 3.52k]
  ------------------
  196|      0|        {
  197|       |            OGRE_DELETE t.second;
  198|      0|        }
  199|  3.52k|        mNumericTrackList.clear();
  200|  3.52k|        _keyFrameListChanged();
  201|  3.52k|    }
_ZN4Ogre9Animation17createVertexTrackEtNS_19VertexAnimationTypeE:
  205|    462|    {
  206|    462|        if (hasVertexTrack(handle))
  ------------------
  |  Branch (206:13): [True: 8, False: 454]
  ------------------
  207|      8|        {
  208|      8|            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM,
  209|      8|                "Vertex track with the specified handle " +
  210|      8|                StringConverter::toString(handle) + " already exists",
  211|      8|                "Animation::createVertexTrack");
  212|      8|        }
  213|       |
  214|    454|        VertexAnimationTrack* ret = OGRE_NEW VertexAnimationTrack(this, handle, animType);
  215|       |
  216|    454|        mVertexTrackList[handle] = ret;
  217|    454|        return ret;
  218|       |
  219|    462|    }
_ZN4Ogre9Animation17createVertexTrackEtPNS_10VertexDataENS_19VertexAnimationTypeE:
  223|    462|    {
  224|    462|        OgreAssert(data, "VertexData must not be null");
  ------------------
  |  Branch (224:9): [True: 0, False: 462]
  ------------------
  225|    462|        VertexAnimationTrack* ret = createVertexTrack(handle, animType);
  226|       |
  227|    462|        ret->setAssociatedVertexData(data);
  228|       |
  229|    462|        return ret;
  230|    462|    }
_ZNK4Ogre9Animation14hasVertexTrackEt:
  238|    462|    {
  239|    462|        return (mVertexTrackList.find(handle) != mVertexTrackList.end());
  240|    462|    }
_ZN4Ogre9Animation22destroyAllVertexTracksEv:
  271|  3.52k|    {
  272|  3.52k|        for (auto& v : mVertexTrackList)
  ------------------
  |  Branch (272:22): [True: 454, False: 3.52k]
  ------------------
  273|    454|        {
  274|       |            OGRE_DELETE  v.second;
  275|    454|        }
  276|  3.52k|        mVertexTrackList.clear();
  277|  3.52k|        _keyFrameListChanged();
  278|  3.52k|    }
_ZN4Ogre9Animation16destroyAllTracksEv:
  281|  3.52k|    {
  282|  3.52k|        destroyAllNodeTracks();
  283|  3.52k|        destroyAllNumericTracks();
  284|  3.52k|        destroyAllVertexTracks();
  285|  3.52k|    }
_ZN4Ogre9Animation18setUseBaseKeyFrameEbfRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  658|    291|    {
  659|    291|        if (useBaseKeyFrame != mUseBaseKeyFrame ||
  ------------------
  |  Branch (659:13): [True: 291, 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|    291|        {
  663|    291|            mUseBaseKeyFrame = useBaseKeyFrame;
  664|    291|            mBaseKeyFrameTime = keyframeTime;
  665|    291|            mBaseKeyFrameAnimationName = baseAnimName;
  666|    291|        }
  667|    291|    }
_ZN4Ogre9Animation16_notifyContainerEPNS_18AnimationContainerE:
  737|  3.52k|    {
  738|  3.52k|        mContainer = c;
  739|  3.52k|    }

_ZN4Ogre14AnimationTrackC2EPNS_9AnimationEt:
   48|    634|        mParent(parent), mListener(0), mHandle(handle)
   49|    634|    {
   50|    634|    }
_ZN4Ogre14AnimationTrackD2Ev:
   53|    634|    {
   54|    634|        removeAllKeyFrames();
   55|    634|    }
_ZN4Ogre14AnimationTrack14createKeyFrameEf:
  129|  3.40k|    {
  130|  3.40k|        KeyFrame* kf = createKeyFrameImpl(timePos);
  131|       |
  132|       |        // Insert just before upper bound
  133|  3.40k|        KeyFrameList::iterator i =
  134|  3.40k|            std::upper_bound(mKeyFrames.begin(), mKeyFrames.end(), kf, KeyFrameTimeLess());
  135|  3.40k|        mKeyFrames.insert(i, kf);
  136|       |
  137|  3.40k|        _keyFrameDataChanged();
  138|  3.40k|        mParent->_keyFrameListChanged();
  139|       |
  140|  3.40k|        return kf;
  141|       |
  142|  3.40k|    }
_ZN4Ogre14AnimationTrack18removeAllKeyFramesEv:
  164|    634|    {
  165|    634|        for (auto *f : mKeyFrames)
  ------------------
  |  Branch (165:22): [True: 3.40k, False: 634]
  ------------------
  166|  3.40k|            OGRE_DELETE f;
  167|       |
  168|    634|        _keyFrameDataChanged();
  169|    634|        mParent->_keyFrameListChanged();
  170|       |
  171|    634|        mKeyFrames.clear();
  172|       |
  173|    634|    }
_ZN4Ogre18NodeAnimationTrackC2EPNS_9AnimationEt:
  357|    180|        : NodeAnimationTrack(parent, handle, 0)
  358|    180|    {
  359|    180|    }
_ZN4Ogre18NodeAnimationTrackC2EPNS_9AnimationEtPNS_4NodeE:
  362|    180|        : AnimationTrack(parent, handle), mSplineBuildNeeded(false), mUseShortestRotationPath(true),
  363|    180|          mTargetNode(targetNode), mSplines(0)
  364|       |
  365|    180|    {
  366|    180|    }
_ZN4Ogre18NodeAnimationTrackD2Ev:
  369|    180|    {
  370|       |        OGRE_DELETE_T(mSplines, Splines, MEMCATEGORY_ANIMATION);
  371|    180|    }
_ZN4Ogre18NodeAnimationTrack17setAssociatedNodeEPNS_4NodeE:
  469|    180|    {
  470|    180|        mTargetNode = node;
  471|    180|    }
_ZNK4Ogre18NodeAnimationTrack20_keyFrameDataChangedEv:
  564|  2.95k|    {
  565|  2.95k|        mSplineBuildNeeded = true;
  566|  2.95k|    }
_ZN4Ogre18NodeAnimationTrack18createKeyFrameImplEf:
  648|    915|    {
  649|       |        return OGRE_NEW TransformKeyFrame(this, time);
  650|    915|    }
_ZN4Ogre18NodeAnimationTrack18createNodeKeyFrameEf:
  653|    915|    {
  654|    915|        return static_cast<TransformKeyFrame*>(createKeyFrame(timePos));
  655|    915|    }
_ZN4Ogre20VertexAnimationTrackC2EPNS_9AnimationEtNS_19VertexAnimationTypeE:
  687|    454|        : AnimationTrack(parent, handle)
  688|    454|        , mAnimationType(animType)
  689|    454|    {
  690|    454|    }
_ZN4Ogre20VertexAnimationTrack25createVertexMorphKeyFrameEf:
  702|    579|    {
  703|    579|        OgreAssert(mAnimationType == VAT_MORPH, "Type mismatch");
  ------------------
  |  Branch (703:9): [True: 2, False: 577]
  ------------------
  704|    577|        return static_cast<VertexMorphKeyFrame*>(createKeyFrame(timePos));
  705|    579|    }
_ZN4Ogre20VertexAnimationTrack24createVertexPoseKeyFrameEf:
  708|  1.91k|    {
  709|  1.91k|        OgreAssert(mAnimationType == VAT_POSE, "Type mismatch");
  ------------------
  |  Branch (709:9): [True: 9, False: 1.90k]
  ------------------
  710|  1.90k|        return static_cast<VertexPoseKeyFrame*>(createKeyFrame(timePos));
  711|  1.91k|    }
_ZN4Ogre20VertexAnimationTrack18createKeyFrameImplEf:
  960|  2.48k|    {
  961|  2.48k|        switch(mAnimationType)
  962|  2.48k|        {
  963|      0|        default:
  ------------------
  |  Branch (963:9): [True: 0, False: 2.48k]
  ------------------
  964|    577|        case VAT_MORPH:
  ------------------
  |  Branch (964:9): [True: 577, False: 1.90k]
  ------------------
  965|    577|            return OGRE_NEW VertexMorphKeyFrame(this, time);
  966|  1.90k|        case VAT_POSE:
  ------------------
  |  Branch (966:9): [True: 1.90k, False: 577]
  ------------------
  967|  1.90k|            return OGRE_NEW VertexPoseKeyFrame(this, time);
  968|  2.48k|        };
  969|       |
  970|      0|    }
OgreAnimationTrack.cpp:_ZNK4Ogre12_GLOBAL__N_116KeyFrameTimeLessclEPKNS_8KeyFrameES4_:
   40|  12.5k|            {
   41|  12.5k|                return kf->getTime() < kf2->getTime();
   42|  12.5k|            }

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

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

_ZN4Ogre10ConfigFileC2Ev:
   38|    781|    {
   39|    781|    }
_ZN4Ogre10ConfigFile5clearEv:
   42|    781|    {
   43|    781|        mSettings.clear();
   44|    781|        mSettingsPtr.clear();
   45|    781|    }
_ZN4Ogre10ConfigFile4loadERKNS_9SharedPtrINS_10DataStreamEEERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEb:
   74|    781|    {
   75|       |        /* Clear current settings map */
   76|    781|        clear();
   77|       |
   78|    781|        String currentSection = BLANKSTRING;
   79|    781|        SettingsMultiMap* currentSettings = &mSettings[currentSection];
   80|    781|        mSettingsPtr[currentSection] = currentSettings;
   81|       |
   82|       |
   83|       |        /* Process the file line for line */
   84|    781|        String line, optName, optVal;
   85|  46.7k|        while (!stream->eof())
  ------------------
  |  Branch (85:16): [True: 45.9k, False: 781]
  ------------------
   86|  45.9k|        {
   87|  45.9k|            line = stream->getLine();
   88|       |            /* Ignore comments & blanks */
   89|  45.9k|            if (line.length() > 0 && line.at(0) != '#' && line.at(0) != '@')
  ------------------
  |  Branch (89:17): [True: 44.7k, False: 1.25k]
  |  Branch (89:38): [True: 44.4k, False: 215]
  |  Branch (89:59): [True: 44.2k, False: 262]
  ------------------
   90|  44.2k|            {
   91|  44.2k|                if (line.at(0) == '[' && line.at(line.length()-1) == ']')
  ------------------
  |  Branch (91:21): [True: 11.3k, False: 32.8k]
  |  Branch (91:42): [True: 10.1k, False: 1.24k]
  ------------------
   92|  10.1k|                {
   93|       |                    // Section
   94|  10.1k|                    currentSection = line.substr(1, line.length() - 2);
   95|  10.1k|                    currentSettings = &mSettings[currentSection];
   96|  10.1k|                    mSettingsPtr[currentSection] = currentSettings;
   97|  10.1k|                }
   98|  34.0k|                else
   99|  34.0k|                {
  100|       |                    /* Find the first separator character and split the string there */
  101|  34.0k|                    Ogre::String::size_type separator_pos = line.find_first_of(separators, 0);
  102|  34.0k|                    if (separator_pos != Ogre::String::npos)
  ------------------
  |  Branch (102:25): [True: 17.3k, False: 16.7k]
  ------------------
  103|  17.3k|                    {
  104|  17.3k|                        optName = line.substr(0, separator_pos);
  105|       |                        /* Find the first non-separator character following the name */
  106|  17.3k|                        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|  17.3k|                        optVal = (nonseparator_pos == Ogre::String::npos) ? "" : line.substr(nonseparator_pos);
  ------------------
  |  Branch (109:34): [True: 14.1k, False: 3.22k]
  ------------------
  110|  17.3k|                        if (trimWhitespace)
  ------------------
  |  Branch (110:29): [True: 17.3k, False: 0]
  ------------------
  111|  17.3k|                        {
  112|  17.3k|                            StringUtil::trim(optVal);
  113|  17.3k|                            StringUtil::trim(optName);
  114|  17.3k|                        }
  115|  17.3k|                        currentSettings->emplace(optName, optVal);
  116|  17.3k|                    }
  117|  34.0k|                }
  118|  44.2k|            }
  119|  45.9k|        }
  120|    781|    }

_ZN4Ogre10DataStream7getLineEb:
   41|   250k|    {
   42|   250k|        char tmpBuf[OGRE_STREAM_TEMP_SIZE];
   43|   250k|        String retString;
   44|   250k|        size_t readCount;
   45|       |        // Keep looping while not hitting delimiter
   46|   650k|        while ((readCount = read(tmpBuf, OGRE_STREAM_TEMP_SIZE-1)) != 0)
  ------------------
  |  Branch (46:16): [True: 648k, False: 1.77k]
  ------------------
   47|   648k|        {
   48|   648k|            const char* p = static_cast<const char*>(memchr(tmpBuf, '\n', readCount));
   49|   648k|            size_t appendCount = readCount;
   50|   648k|            if (p != 0)
  ------------------
  |  Branch (50:17): [True: 249k, False: 399k]
  ------------------
   51|   249k|            {
   52|   249k|                appendCount = static_cast<size_t>(p - tmpBuf);
   53|       |                // Reposition backwards
   54|   249k|                skip(static_cast<long>(appendCount + 1 - readCount));
   55|   249k|            }
   56|       |
   57|   648k|            retString.append(tmpBuf, appendCount);
   58|       |
   59|   648k|            if (p != 0)
  ------------------
  |  Branch (59:17): [True: 249k, False: 399k]
  ------------------
   60|   249k|            {
   61|       |                // Trim off trailing CR if this was a CR/LF entry
   62|   249k|                if (retString.length() && retString[retString.length()-1] == '\r')
  ------------------
  |  Branch (62:21): [True: 243k, False: 5.68k]
  |  Branch (62:43): [True: 1.06k, False: 242k]
  ------------------
   63|  1.06k|                {
   64|  1.06k|                    retString.erase(retString.length()-1, 1);
   65|  1.06k|                }
   66|       |
   67|       |                // Found terminator, break out
   68|   249k|                break;
   69|   249k|            }
   70|   648k|        }
   71|       |
   72|   250k|        if (trimAfter)
  ------------------
  |  Branch (72:13): [True: 45.9k, False: 205k]
  ------------------
   73|  45.9k|        {
   74|  45.9k|            StringUtil::trim(retString);
   75|  45.9k|        }
   76|       |
   77|   250k|        return retString;
   78|   250k|    }
_ZN4Ogre16MemoryDataStreamC2EPvmbb:
  188|  5.20k|        : DataStream(static_cast<uint16>(readOnly ? READ : (READ | WRITE)))
  ------------------
  |  Branch (188:42): [True: 5.20k, False: 0]
  ------------------
  189|  5.20k|    {
  190|  5.20k|        mData = mPos = static_cast<uchar*>(pMem);
  191|  5.20k|        mSize = inSize;
  192|  5.20k|        mEnd = mData + mSize;
  193|  5.20k|        mFreeOnClose = freeOnClose;
  194|       |        assert(mEnd >= mPos);
  195|  5.20k|    }
_ZN4Ogre16MemoryDataStreamC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPvmbb:
  199|    781|        : DataStream(name, static_cast<uint16>(readOnly ? READ : (READ | WRITE)))
  ------------------
  |  Branch (199:48): [True: 781, False: 0]
  ------------------
  200|    781|    {
  201|    781|        mData = mPos = static_cast<uchar*>(pMem);
  202|    781|        mSize = inSize;
  203|    781|        mEnd = mData + mSize;
  204|    781|        mFreeOnClose = freeOnClose;
  205|       |        assert(mEnd >= mPos);
  206|    781|    }
_ZN4Ogre16MemoryDataStreamD2Ev:
  336|  5.99k|    {
  337|  5.99k|        close();
  338|  5.99k|    }
_ZN4Ogre16MemoryDataStream4readEPvm:
  341|  3.12M|    {
  342|       |        // Read over end of memory?
  343|  3.12M|        if (mPos >= mEnd)
  ------------------
  |  Branch (343:13): [True: 25.7k, False: 3.10M]
  ------------------
  344|  25.7k|            return 0;
  345|  3.10M|        size_t cnt = std::min(count, static_cast<size_t>(mEnd - mPos));
  346|  3.10M|        if (cnt == 0)
  ------------------
  |  Branch (346:13): [True: 3.48k, False: 3.09M]
  ------------------
  347|  3.48k|            return 0;
  348|       |
  349|  3.10M|        assert (cnt<=count);
  350|       |
  351|  3.09M|        memcpy(buf, mPos, cnt);
  352|  3.09M|        mPos += cnt;
  353|  3.09M|        return cnt;
  354|  3.10M|    }
_ZN4Ogre16MemoryDataStream4skipEl:
  433|   576k|    {
  434|       |        // will underflow to size_t max if we skip below 0
  435|   576k|        size_t newpos = (size_t)( ( mPos - mData ) + count );
  436|       |
  437|   576k|        if (mData + newpos > mEnd)
  ------------------
  |  Branch (437:13): [True: 294, False: 576k]
  ------------------
  438|    294|            newpos = static_cast<size_t>(mEnd - mData); // will trigger eof
  439|   576k|        mPos = mData + newpos;
  440|   576k|    }
_ZN4Ogre16MemoryDataStream4seekEm:
  443|  3.92k|    {
  444|  3.92k|        if (mData + pos > mEnd)
  ------------------
  |  Branch (444:13): [True: 15, False: 3.91k]
  ------------------
  445|     15|            pos = static_cast<size_t>(mEnd - mData); // will trigger eof
  446|  3.92k|        mPos = mData + pos;
  447|  3.92k|    }
_ZNK4Ogre16MemoryDataStream4tellEv:
  450|   777k|    {
  451|       |        //mData is start, mPos is current location
  452|   777k|        return mPos - mData;
  453|   777k|    }
_ZNK4Ogre16MemoryDataStream3eofEv:
  456|  2.73M|    {
  457|  2.73M|        return mPos >= mEnd;
  458|  2.73M|    }
_ZN4Ogre16MemoryDataStream5closeEv:
  461|  5.99k|    {
  462|  5.99k|        mAccess = 0;
  463|  5.99k|        if (mFreeOnClose && mData)
  ------------------
  |  Branch (463:13): [True: 0, False: 5.99k]
  |  Branch (463:29): [True: 0, False: 0]
  ------------------
  464|      0|        {
  465|       |            OGRE_FREE(mData, MEMCATEGORY_GENERAL);
  466|      0|            mData = 0;
  467|      0|        }
  468|  5.99k|    }

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

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

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

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

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

_ZN4Ogre19HardwareIndexBufferC2EPNS_25HardwareBufferManagerBaseENS0_9IndexTypeEmhb:
   40|  98.2k|        : HardwareBuffer(usage, useShadowBuffer)
   41|  98.2k|        , mIndexType(idxType)
   42|  98.2k|        , mMgr(mgr)
   43|  98.2k|        , mNumIndexes(numIndexes)
   44|  98.2k|    {
   45|       |        // Calculate the size of the indexes
   46|  98.2k|        mIndexSize = indexSize(idxType);
   47|  98.2k|        mSizeInBytes = mIndexSize * mNumIndexes;
   48|       |
   49|  98.2k|        if (idxType == IT_32BIT && Root::getSingletonPtr() && Root::getSingleton().getRenderSystem())
  ------------------
  |  Branch (49:13): [True: 7.01k, False: 91.2k]
  |  Branch (49:36): [True: 0, False: 7.01k]
  |  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|  98.2k|        if (useShadowBuffer)
  ------------------
  |  Branch (58:13): [True: 0, False: 98.2k]
  ------------------
   59|      0|        {
   60|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   61|      0|        }
   62|  98.2k|    }
_ZN4Ogre19HardwareIndexBufferC2EPNS_25HardwareBufferManagerBaseENS0_9IndexTypeEmPNS_14HardwareBufferE:
   66|  98.2k|        : HardwareIndexBuffer(mgr, idxType, numIndexes, delegate->getUsage(), false)
   67|  98.2k|    {
   68|  98.2k|        mDelegate.reset(delegate);
   69|  98.2k|    }
_ZN4Ogre19HardwareIndexBufferD2Ev:
   73|  98.2k|    {
   74|  98.2k|    }

_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmhb:
   39|  11.6k|        : HardwareBuffer(usage, useShadowBuffer),
   40|  11.6k|          mIsInstanceData(false),
   41|  11.6k|          mMgr(mgr),
   42|  11.6k|          mNumVertices(numVertices),
   43|  11.6k|          mVertexSize(vertexSize),
   44|  11.6k|          mInstanceDataStepRate(1)
   45|  11.6k|    {
   46|       |        // Calculate the size of the vertices
   47|  11.6k|        mSizeInBytes = mVertexSize * numVertices;
   48|       |
   49|       |        // Create a shadow buffer if required
   50|  11.6k|        if (useShadowBuffer)
  ------------------
  |  Branch (50:13): [True: 0, False: 11.6k]
  ------------------
   51|      0|        {
   52|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   53|      0|        }
   54|       |
   55|  11.6k|    }
_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmPNS_14HardwareBufferE:
   58|  11.6k|        : HardwareVertexBuffer(mgr, vertexSize, numVertices, delegate->getUsage(), false)
   59|  11.6k|    {
   60|  11.6k|        mDelegate.reset(delegate);
   61|  11.6k|    }
_ZN4Ogre20HardwareVertexBufferD2Ev:
   64|  11.6k|    {
   65|  11.6k|        if (mMgr)
  ------------------
  |  Branch (65:13): [True: 11.6k, False: 0]
  ------------------
   66|  11.6k|        {
   67|  11.6k|            mMgr->_notifyVertexBufferDestroyed(this);
   68|  11.6k|        }
   69|  11.6k|    }
_ZN4Ogre13VertexElementC2EtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  104|  33.6k|        : mOffset(offset), mSource(source), mIndex(index), mType(theType), mSemantic(semantic)
  105|  33.6k|    {
  106|  33.6k|    }
_ZNK4Ogre13VertexElement7getSizeEv:
  109|  52.2k|    {
  110|  52.2k|        return getTypeSize(mType);
  111|  52.2k|    }
_ZN4Ogre13VertexElement11getTypeSizeENS_17VertexElementTypeE:
  114|  56.5k|    {
  115|  56.5k|        switch(etype)
  ------------------
  |  Branch (115:16): [True: 55.9k, False: 606]
  ------------------
  116|  56.5k|        {
  117|  1.25k|        case VET_FLOAT1:
  ------------------
  |  Branch (117:9): [True: 1.25k, False: 55.3k]
  ------------------
  118|  1.25k|            return sizeof(float);
  119|  2.45k|        case VET_FLOAT2:
  ------------------
  |  Branch (119:9): [True: 2.45k, False: 54.1k]
  ------------------
  120|  2.45k|            return sizeof(float)*2;
  121|  1.86k|        case VET_FLOAT3:
  ------------------
  |  Branch (121:9): [True: 1.86k, False: 54.6k]
  ------------------
  122|  1.86k|            return sizeof(float)*3;
  123|  2.57k|        case VET_FLOAT4:
  ------------------
  |  Branch (123:9): [True: 2.57k, False: 53.9k]
  ------------------
  124|  2.57k|            return sizeof(float)*4;
  125|     18|        case VET_DOUBLE1:
  ------------------
  |  Branch (125:9): [True: 18, False: 56.5k]
  ------------------
  126|     18|            return sizeof(double);
  127|     57|        case VET_DOUBLE2:
  ------------------
  |  Branch (127:9): [True: 57, False: 56.5k]
  ------------------
  128|     57|            return sizeof(double)*2;
  129|    625|        case VET_DOUBLE3:
  ------------------
  |  Branch (129:9): [True: 625, False: 55.9k]
  ------------------
  130|    625|            return sizeof(double)*3;
  131|     13|        case VET_DOUBLE4:
  ------------------
  |  Branch (131:9): [True: 13, False: 56.5k]
  ------------------
  132|     13|            return sizeof(double)*4;
  133|    249|        case VET_SHORT1:
  ------------------
  |  Branch (133:9): [True: 249, False: 56.3k]
  ------------------
  134|    681|        case VET_USHORT1:
  ------------------
  |  Branch (134:9): [True: 432, False: 56.1k]
  ------------------
  135|    718|        case VET_HALF1:
  ------------------
  |  Branch (135:9): [True: 37, False: 56.5k]
  ------------------
  136|    718|            return sizeof( short );
  137|    496|        case VET_SHORT2:
  ------------------
  |  Branch (137:9): [True: 496, False: 56.0k]
  ------------------
  138|    544|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (138:9): [True: 48, False: 56.5k]
  ------------------
  139|    887|        case VET_USHORT2:
  ------------------
  |  Branch (139:9): [True: 343, False: 56.2k]
  ------------------
  140|    983|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (140:9): [True: 96, False: 56.4k]
  ------------------
  141|  1.62k|        case VET_HALF2:
  ------------------
  |  Branch (141:9): [True: 640, False: 55.9k]
  ------------------
  142|  1.62k|            return sizeof( short ) * 2;
  143|     11|        case VET_SHORT3:
  ------------------
  |  Branch (143:9): [True: 11, False: 56.5k]
  ------------------
  144|    119|        case VET_USHORT3:
  ------------------
  |  Branch (144:9): [True: 108, False: 56.4k]
  ------------------
  145|    682|        case VET_HALF3:
  ------------------
  |  Branch (145:9): [True: 563, False: 55.9k]
  ------------------
  146|    682|            return sizeof( short ) * 3;
  147|     23|        case VET_SHORT4:
  ------------------
  |  Branch (147:9): [True: 23, False: 56.5k]
  ------------------
  148|     93|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (148:9): [True: 70, False: 56.4k]
  ------------------
  149|    114|        case VET_USHORT4:
  ------------------
  |  Branch (149:9): [True: 21, False: 56.5k]
  ------------------
  150|  2.35k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (150:9): [True: 2.23k, False: 54.3k]
  ------------------
  151|  4.70k|        case VET_HALF4:
  ------------------
  |  Branch (151:9): [True: 2.34k, False: 54.2k]
  ------------------
  152|  4.70k|            return sizeof( short ) * 4;
  153|    207|        case VET_INT1:
  ------------------
  |  Branch (153:9): [True: 207, False: 56.3k]
  ------------------
  154|    384|        case VET_UINT1:
  ------------------
  |  Branch (154:9): [True: 177, False: 56.3k]
  ------------------
  155|    384|            return sizeof( int );
  156|      7|        case VET_INT2:
  ------------------
  |  Branch (156:9): [True: 7, False: 56.5k]
  ------------------
  157|    135|        case VET_UINT2:
  ------------------
  |  Branch (157:9): [True: 128, False: 56.4k]
  ------------------
  158|    135|            return sizeof( int ) * 2;
  159|    346|        case VET_INT3:
  ------------------
  |  Branch (159:9): [True: 346, False: 56.2k]
  ------------------
  160|    382|        case VET_UINT3:
  ------------------
  |  Branch (160:9): [True: 36, False: 56.5k]
  ------------------
  161|    382|            return sizeof( int ) * 3;
  162|      3|        case VET_INT4:
  ------------------
  |  Branch (162:9): [True: 3, False: 56.5k]
  ------------------
  163|      7|        case VET_UINT4:
  ------------------
  |  Branch (163:9): [True: 4, False: 56.5k]
  ------------------
  164|      7|            return sizeof( int ) * 4;
  165|  9.10k|        case VET_BYTE4:
  ------------------
  |  Branch (165:9): [True: 9.10k, False: 47.4k]
  ------------------
  166|  11.0k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (166:9): [True: 1.91k, False: 54.6k]
  ------------------
  167|  11.7k|        case VET_UBYTE4:
  ------------------
  |  Branch (167:9): [True: 685, False: 55.8k]
  ------------------
  168|  11.7k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (168:9): [True: 49, False: 56.5k]
  ------------------
  169|  16.4k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (169:9): [True: 4.72k, False: 51.8k]
  ------------------
  170|  16.4k|            return sizeof(char)*4;
  171|  21.9k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (171:9): [True: 21.9k, False: 34.5k]
  ------------------
  172|  21.9k|            return 4;
  173|  56.5k|        }
  174|    606|        return 0;
  175|  56.5k|    }
_ZN4Ogre13VertexElement12getTypeCountENS_17VertexElementTypeE:
  178|  33.8k|    {
  179|  33.8k|        switch (etype)
  ------------------
  |  Branch (179:17): [True: 33.8k, False: 0]
  ------------------
  180|  33.8k|        {
  181|  1.02k|        case VET_FLOAT1:
  ------------------
  |  Branch (181:9): [True: 1.02k, False: 32.8k]
  ------------------
  182|  1.34k|        case VET_SHORT1:
  ------------------
  |  Branch (182:9): [True: 320, False: 33.5k]
  ------------------
  183|  1.77k|        case VET_USHORT1:
  ------------------
  |  Branch (183:9): [True: 429, False: 33.4k]
  ------------------
  184|  2.02k|        case VET_UINT1:
  ------------------
  |  Branch (184:9): [True: 253, False: 33.6k]
  ------------------
  185|  2.04k|        case VET_INT1:
  ------------------
  |  Branch (185:9): [True: 14, False: 33.8k]
  ------------------
  186|  2.09k|        case VET_DOUBLE1:
  ------------------
  |  Branch (186:9): [True: 57, False: 33.8k]
  ------------------
  187|  2.47k|        case VET_HALF1:
  ------------------
  |  Branch (187:9): [True: 381, False: 33.5k]
  ------------------
  188|  2.47k|            return 1;
  189|    815|        case VET_FLOAT2:
  ------------------
  |  Branch (189:9): [True: 815, False: 33.0k]
  ------------------
  190|  1.11k|        case VET_SHORT2:
  ------------------
  |  Branch (190:9): [True: 304, False: 33.5k]
  ------------------
  191|  1.17k|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (191:9): [True: 51, False: 33.8k]
  ------------------
  192|  1.33k|        case VET_USHORT2:
  ------------------
  |  Branch (192:9): [True: 165, False: 33.7k]
  ------------------
  193|  1.58k|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (193:9): [True: 247, False: 33.6k]
  ------------------
  194|  1.77k|        case VET_UINT2:
  ------------------
  |  Branch (194:9): [True: 188, False: 33.7k]
  ------------------
  195|  1.81k|        case VET_INT2:
  ------------------
  |  Branch (195:9): [True: 42, False: 33.8k]
  ------------------
  196|  1.98k|        case VET_DOUBLE2:
  ------------------
  |  Branch (196:9): [True: 171, False: 33.7k]
  ------------------
  197|  2.04k|        case VET_HALF2:
  ------------------
  |  Branch (197:9): [True: 61, False: 33.8k]
  ------------------
  198|  2.04k|            return 2;
  199|     50|        case VET_FLOAT3:
  ------------------
  |  Branch (199:9): [True: 50, False: 33.8k]
  ------------------
  200|     56|        case VET_SHORT3:
  ------------------
  |  Branch (200:9): [True: 6, False: 33.8k]
  ------------------
  201|    164|        case VET_USHORT3:
  ------------------
  |  Branch (201:9): [True: 108, False: 33.7k]
  ------------------
  202|    293|        case VET_UINT3:
  ------------------
  |  Branch (202:9): [True: 129, False: 33.7k]
  ------------------
  203|    541|        case VET_INT3:
  ------------------
  |  Branch (203:9): [True: 248, False: 33.6k]
  ------------------
  204|  1.16k|        case VET_DOUBLE3:
  ------------------
  |  Branch (204:9): [True: 622, False: 33.2k]
  ------------------
  205|  1.71k|        case VET_HALF3:
  ------------------
  |  Branch (205:9): [True: 555, False: 33.3k]
  ------------------
  206|  1.71k|            return 3;
  207|     15|        case VET_FLOAT4:
  ------------------
  |  Branch (207:9): [True: 15, False: 33.8k]
  ------------------
  208|     82|        case VET_SHORT4:
  ------------------
  |  Branch (208:9): [True: 67, False: 33.8k]
  ------------------
  209|    203|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (209:9): [True: 121, False: 33.7k]
  ------------------
  210|    266|        case VET_USHORT4:
  ------------------
  |  Branch (210:9): [True: 63, False: 33.8k]
  ------------------
  211|  1.01k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (211:9): [True: 746, False: 33.1k]
  ------------------
  212|  1.01k|        case VET_UINT4:
  ------------------
  |  Branch (212:9): [True: 2, False: 33.8k]
  ------------------
  213|  1.01k|        case VET_INT4:
  ------------------
  |  Branch (213:9): [True: 3, False: 33.8k]
  ------------------
  214|  1.02k|        case VET_DOUBLE4:
  ------------------
  |  Branch (214:9): [True: 5, False: 33.8k]
  ------------------
  215|  1.67k|        case VET_BYTE4:
  ------------------
  |  Branch (215:9): [True: 653, False: 33.2k]
  ------------------
  216|  1.73k|        case VET_UBYTE4:
  ------------------
  |  Branch (216:9): [True: 57, False: 33.8k]
  ------------------
  217|  5.73k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (217:9): [True: 4.00k, False: 29.8k]
  ------------------
  218|  5.86k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (218:9): [True: 131, False: 33.7k]
  ------------------
  219|  14.0k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (219:9): [True: 8.13k, False: 25.7k]
  ------------------
  220|  26.9k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (220:9): [True: 12.9k, False: 20.9k]
  ------------------
  221|  27.6k|        case VET_HALF4:
  ------------------
  |  Branch (221:9): [True: 705, False: 33.1k]
  ------------------
  222|  27.6k|            return 4;
  223|  33.8k|        }
  224|  33.8k|        OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid type", 
  225|  33.8k|            "VertexElement::getTypeCount");
  226|  33.8k|    }
_ZN4Ogre13VertexElement11getBaseTypeENS_17VertexElementTypeE:
  296|  36.8k|    {
  297|  36.8k|        switch (multiType)
  ------------------
  |  Branch (297:17): [True: 36.4k, False: 375]
  ------------------
  298|  36.8k|        {
  299|  1.02k|            case VET_FLOAT1:
  ------------------
  |  Branch (299:13): [True: 1.02k, False: 35.8k]
  ------------------
  300|  1.84k|            case VET_FLOAT2:
  ------------------
  |  Branch (300:13): [True: 815, False: 36.0k]
  ------------------
  301|  2.17k|            case VET_FLOAT3:
  ------------------
  |  Branch (301:13): [True: 330, False: 36.5k]
  ------------------
  302|  2.28k|            case VET_FLOAT4:
  ------------------
  |  Branch (302:13): [True: 112, False: 36.7k]
  ------------------
  303|  2.28k|                return VET_FLOAT1;
  304|    382|            case VET_HALF1:
  ------------------
  |  Branch (304:13): [True: 382, False: 36.4k]
  ------------------
  305|    444|            case VET_HALF2:
  ------------------
  |  Branch (305:13): [True: 62, False: 36.7k]
  ------------------
  306|  1.00k|            case VET_HALF3:
  ------------------
  |  Branch (306:13): [True: 557, False: 36.2k]
  ------------------
  307|  1.70k|            case VET_HALF4:
  ------------------
  |  Branch (307:13): [True: 706, False: 36.1k]
  ------------------
  308|  1.70k|                return VET_HALF1;
  309|     57|            case VET_DOUBLE1:
  ------------------
  |  Branch (309:13): [True: 57, False: 36.7k]
  ------------------
  310|    229|            case VET_DOUBLE2:
  ------------------
  |  Branch (310:13): [True: 172, False: 36.6k]
  ------------------
  311|    852|            case VET_DOUBLE3:
  ------------------
  |  Branch (311:13): [True: 623, False: 36.2k]
  ------------------
  312|    858|            case VET_DOUBLE4:
  ------------------
  |  Branch (312:13): [True: 6, False: 36.8k]
  ------------------
  313|    858|                return VET_DOUBLE1;
  314|     20|            case VET_INT1:
  ------------------
  |  Branch (314:13): [True: 20, False: 36.8k]
  ------------------
  315|     62|            case VET_INT2:
  ------------------
  |  Branch (315:13): [True: 42, False: 36.8k]
  ------------------
  316|    311|            case VET_INT3:
  ------------------
  |  Branch (316:13): [True: 249, False: 36.6k]
  ------------------
  317|    315|            case VET_INT4:
  ------------------
  |  Branch (317:13): [True: 4, False: 36.8k]
  ------------------
  318|    315|                return VET_INT1;
  319|    253|            case VET_UINT1:
  ------------------
  |  Branch (319:13): [True: 253, False: 36.6k]
  ------------------
  320|    441|            case VET_UINT2:
  ------------------
  |  Branch (320:13): [True: 188, False: 36.6k]
  ------------------
  321|    572|            case VET_UINT3:
  ------------------
  |  Branch (321:13): [True: 131, False: 36.7k]
  ------------------
  322|    577|            case VET_UINT4:
  ------------------
  |  Branch (322:13): [True: 5, False: 36.8k]
  ------------------
  323|    577|                return VET_UINT1;
  324|    322|            case VET_SHORT1:
  ------------------
  |  Branch (324:13): [True: 322, False: 36.5k]
  ------------------
  325|    626|            case VET_SHORT2:
  ------------------
  |  Branch (325:13): [True: 304, False: 36.5k]
  ------------------
  326|    632|            case VET_SHORT3:
  ------------------
  |  Branch (326:13): [True: 6, False: 36.8k]
  ------------------
  327|    700|            case VET_SHORT4:
  ------------------
  |  Branch (327:13): [True: 68, False: 36.7k]
  ------------------
  328|    700|                return VET_SHORT1;
  329|    429|            case VET_USHORT1:
  ------------------
  |  Branch (329:13): [True: 429, False: 36.4k]
  ------------------
  330|    595|            case VET_USHORT2:
  ------------------
  |  Branch (330:13): [True: 166, False: 36.6k]
  ------------------
  331|    703|            case VET_USHORT3:
  ------------------
  |  Branch (331:13): [True: 108, False: 36.7k]
  ------------------
  332|    766|            case VET_USHORT4:
  ------------------
  |  Branch (332:13): [True: 63, False: 36.7k]
  ------------------
  333|    766|                return VET_USHORT1;
  334|     53|            case VET_SHORT2_NORM:
  ------------------
  |  Branch (334:13): [True: 53, False: 36.8k]
  ------------------
  335|    177|            case VET_SHORT4_NORM:
  ------------------
  |  Branch (335:13): [True: 124, False: 36.7k]
  ------------------
  336|    177|                return VET_SHORT2_NORM;
  337|    250|            case VET_USHORT2_NORM:
  ------------------
  |  Branch (337:13): [True: 250, False: 36.6k]
  ------------------
  338|    996|            case VET_USHORT4_NORM:
  ------------------
  |  Branch (338:13): [True: 746, False: 36.1k]
  ------------------
  339|    996|                return VET_USHORT2_NORM;
  340|    653|            case VET_BYTE4:
  ------------------
  |  Branch (340:13): [True: 653, False: 36.2k]
  ------------------
  341|    653|                return VET_BYTE4;
  342|  4.00k|            case VET_BYTE4_NORM:
  ------------------
  |  Branch (342:13): [True: 4.00k, False: 32.8k]
  ------------------
  343|  4.00k|                return VET_BYTE4_NORM;
  344|     57|            case VET_UBYTE4:
  ------------------
  |  Branch (344:13): [True: 57, False: 36.7k]
  ------------------
  345|     57|                return VET_UBYTE4;
  346|    138|            case VET_UBYTE4_NORM:
  ------------------
  |  Branch (346:13): [True: 138, False: 36.7k]
  ------------------
  347|  8.27k|            case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (347:13): [True: 8.13k, False: 28.7k]
  ------------------
  348|  8.27k|                return VET_UBYTE4_NORM;
  349|  15.1k|            case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (349:13): [True: 15.1k, False: 21.7k]
  ------------------
  350|  15.1k|                return VET_INT_10_10_10_2_NORM;
  351|  36.8k|        };
  352|       |        // To keep compiler happy
  353|    375|        return VET_FLOAT1;
  354|  36.8k|    }
_ZN4Ogre17VertexDeclarationC2Ev:
  357|   114k|    {
  358|   114k|    }
_ZN4Ogre17VertexDeclarationD2Ev:
  361|   114k|    {
  362|   114k|    }
_ZNK4Ogre17VertexDeclaration11getElementsEv:
  365|  3.50k|    {
  366|  3.50k|        return mElementList;
  367|  3.50k|    }
_ZN4Ogre17VertexDeclaration10addElementEtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  372|  28.8k|    {
  373|  28.8k|        mElementList.push_back(VertexElement(source, offset, theType, semantic, index));
  374|  28.8k|        notifyChanged();
  375|  28.8k|        return mElementList.back();
  376|  28.8k|    }
_ZN4Ogre17VertexDeclaration13modifyElementEttmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  444|  4.77k|    {
  445|       |        assert(elem_index < mElementList.size() && "Index out of bounds");
  446|  4.77k|        VertexElementList::iterator i = mElementList.begin();
  447|  4.77k|        std::advance(i, elem_index);
  448|  4.77k|        (*i) = VertexElement(source, offset, theType, semantic, index);
  449|  4.77k|        notifyChanged();
  450|  4.77k|    }
_ZNK4Ogre17VertexDeclaration21findElementBySemanticENS_21VertexElementSemanticEt:
  454|  56.1k|    {
  455|  56.1k|        for (auto& e : mElementList)
  ------------------
  |  Branch (455:22): [True: 12.0k, False: 53.5k]
  ------------------
  456|  12.0k|        {
  457|  12.0k|            if (e.getSemantic() == sem && e.getIndex() == index)
  ------------------
  |  Branch (457:17): [True: 3.13k, False: 8.92k]
  |  Branch (457:43): [True: 2.58k, False: 547]
  ------------------
  458|  2.58k|            {
  459|  2.58k|                return &e;
  460|  2.58k|            }
  461|  12.0k|        }
  462|       |
  463|  53.5k|        return NULL;
  464|  56.1k|    }
_ZNK4Ogre17VertexDeclaration20findElementsBySourceEt:
  468|  16.0k|    {
  469|  16.0k|        VertexElementList retList;
  470|  16.0k|        for (auto& e : mElementList)
  ------------------
  |  Branch (470:22): [True: 43.4k, False: 16.0k]
  ------------------
  471|  43.4k|        {
  472|  43.4k|            if (e.getSource() == source)
  ------------------
  |  Branch (472:17): [True: 28.1k, False: 15.2k]
  ------------------
  473|  28.1k|            {
  474|  28.1k|                retList.push_back(e);
  475|  28.1k|            }
  476|  43.4k|        }
  477|  16.0k|        return retList;
  478|  16.0k|    }
_ZNK4Ogre17VertexDeclaration13getVertexSizeEt:
  482|  10.1k|    {
  483|  10.1k|        size_t sz = 0;
  484|  10.1k|        for (auto& e : mElementList)
  ------------------
  |  Branch (484:22): [True: 26.2k, False: 10.1k]
  ------------------
  485|  26.2k|        {
  486|  26.2k|            if (e.getSource() == source)
  ------------------
  |  Branch (486:17): [True: 16.8k, False: 9.46k]
  ------------------
  487|  16.8k|            {
  488|  16.8k|                sz += e.getSize();
  489|       |
  490|  16.8k|            }
  491|  26.2k|        }
  492|  10.1k|        return sz;
  493|  10.1k|    }
_ZN4Ogre19VertexBufferBindingC2Ev:
  676|   114k|    VertexBufferBinding::VertexBufferBinding() : mHighIndex(0)
  677|   114k|    {
  678|   114k|    }
_ZN4Ogre19VertexBufferBindingD2Ev:
  681|   114k|    {
  682|   114k|        unsetAllBindings();
  683|   114k|    }
_ZN4Ogre19VertexBufferBinding10setBindingEtRKNS_9SharedPtrINS_20HardwareVertexBufferEEE:
  686|  10.1k|    {
  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|  10.1k|        mBindingMap[index] = buffer;
  690|  10.1k|        mHighIndex = std::max(mHighIndex, (unsigned short)(index+1));
  691|  10.1k|    }
_ZN4Ogre19VertexBufferBinding16unsetAllBindingsEv:
  706|   114k|    {
  707|   114k|        mBindingMap.clear();
  708|   114k|        mHighIndex = 0;
  709|   114k|    }
_ZNK4Ogre19VertexBufferBinding11getBindingsEv:
  713|   108k|    {
  714|   108k|        return mBindingMap;
  715|   108k|    }
_ZNK4Ogre19VertexBufferBinding9getBufferEt:
  718|  2.20k|    {
  719|  2.20k|        VertexBufferBindingMap::const_iterator i = mBindingMap.find(index);
  720|  2.20k|        if (i == mBindingMap.end())
  ------------------
  |  Branch (720:13): [True: 29, False: 2.17k]
  ------------------
  721|     29|        {
  722|     29|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "No buffer is bound to that index.",
  723|     29|                "VertexBufferBinding::getBuffer");
  724|     29|        }
  725|  2.17k|        return i->second;
  726|  2.20k|    }
_ZNK4Ogre19VertexBufferBinding13isBufferBoundEt:
  729|  39.8k|    {
  730|  39.8k|        return mBindingMap.find(index) != mBindingMap.end();
  731|  39.8k|    }

_ZN4Ogre8KeyFrameC2EPKNS_14AnimationTrackEf:
   37|  3.40k|        : mTime(time), mParentTrack(parent)
   38|  3.40k|    {
   39|  3.40k|    }
_ZN4Ogre17TransformKeyFrameC2EPKNS_14AnimationTrackEf:
   59|    915|        :KeyFrame(parent, time), mTranslate(Vector3::ZERO), 
   60|    915|        mScale(Vector3::UNIT_SCALE), mRotate(Quaternion::IDENTITY) 
   61|    915|    {
   62|    915|    }
_ZN4Ogre17TransformKeyFrame12setTranslateERKNS_6VectorILi3EfEE:
   65|    915|    {
   66|    915|        mTranslate = trans;
   67|    915|        if (mParentTrack)
  ------------------
  |  Branch (67:13): [True: 915, False: 0]
  ------------------
   68|    915|            mParentTrack->_keyFrameDataChanged();
   69|    915|    }
_ZN4Ogre17TransformKeyFrame8setScaleERKNS_6VectorILi3EfEE:
   77|    206|    {
   78|    206|        mScale = scale;
   79|    206|        if (mParentTrack)
  ------------------
  |  Branch (79:13): [True: 206, False: 0]
  ------------------
   80|    206|            mParentTrack->_keyFrameDataChanged();
   81|    206|    }
_ZN4Ogre17TransformKeyFrame11setRotationERKNS_10QuaternionE:
   89|    915|    {
   90|    915|        mRotate = rot;
   91|    915|        if (mParentTrack)
  ------------------
  |  Branch (91:13): [True: 915, False: 0]
  ------------------
   92|    915|            mParentTrack->_keyFrameDataChanged();
   93|    915|    }
_ZN4Ogre19VertexMorphKeyFrameC2EPKNS_14AnimationTrackEf:
  110|    577|        : KeyFrame(parent, time)
  111|    577|    {
  112|    577|    }
_ZN4Ogre19VertexMorphKeyFrame15setVertexBufferERKNS_9SharedPtrINS_20HardwareVertexBufferEEE:
  115|    577|    {
  116|    577|        mBuffer = buf;
  117|    577|    }
_ZN4Ogre18VertexPoseKeyFrameC2EPKNS_14AnimationTrackEf:
  133|  1.90k|        :KeyFrame(parent, time)
  134|  1.90k|    {
  135|  1.90k|    }
_ZN4Ogre18VertexPoseKeyFrame16addPoseReferenceEtf:
  138|  2.12k|    {
  139|  2.12k|        mPoseRefs.push_back(PoseRef(poseIndex, influence));
  140|  2.12k|    }

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

_ZN4Ogre18LodStrategyManager12getSingletonEv:
   43|  17.6k|    {
   44|       |        assert( msSingleton );  return ( *msSingleton );
   45|  17.6k|    }
_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|  11.3k|    {
  111|       |        // If name is "default", return the default strategy instead of performing a lookup
  112|  11.3k|        if (name == "default") {
  ------------------
  |  Branch (112:13): [True: 1.46k, False: 9.92k]
  ------------------
  113|  1.46k|            return getDefaultStrategy();
  114|  9.92k|        } else if (name == "Distance") {
  ------------------
  |  Branch (114:20): [True: 1.27k, False: 8.65k]
  ------------------
  115|  1.27k|            return getStrategy("distance_box"); // Backward compatibility for loading old meshes.
  116|  8.65k|        } else if (name == "PixelCount") {
  ------------------
  |  Branch (116:20): [True: 213, False: 8.44k]
  ------------------
  117|    213|            return getStrategy("pixel_count"); // Backward compatibility for loading old meshes.
  118|    213|        }
  119|       |        // Find strategy with specified name
  120|  8.44k|        StrategyMap::iterator it = mStrategies.find(name);
  121|       |
  122|       |        // If not found, return null
  123|  8.44k|        if (it == mStrategies.end())
  ------------------
  |  Branch (123:13): [True: 6.93k, False: 1.50k]
  ------------------
  124|  6.93k|            return 0;
  125|       |
  126|       |        // Otherwise, return the strategy
  127|  1.50k|        return it->second;
  128|  8.44k|    }
_ZN4Ogre18LodStrategyManager18setDefaultStrategyEPNS_11LodStrategyE:
  131|      1|    {
  132|      1|        mDefaultStrategy = strategy;
  133|      1|    }
_ZN4Ogre18LodStrategyManager18getDefaultStrategyEv:
  142|  9.21k|    {
  143|  9.21k|        return mDefaultStrategy;
  144|  9.21k|    }

_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|   168k|    {
   98|   168k|        OGRE_LOCK_AUTO_MUTEX;
   99|   168k|        if (lml >= mLogLevel)
  ------------------
  |  Branch (99:13): [True: 27.3k, False: 141k]
  ------------------
  100|  27.3k|        {
  101|  27.3k|            bool skipThisMessage = false;
  102|  27.3k|            for(auto & l : mListeners)
  ------------------
  |  Branch (102:26): [True: 0, False: 27.3k]
  ------------------
  103|      0|                l->messageLogged( message, lml, maskDebug, mLogName, skipThisMessage);
  104|       |            
  105|  27.3k|            if (!skipThisMessage)
  ------------------
  |  Branch (105:17): [True: 27.3k, False: 0]
  ------------------
  106|  27.3k|            {
  107|  27.3k|                if (mDebugOut && !maskDebug)
  ------------------
  |  Branch (107:21): [True: 0, False: 27.3k]
  |  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|  27.3k|                if (!mSuppressFile)
  ------------------
  |  Branch (134:21): [True: 0, False: 27.3k]
  ------------------
  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|  27.3k|            }
  148|  27.3k|        }
  149|   168k|    }
_ZN4Ogre3Log14setMinLogLevelENS_15LogMessageLevelE:
  173|      1|    {
  174|      1|        OGRE_LOCK_AUTO_MUTEX;
  175|      1|        mLogLevel = lml;
  176|      1|    }
_ZN4Ogre3Log6streamENS_15LogMessageLevelEb:
  196|  63.1k|    {
  197|  63.1k|        return Stream(this, lml, maskDebug);
  198|       |
  199|  63.1k|    }

_ZN4Ogre10LogManager12getSingletonEv:
   39|   168k|    {  
   40|       |        assert( msSingleton );  return ( *msSingleton );  
   41|   168k|    }
_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|   105k|    {
  126|   105k|        OGRE_LOCK_AUTO_MUTEX;
  127|   105k|        if (mDefaultLog)
  ------------------
  |  Branch (127:13): [True: 105k, False: 0]
  ------------------
  128|   105k|        {
  129|   105k|            mDefaultLog->logMessage(message, lml, maskDebug);
  130|   105k|        }
  131|   105k|    }
_ZN4Ogre10LogManager8logErrorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  134|  27.3k|    {
  135|  27.3k|        stream(LML_CRITICAL, maskDebug) << "Error: " << message;
  136|  27.3k|    }
_ZN4Ogre10LogManager10logWarningERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  139|    687|    {
  140|    687|        stream(LML_WARNING, maskDebug) << "Warning: " << message;
  141|    687|    }
_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|  63.1k|    {
  165|  63.1k|            OGRE_LOCK_AUTO_MUTEX;
  166|  63.1k|        OgreAssert(mDefaultLog, "Default log not found");
  ------------------
  |  Branch (166:9): [True: 0, False: 63.1k]
  ------------------
  167|  63.1k|        return mDefaultLog->stream(lml, maskDebug);
  168|  63.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|   105k|    {
   45|       |        assert( msSingleton );  return ( *msSingleton );
   46|   105k|    }
_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|   105k|    {
   96|   105k|        return static_pointer_cast<Material>(getResourceByName(name, groupName));
   97|   105k|    }
_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|  3.26k|    {
  763|  3.26k|        const Vector3& max = aabb.getMaximum();
  764|  3.26k|        const Vector3& min = aabb.getMinimum();
  765|       |
  766|  3.26k|        Vector3 magnitude = max;
  767|  3.26k|        magnitude.makeCeil(-max);
  768|  3.26k|        magnitude.makeCeil(min);
  769|  3.26k|        magnitude.makeCeil(-min);
  770|       |
  771|  3.26k|        return magnitude.length();
  772|  3.26k|    }

_ZN4Ogre4MeshC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   45|  3.86k|        : Resource(creator, name, handle, group, isManual, loader),
   46|  3.86k|        mBoundRadius(0.0f),
   47|  3.86k|        mBoneBoundingRadius(0.0f),
   48|  3.86k|        mBoneAssignmentsOutOfDate(false),
   49|  3.86k|        mHasManualLodLevel(false),
   50|  3.86k|        mLodStrategy(LodStrategyManager::getSingleton().getDefaultStrategy()),
   51|  3.86k|        mBufferManager(0),
   52|  3.86k|        mVertexBufferUsage(HBU_GPU_ONLY),
   53|  3.86k|        mIndexBufferUsage(HBU_GPU_ONLY),
   54|  3.86k|        mVertexBufferShadowBuffer(false),
   55|  3.86k|        mIndexBufferShadowBuffer(false),
   56|  3.86k|        mPreparedForShadowVolumes(false),
   57|  3.86k|        mEdgeListsBuilt(false),
   58|  3.86k|        mAutoBuildEdgeLists(false), // will be set to true by serializers of 1.20 and below
   59|  3.86k|        mSharedVertexDataAnimationType(VAT_NONE),
   60|  3.86k|        mSharedVertexDataAnimationIncludesNormals(false),
   61|  3.86k|        mAnimationTypesDirty(true),
   62|  3.86k|        mPosesIncludeNormals(false),
   63|  3.86k|        sharedVertexData(0)
   64|  3.86k|    {
   65|       |        // Init first (manual) lod
   66|  3.86k|        MeshLodUsage lod;
   67|  3.86k|        lod.userValue = 0; // User value not used for base LOD level
   68|  3.86k|        lod.value = getLodStrategy()->getBaseValue();
   69|  3.86k|        mMeshLodUsageList.push_back(lod);
   70|  3.86k|    }
_ZN4Ogre4MeshD2Ev:
   73|  3.86k|    {
   74|  3.86k|        if (!HardwareBufferManager::getSingletonPtr()) // LogManager might be also gone already
  ------------------
  |  Branch (74:13): [True: 0, False: 3.86k]
  ------------------
   75|      0|        {
   76|      0|            printf("ERROR: '%s' is being destroyed after HardwareBufferManager. This is a bug in user code.\n", mName.c_str());
   77|      0|            OgreAssertDbg(false,  "Mesh destroyed after HardwareBufferManager"); // assert in debug mode
   78|      0|            return; // try not to crash
   79|      0|        }
   80|       |        // have to call this here reather than in Resource destructor
   81|       |        // since calling virtual methods in base destructors causes crash
   82|  3.86k|        unload();
   83|  3.86k|    }
_ZN4Ogre4Mesh24getHardwareBufferManagerEv:
   86|   107k|    {
   87|   107k|        return mBufferManager ? mBufferManager : HardwareBufferManager::getSingletonPtr();
  ------------------
  |  Branch (87:16): [True: 0, False: 107k]
  ------------------
   88|   107k|    }
_ZN4Ogre4Mesh13createSubMeshEv:
   91|   105k|    {
   92|   105k|        SubMesh* sub = OGRE_NEW SubMesh();
   93|   105k|        sub->parent = this;
   94|       |
   95|   105k|        mSubMeshList.push_back(sub);
   96|       |
   97|   105k|        if (isLoaded())
  ------------------
  |  Branch (97:13): [True: 105k, False: 0]
  ------------------
   98|   105k|            _dirtyState();
   99|       |
  100|   105k|        return sub;
  101|   105k|    }
_ZN4Ogre4Mesh11nameSubMeshERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEt:
  155|  11.0k|    {
  156|  11.0k|        mSubMeshNameMap[name] = index ;
  157|  11.0k|    }
_ZN4Ogre4Mesh12postLoadImplEv:
  174|  3.86k|    {
  175|       |        // Prepare for shadow volumes?
  176|  3.86k|        if (MeshManager::getSingleton().getPrepareAllMeshesForShadowVolumes())
  ------------------
  |  Branch (176:13): [True: 0, False: 3.86k]
  ------------------
  177|      0|        {
  178|      0|            if (mEdgeListsBuilt || mAutoBuildEdgeLists)
  ------------------
  |  Branch (178:17): [True: 0, False: 0]
  |  Branch (178:36): [True: 0, False: 0]
  ------------------
  179|      0|            {
  180|      0|                prepareForShadowVolume();
  181|      0|            }
  182|       |
  183|      0|            if (!mEdgeListsBuilt && mAutoBuildEdgeLists)
  ------------------
  |  Branch (183:17): [True: 0, False: 0]
  |  Branch (183:37): [True: 0, False: 0]
  ------------------
  184|      0|            {
  185|      0|                buildEdgeList();
  186|      0|            }
  187|      0|        }
  188|  3.86k|#if !OGRE_NO_MESHLOD
  189|       |        // The loading process accesses LOD usages directly, so
  190|       |        // transformation of user values must occur after loading is complete.
  191|       |
  192|       |        // Transform user LOD values (starting at index 1, no need to transform base value)
  193|  3.86k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (193:22): [True: 3.86k, False: 3.86k]
  ------------------
  194|  3.86k|            m.value = mLodStrategy->transformUserValue(m.userValue);
  195|       |        // Rewrite first value
  196|  3.86k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
  197|  3.86k|#endif
  198|  3.86k|    }
_ZN4Ogre4Mesh10unloadImplEv:
  241|  3.86k|    {
  242|       |        // Teardown submeshes
  243|  3.86k|        for (auto & i : mSubMeshList)
  ------------------
  |  Branch (243:23): [True: 105k, False: 3.86k]
  ------------------
  244|   105k|        {
  245|   105k|            OGRE_DELETE i;
  246|   105k|        }
  247|  3.86k|        if (sharedVertexData)
  ------------------
  |  Branch (247:13): [True: 880, False: 2.98k]
  ------------------
  248|    880|        {
  249|    880|            resetVertexData();
  250|    880|        }
  251|       |        // Clear SubMesh lists
  252|  3.86k|        mSubMeshList.clear();
  253|  3.86k|        mSubMeshNameMap.clear();
  254|       |
  255|  3.86k|        freeEdgeList();
  256|  3.86k|#if !OGRE_NO_MESHLOD
  257|       |        // Removes all LOD data
  258|  3.86k|        removeLodLevels();
  259|  3.86k|#endif
  260|  3.86k|        mPreparedForShadowVolumes = false;
  261|       |
  262|       |        // remove all poses & animations
  263|  3.86k|        removeAllAnimations();
  264|  3.86k|        removeAllPoses();
  265|       |
  266|       |        // Clear bone assignments
  267|  3.86k|        mBoneAssignments.clear();
  268|  3.86k|        mBoneAssignmentsOutOfDate = false;
  269|       |
  270|       |        // Removes reference to skeleton
  271|  3.86k|        mSkeleton.reset();
  272|  3.86k|    }
_ZN4Ogre4Mesh10_setBoundsERKNS_14AxisAlignedBoxEb:
  388|  3.26k|    {
  389|  3.26k|        mAABB = bounds;
  390|  3.26k|        mBoundRadius = Math::boundingRadiusFromAABB(mAABB);
  391|       |
  392|  3.26k|        if( mAABB.isFinite() )
  ------------------
  |  Branch (392:13): [True: 3.26k, False: 0]
  ------------------
  393|  3.26k|        {
  394|  3.26k|            Vector3 max = mAABB.getMaximum();
  395|  3.26k|            Vector3 min = mAABB.getMinimum();
  396|       |
  397|  3.26k|            if (pad)
  ------------------
  |  Branch (397:17): [True: 0, False: 3.26k]
  ------------------
  398|      0|            {
  399|       |                // Pad out the AABB a little, helps with most bounds tests
  400|      0|                Vector3 scaler = (max - min) * MeshManager::getSingleton().getBoundsPaddingFactor();
  401|      0|                mAABB.setExtents(min  - scaler, max + scaler);
  402|       |                // Pad out the sphere a little too
  403|      0|                mBoundRadius = mBoundRadius + (mBoundRadius * MeshManager::getSingleton().getBoundsPaddingFactor());
  404|      0|            }
  405|  3.26k|        }
  406|  3.26k|    }
_ZN4Ogre4Mesh24_setBoundingSphereRadiusEf:
  409|  3.26k|    {
  410|  3.26k|        mBoundRadius = radius;
  411|  3.26k|    }
_ZN4Ogre4Mesh15setSkeletonNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  480|  26.5k|    {
  481|  26.5k|        if (skelName != getSkeletonName())
  ------------------
  |  Branch (481:13): [True: 26.0k, False: 533]
  ------------------
  482|  26.0k|        {
  483|  26.0k|            if (skelName.empty())
  ------------------
  |  Branch (483:17): [True: 0, False: 26.0k]
  ------------------
  484|      0|            {
  485|       |                // No skeleton
  486|      0|                mSkeleton.reset();
  487|      0|            }
  488|  26.0k|            else
  489|  26.0k|            {
  490|       |                // Load skeleton
  491|  26.0k|                try {
  492|  26.0k|                    mSkeleton = static_pointer_cast<Skeleton>(SkeletonManager::getSingleton().load(skelName, mGroup));
  493|  26.0k|                }
  494|  26.0k|                catch (...)
  495|  26.0k|                {
  496|  26.0k|                    mSkeleton.reset();
  497|       |                    // Log this error
  498|  26.0k|                    String msg = "Unable to load skeleton '";
  499|  26.0k|                    msg += skelName + "' for Mesh '" + mName + "'. This Mesh will not be animated.";
  500|  26.0k|                    LogManager::getSingleton().logError(msg);
  501|       |
  502|  26.0k|                }
  503|       |
  504|       |
  505|  26.0k|            }
  506|  26.0k|            if (isLoaded())
  ------------------
  |  Branch (506:17): [True: 26.0k, False: 0]
  ------------------
  507|  26.0k|                _dirtyState();
  508|  26.0k|        }
  509|  26.5k|    }
_ZN4Ogre4Mesh17addBoneAssignmentERKNS_20VertexBoneAssignmentE:
  512|  2.37k|    {
  513|  2.37k|        mBoneAssignments.emplace(vertBoneAssign.vertexIndex, vertBoneAssign);
  514|  2.37k|        mBoneAssignmentsOutOfDate = true;
  515|  2.37k|    }
_ZNK4Ogre4Mesh15getSkeletonNameEv:
 1078|  26.5k|    {
 1079|  26.5k|        return mSkeleton ? mSkeleton->getName() : BLANKSTRING;
  ------------------
  |  Branch (1079:16): [True: 0, False: 26.5k]
  ------------------
 1080|  26.5k|    }
_ZN4Ogre4Mesh11_setLodInfoEt:
 1144|  4.37k|    {
 1145|  4.37k|        assert(!mEdgeListsBuilt && "Can't modify LOD after edge lists built");
 1146|       |
 1147|       |        // Basic prerequisites
 1148|  4.37k|        OgreAssert(numLevels > 0,  "Must be at least one level (full detail level must exist)");
  ------------------
  |  Branch (1148:9): [True: 0, False: 4.37k]
  ------------------
 1149|       |
 1150|  4.37k|        mMeshLodUsageList.resize(numLevels);
 1151|       |        // Resize submesh face data lists too
 1152|  4.37k|        for (auto & i : mSubMeshList)
  ------------------
  |  Branch (1152:23): [True: 5.47k, False: 4.37k]
  ------------------
 1153|  5.47k|        {
 1154|  5.47k|            i->mLodFaceList.resize(numLevels - 1);
 1155|  5.47k|        }
 1156|  4.37k|    }
_ZN4Ogre4Mesh15removeLodLevelsEv:
 1208|  3.86k|    {
 1209|  3.86k|#if !OGRE_NO_MESHLOD
 1210|       |        // Remove data from SubMeshes
 1211|  3.86k|        for (auto *isub : mSubMeshList)
  ------------------
  |  Branch (1211:25): [True: 0, False: 3.86k]
  ------------------
 1212|      0|        {
 1213|      0|            isub->removeLodLevels();
 1214|      0|        }
 1215|       |
 1216|  3.86k|        bool edgeListWasBuilt = isEdgeListBuilt();
 1217|  3.86k|        freeEdgeList();
 1218|       |
 1219|       |        // Reinitialise
 1220|  3.86k|        mMeshLodUsageList.resize(1);
 1221|  3.86k|        mMeshLodUsageList[0].edgeData = NULL;
 1222|       |
 1223|  3.86k|        if(edgeListWasBuilt)
  ------------------
  |  Branch (1223:12): [True: 0, False: 3.86k]
  ------------------
 1224|      0|            buildEdgeList();
 1225|  3.86k|#endif
 1226|  3.86k|    }
_ZN4Ogre4Mesh12freeEdgeListEv:
 1711|  7.73k|    {
 1712|  7.73k|        if (!mEdgeListsBuilt)
  ------------------
  |  Branch (1712:13): [True: 7.40k, False: 323]
  ------------------
 1713|  7.40k|            return;
 1714|    323|#if !OGRE_NO_MESHLOD
 1715|       |        // Loop over LODs
 1716|    323|        unsigned short index = 0;
 1717|    323|        for (auto& usage : mMeshLodUsageList)
  ------------------
  |  Branch (1717:26): [True: 3.75k, False: 323]
  ------------------
 1718|  3.75k|        {
 1719|  3.75k|            if (usage.manualName.empty() || index == 0)
  ------------------
  |  Branch (1719:17): [True: 3.68k, False: 72]
  |  Branch (1719:45): [True: 0, False: 72]
  ------------------
 1720|  3.68k|            {
 1721|       |                // Only delete if we own this data
 1722|       |                // Manual LODs > 0 own their own
 1723|  3.68k|                OGRE_DELETE usage.edgeData;
 1724|  3.68k|            }
 1725|  3.75k|            usage.edgeData = NULL;
 1726|  3.75k|            ++index;
 1727|  3.75k|        }
 1728|       |#else
 1729|       |        OGRE_DELETE mMeshLodUsageList[0].edgeData;
 1730|       |        mMeshLodUsageList[0].edgeData = NULL;
 1731|       |#endif
 1732|    323|        mEdgeListsBuilt = false;
 1733|    323|    }
_ZNK4Ogre4Mesh13calculateSizeEv:
 2010|  3.86k|    {
 2011|       |        // calculate GPU size
 2012|  3.86k|        size_t ret = 0;
 2013|  3.86k|        unsigned short i;
 2014|       |        // Shared vertices
 2015|  3.86k|        if (sharedVertexData)
  ------------------
  |  Branch (2015:13): [True: 0, False: 3.86k]
  ------------------
 2016|      0|        {
 2017|      0|            for (i = 0;
 2018|      0|                i < sharedVertexData->vertexBufferBinding->getBufferCount();
  ------------------
  |  Branch (2018:17): [True: 0, False: 0]
  ------------------
 2019|      0|                ++i)
 2020|      0|            {
 2021|      0|                ret += sharedVertexData->vertexBufferBinding
 2022|      0|                    ->getBuffer(i)->getSizeInBytes();
 2023|      0|            }
 2024|      0|        }
 2025|       |
 2026|  3.86k|        for (auto *s : mSubMeshList)
  ------------------
  |  Branch (2026:22): [True: 0, False: 3.86k]
  ------------------
 2027|      0|        {
 2028|       |            // Dedicated vertices
 2029|      0|            if (!s->useSharedVertices)
  ------------------
  |  Branch (2029:17): [True: 0, False: 0]
  ------------------
 2030|      0|            {
 2031|      0|                for (i = 0;
 2032|      0|                    i < s->vertexData->vertexBufferBinding->getBufferCount();
  ------------------
  |  Branch (2032:21): [True: 0, False: 0]
  ------------------
 2033|      0|                    ++i)
 2034|      0|                {
 2035|      0|                    ret += s->vertexData->vertexBufferBinding
 2036|      0|                        ->getBuffer(i)->getSizeInBytes();
 2037|      0|                }
 2038|      0|            }
 2039|      0|            if (s->indexData->indexBuffer)
  ------------------
  |  Branch (2039:17): [True: 0, False: 0]
  ------------------
 2040|      0|            {
 2041|       |                // Index data
 2042|      0|                ret += s->indexData->indexBuffer->getSizeInBytes();
 2043|      0|            }
 2044|       |
 2045|      0|        }
 2046|  3.86k|        return ret;
 2047|  3.86k|    }
_ZN4Ogre4Mesh15createAnimationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
 2143|  1.27k|    {
 2144|       |        // Check name not used
 2145|  1.27k|        if (mAnimationsList.find(name) != mAnimationsList.end())
  ------------------
  |  Branch (2145:13): [True: 3, False: 1.27k]
  ------------------
 2146|      3|        {
 2147|      3|            OGRE_EXCEPT(
 2148|      3|                Exception::ERR_DUPLICATE_ITEM,
 2149|      3|                "An animation with the name " + name + " already exists");
 2150|      3|        }
 2151|       |
 2152|  1.27k|        Animation* ret = OGRE_NEW Animation(name, length);
 2153|  1.27k|        ret->_notifyContainer(this);
 2154|       |
 2155|       |        // Add to list
 2156|  1.27k|        mAnimationsList[name] = ret;
 2157|       |
 2158|       |        // Mark animation types dirty
 2159|  1.27k|        mAnimationTypesDirty = true;
 2160|       |
 2161|  1.27k|        return ret;
 2162|       |
 2163|  1.27k|    }
_ZN4Ogre4Mesh19removeAllAnimationsEv:
 2231|  3.86k|    {
 2232|  3.86k|        for (auto& a : mAnimationsList)
  ------------------
  |  Branch (2232:22): [True: 1.27k, False: 3.86k]
  ------------------
 2233|  1.27k|        {
 2234|       |            OGRE_DELETE a.second;
 2235|  1.27k|        }
 2236|  3.86k|        mAnimationsList.clear();
 2237|  3.86k|        mAnimationTypesDirty = true;
 2238|  3.86k|    }
_ZN4Ogre4Mesh26getVertexDataByTrackHandleEt:
 2241|    464|    {
 2242|    464|        if (handle == 0)
  ------------------
  |  Branch (2242:13): [True: 421, False: 43]
  ------------------
 2243|    421|        {
 2244|    421|            return sharedVertexData;
 2245|    421|        }
 2246|     43|        else
 2247|     43|        {
 2248|     43|            return getSubMesh(handle-1)->vertexData;
 2249|     43|        }
 2250|    464|    }
_ZN4Ogre4Mesh10createPoseEtRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2253|  33.5k|    {
 2254|       |        Pose* retPose = OGRE_NEW Pose(target, name);
 2255|  33.5k|        mPoseList.push_back(retPose);
 2256|  33.5k|        return retPose;
 2257|  33.5k|    }
_ZN4Ogre4Mesh14removeAllPosesEv:
 2318|  3.86k|    {
 2319|  3.86k|        for (auto & i : mPoseList)
  ------------------
  |  Branch (2319:23): [True: 33.5k, False: 3.86k]
  ------------------
 2320|  33.5k|        {
 2321|       |            OGRE_DELETE i;
 2322|  33.5k|        }
 2323|  3.86k|        mPoseList.clear();
 2324|  3.86k|    }
_ZNK4Ogre4Mesh14getLodStrategyEv:
 2342|  3.86k|    {
 2343|  3.86k|        return mLodStrategy;
 2344|  3.86k|    }
_ZN4Ogre4Mesh14setLodStrategyEPNS_11LodStrategyE:
 2348|  6.84k|    {
 2349|  6.84k|        mLodStrategy = lodStrategy;
 2350|       |
 2351|  6.84k|        assert(mMeshLodUsageList.size());
 2352|       |
 2353|       |        // Re-transform user LOD values (starting at index 1, no need to transform base value)
 2354|  6.84k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (2354:22): [True: 6.88k, False: 6.84k]
  ------------------
 2355|  6.88k|            m.value = mLodStrategy->transformUserValue(m.userValue);
 2356|       |
 2357|       |        // Rewrite first value
 2358|  6.84k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
 2359|  6.84k|    }
_ZN4Ogre4Mesh21_convertVertexElementENS_21VertexElementSemanticENS_17VertexElementTypeE:
 2363|  3.30k|    {
 2364|  3.30k|        if (sharedVertexData)
  ------------------
  |  Branch (2364:13): [True: 602, False: 2.70k]
  ------------------
 2365|    602|            sharedVertexData->convertVertexElement(semantic, dstType);
 2366|       |
 2367|  3.30k|        for (auto s : getSubMeshes())
  ------------------
  |  Branch (2367:21): [True: 59.1k, False: 3.30k]
  ------------------
 2368|  59.1k|            if (s->vertexData)
  ------------------
  |  Branch (2368:17): [True: 55.5k, False: 3.62k]
  ------------------
 2369|  55.5k|                s->vertexData->convertVertexElement(semantic, dstType);
 2370|  3.30k|    }

_ZN4Ogre11MeshManager12getSingletonEv:
   58|  11.5k|    {  
   59|       |        assert( msSingleton );  return ( *msSingleton );  
   60|  11.5k|    }
_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|  3.86k|    {
  148|  3.86k|        return static_pointer_cast<Mesh>(createResource(name,group,isManual,loader,createParams));
  149|  3.86k|    }
_ZN4Ogre11MeshManager35getPrepareAllMeshesForShadowVolumesEv:
  326|  3.86k|    {
  327|  3.86k|        return mPrepAllMeshesForShadowVolumes;
  328|  3.86k|    }
_ZN4Ogre11MeshManager10createImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmS9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
  363|  3.86k|    {
  364|       |        // no use for createParams here
  365|       |        return OGRE_NEW Mesh(this, name, handle, group, isManual, loader);
  366|  3.86k|    }
_ZNK4Ogre9MeshCodec7getTypeEv:
   39|      1|        String getType() const override { return "mesh"; }

_ZN4Ogre14MeshSerializerC2Ev:
   47|  3.86k|        :mListener(0)
   48|  3.86k|    {
   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|  3.86k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   57|  3.86k|            MESH_VERSION_1_10, "[MeshSerializer_v1.100]", 
   58|  3.86k|            OGRE_NEW MeshSerializerImpl()));
   59|       |
   60|  3.86k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   61|  3.86k|            MESH_VERSION_1_8, "[MeshSerializer_v1.8]", 
   62|  3.86k|            OGRE_NEW MeshSerializerImpl_v1_8()));
   63|       |
   64|  3.86k|        if(!mSupportLegacyFormats)
  ------------------
  |  Branch (64:12): [True: 3.86k, False: 0]
  ------------------
   65|  3.86k|            return;
   66|       |
   67|      0|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   68|      0|            MESH_VERSION_1_7, "[MeshSerializer_v1.41]", 
   69|      0|            OGRE_NEW MeshSerializerImpl_v1_41()));
   70|       |
   71|      0|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   72|      0|            MESH_VERSION_1_4, "[MeshSerializer_v1.40]", 
   73|      0|            OGRE_NEW MeshSerializerImpl_v1_4()));
   74|       |
   75|      0|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   76|      0|            MESH_VERSION_1_0, "[MeshSerializer_v1.30]", 
   77|      0|            OGRE_NEW MeshSerializerImpl_v1_3()));
   78|      0|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   79|      0|            MESH_VERSION_LEGACY, "[MeshSerializer_v1.20]", 
   80|      0|            OGRE_NEW MeshSerializerImpl_v1_2()));
   81|       |
   82|      0|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   83|      0|            MESH_VERSION_LEGACY, "[MeshSerializer_v1.10]", 
   84|      0|            OGRE_NEW MeshSerializerImpl_v1_1()));
   85|       |        
   86|      0|    }
_ZN4Ogre14MeshSerializerD2Ev:
   89|  3.86k|    {
   90|       |        // delete map
   91|  3.86k|        for (auto & i : mVersionData)
  ------------------
  |  Branch (91:23): [True: 7.73k, False: 3.86k]
  ------------------
   92|  7.73k|        {
   93|  7.73k|            OGRE_DELETE i;
   94|  7.73k|        }
   95|  3.86k|        mVersionData.clear();
   96|       |
   97|  3.86k|    }
_ZN4Ogre14MeshSerializer10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  141|  3.86k|    {
  142|  3.86k|        determineEndianness(stream);
  143|       |
  144|       |        // Read header and determine the version
  145|  3.86k|        unsigned short headerID;
  146|       |        
  147|       |        // Read header ID
  148|  3.86k|        readShorts(stream, &headerID, 1);
  149|       |        
  150|  3.86k|        if (headerID != HEADER_CHUNK_ID)
  ------------------
  |  Branch (150:13): [True: 0, False: 3.86k]
  ------------------
  151|      0|        {
  152|      0|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "File header not found",
  153|      0|                "MeshSerializer::importMesh");
  154|      0|        }
  155|       |        // Read version
  156|  3.86k|        String ver = readString(stream);
  157|       |        // Jump back to start
  158|  3.86k|        stream->seek(0);
  159|       |
  160|       |        // Find the implementation to use
  161|  3.86k|        MeshSerializerImpl* impl = 0;
  162|  3.86k|        for (auto & i : mVersionData)
  ------------------
  |  Branch (162:23): [True: 5.59k, False: 104]
  ------------------
  163|  5.59k|        {
  164|  5.59k|            if (i->versionString == ver)
  ------------------
  |  Branch (164:17): [True: 3.76k, False: 1.83k]
  ------------------
  165|  3.76k|            {
  166|  3.76k|                impl = i->impl.get();
  167|  3.76k|                break;
  168|  3.76k|            }
  169|  5.59k|        }           
  170|  3.86k|        if (!impl)
  ------------------
  |  Branch (170:13): [True: 74, False: 3.79k]
  ------------------
  171|  3.86k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Cannot find serializer implementation for "
  172|  3.79k|                        "mesh version " + ver, "MeshSerializer::importMesh");
  173|       |        
  174|       |        // Call implementation
  175|  3.79k|        impl->importMesh(stream, pDest, mListener);
  176|       |        // Warn on old version of mesh
  177|  3.79k|        if (ver != mVersionData[0]->versionString)
  ------------------
  |  Branch (177:13): [True: 687, False: 3.10k]
  ------------------
  178|    687|        {
  179|    687|            LogManager::getSingleton().logWarning(pDest->getName() + " uses an old format " + ver +
  180|    687|                                                  "; upgrade with the OgreMeshUpgrader tool");
  181|    687|        }
  182|       |
  183|  3.79k|        if(mListener)
  ------------------
  |  Branch (183:12): [True: 0, False: 3.79k]
  ------------------
  184|      0|            mListener->processMeshCompleted(pDest);
  185|       |
  186|  3.79k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (186:19): [True: 0, False: 3.79k]
  ------------------
  187|  3.79k|        if (!rs || !rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_INT_10_10_10_2))
  ------------------
  |  Branch (187:13): [True: 3.79k, False: 0]
  |  Branch (187:20): [True: 0, False: 0]
  ------------------
  188|  1.66k|        {
  189|       |            // unpacks to floats, if packed
  190|  1.66k|            pDest->_convertVertexElement(VES_NORMAL, VET_FLOAT3);
  191|  1.66k|            pDest->_convertVertexElement(VES_TANGENT, VET_FLOAT4);
  192|  1.66k|        }
  193|  3.79k|    }
_ZN4Ogre15MeshVersionDataC2ENS_11MeshVersionERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPNS_18MeshSerializerImplE:
   41|  7.73k|        : version(_ver), versionString(_string), impl(_impl) {}

_ZN4Ogre18MeshSerializerImplC2Ev:
   63|  7.73k|    {
   64|       |        // Version number
   65|  7.73k|        mVersion = "[MeshSerializer_v1.100]";
   66|  7.73k|        exportedLodCount = 0;
   67|  7.73k|    }
_ZN4Ogre18MeshSerializerImplD2Ev:
   70|  7.73k|    {
   71|  7.73k|    }
_ZN4Ogre18MeshSerializerImpl10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  110|  3.76k|    {
  111|       |        // Determine endianness (must be the first thing we do!)
  112|  3.76k|        determineEndianness(stream);
  113|       |
  114|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  115|       |        enableValidation();
  116|       |#endif
  117|       |        // Check header
  118|  3.76k|        readFileHeader(stream);
  119|  3.76k|        pushInnerChunk(stream);
  120|  3.76k|        unsigned short streamID = readChunk(stream);
  121|       |
  122|  35.1k|        while(!stream->eof())
  ------------------
  |  Branch (122:15): [True: 33.2k, False: 1.91k]
  ------------------
  123|  33.2k|        {
  124|  33.2k|            switch (streamID)
  ------------------
  |  Branch (124:21): [True: 31.3k, False: 1.89k]
  ------------------
  125|  33.2k|            {
  126|  31.3k|            case M_MESH:
  ------------------
  |  Branch (126:13): [True: 31.3k, False: 1.89k]
  ------------------
  127|  31.3k|                readMesh(stream, pMesh, listener);
  128|  31.3k|                break;
  129|  33.2k|            }
  130|       |
  131|  31.3k|            streamID = readChunk(stream);
  132|  31.3k|        }
  133|  1.91k|        popInnerChunk(stream);
  134|  1.91k|    }
_ZN4Ogre18MeshSerializerImpl12readGeometryERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  601|   114k|    {
  602|       |
  603|   114k|        dest->vertexStart = 0;
  604|       |
  605|   114k|        unsigned int vertexCount = 0;
  606|   114k|        readInts(stream, &vertexCount, 1);
  607|   114k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vertexCount, 1))
  ------------------
  |  Branch (607:13): [True: 1.63k, False: 112k]
  ------------------
  608|   114k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex count exceeds remaining chunk data");
  609|   112k|        dest->vertexCount = vertexCount;
  610|       |        // Find optional geometry streams
  611|   112k|        if (!stream->eof())
  ------------------
  |  Branch (611:13): [True: 112k, False: 18]
  ------------------
  612|   112k|        {
  613|   112k|            pushInnerChunk(stream);
  614|   112k|            unsigned short streamID = readChunk(stream);
  615|   142k|            while(!stream->eof() &&
  ------------------
  |  Branch (615:19): [True: 141k, False: 891]
  ------------------
  616|   141k|                (streamID == M_GEOMETRY_VERTEX_DECLARATION ||
  ------------------
  |  Branch (616:18): [True: 22.5k, False: 119k]
  ------------------
  617|   119k|                 streamID == M_GEOMETRY_VERTEX_BUFFER ))
  ------------------
  |  Branch (617:18): [True: 10.7k, False: 108k]
  ------------------
  618|  33.2k|            {
  619|  33.2k|                switch (streamID)
  ------------------
  |  Branch (619:25): [True: 33.2k, False: 0]
  ------------------
  620|  33.2k|                {
  621|  22.5k|                case M_GEOMETRY_VERTEX_DECLARATION:
  ------------------
  |  Branch (621:17): [True: 22.5k, False: 10.7k]
  ------------------
  622|  22.5k|                    readGeometryVertexDeclaration(stream, pMesh, dest);
  623|  22.5k|                    break;
  624|  10.7k|                case M_GEOMETRY_VERTEX_BUFFER:
  ------------------
  |  Branch (624:17): [True: 10.7k, False: 22.5k]
  ------------------
  625|  10.7k|                    readGeometryVertexBuffer(stream, pMesh, dest);
  626|  10.7k|                    break;
  627|  33.2k|                }
  628|       |                // Get next stream
  629|  30.1k|                if (!stream->eof())
  ------------------
  |  Branch (629:21): [True: 30.0k, False: 84]
  ------------------
  630|  30.0k|                {
  631|  30.0k|                    streamID = readChunk(stream);
  632|  30.0k|                }
  633|  30.1k|            }
  634|   109k|            if (!stream->eof())
  ------------------
  |  Branch (634:17): [True: 108k, False: 891]
  ------------------
  635|   108k|            {
  636|       |                // Backpedal back to start of non-submesh stream
  637|   108k|                backpedalChunkHeader(stream);
  638|   108k|            }
  639|   109k|            popInnerChunk(stream);
  640|   109k|        }
  641|       |
  642|       |        // Perform any necessary colour conversions from ARGB to ABGR (UBYTE4)
  643|   109k|        dest->convertPackedColour(_DETAIL_SWAP_RB, VET_UBYTE4_NORM);
  644|       |
  645|   109k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (645:19): [True: 0, False: 109k]
  ------------------
  646|   109k|        if(!rs || rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_16X3))
  ------------------
  |  Branch (646:12): [True: 109k, False: 0]
  |  Branch (646:19): [True: 0, False: 0]
  ------------------
  647|   108k|            return;
  648|       |
  649|    770|        for(auto& elem : dest->vertexDeclaration->getElements())
  ------------------
  |  Branch (649:24): [True: 0, False: 770]
  ------------------
  650|      0|        {
  651|      0|            if (elem.getType() == VET_HALF3 || elem.getType() == VET_SHORT3 || elem.getType() == VET_USHORT3)
  ------------------
  |  Branch (651:17): [True: 0, False: 0]
  |  Branch (651:48): [True: 0, False: 0]
  |  Branch (651:80): [True: 0, False: 0]
  ------------------
  652|      0|            {
  653|      0|                auto dstType = VertexElement::multiplyTypeCount(VertexElement::getBaseType(elem.getType()), 4);
  654|      0|                dest->convertVertexElement(elem.getSemantic(), dstType, elem.getIndex());
  655|      0|            }
  656|      0|        }
  657|    770|    }
_ZN4Ogre18MeshSerializerImpl29readGeometryVertexDeclarationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  661|  22.5k|    {
  662|       |        // Find optional geometry streams
  663|  22.5k|        if (!stream->eof())
  ------------------
  |  Branch (663:13): [True: 22.5k, False: 0]
  ------------------
  664|  22.5k|        {
  665|  22.5k|            pushInnerChunk(stream);
  666|  22.5k|            unsigned short streamID = readChunk(stream);
  667|  51.4k|            while(!stream->eof() &&
  ------------------
  |  Branch (667:19): [True: 51.1k, False: 228]
  ------------------
  668|  51.1k|                (streamID == M_GEOMETRY_VERTEX_ELEMENT ))
  ------------------
  |  Branch (668:17): [True: 29.0k, False: 22.1k]
  ------------------
  669|  29.0k|            {
  670|  29.0k|                switch (streamID)
  ------------------
  |  Branch (670:25): [True: 29.0k, False: 0]
  ------------------
  671|  29.0k|                {
  672|  29.0k|                case M_GEOMETRY_VERTEX_ELEMENT:
  ------------------
  |  Branch (672:17): [True: 29.0k, False: 0]
  ------------------
  673|  29.0k|                    readGeometryVertexElement(stream, pMesh, dest);
  674|  29.0k|                    break;
  675|  29.0k|                }
  676|       |                // Get next stream
  677|  28.8k|                if (!stream->eof())
  ------------------
  |  Branch (677:21): [True: 28.8k, False: 36]
  ------------------
  678|  28.8k|                {
  679|  28.8k|                    streamID = readChunk(stream);
  680|  28.8k|                }
  681|  28.8k|            }
  682|  22.3k|            if (!stream->eof())
  ------------------
  |  Branch (682:17): [True: 22.1k, False: 228]
  ------------------
  683|  22.1k|            {
  684|       |                // Backpedal back to start of non-submesh stream
  685|  22.1k|                backpedalChunkHeader(stream);
  686|  22.1k|            }
  687|  22.3k|            popInnerChunk(stream);
  688|  22.3k|        }
  689|       |
  690|  22.5k|    }
_ZN4Ogre18MeshSerializerImpl25readGeometryVertexElementERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  694|  29.0k|    {
  695|  29.0k|        unsigned short source, offset, index, tmp;
  696|  29.0k|        VertexElementType vType;
  697|  29.0k|        VertexElementSemantic vSemantic;
  698|       |        // unsigned short source;   // buffer bind source
  699|  29.0k|        readShorts(stream, &source, 1);
  700|       |        // unsigned short type;     // VertexElementType
  701|  29.0k|        readShorts(stream, &tmp, 1);
  702|  29.0k|        if(tmp == 4 || tmp == 11)
  ------------------
  |  Branch (702:12): [True: 300, False: 28.7k]
  |  Branch (702:24): [True: 1.44k, False: 27.3k]
  ------------------
  703|  1.74k|            vType = VET_UBYTE4_NORM;
  704|  27.3k|        else
  705|  27.3k|            vType = static_cast<VertexElementType>(tmp);
  706|       |        // unsigned short semantic; // VertexElementSemantic
  707|  29.0k|        readShorts(stream, &tmp, 1);
  708|  29.0k|        vSemantic = static_cast<VertexElementSemantic>(tmp);
  709|       |        // unsigned short offset;   // start offset in buffer in bytes
  710|  29.0k|        readShorts(stream, &offset, 1);
  711|       |        // unsigned short index;    // index of the semantic
  712|  29.0k|        readShorts(stream, &index, 1);
  713|       |
  714|  29.0k|        if (dest->vertexBufferBinding->isBufferBound(source))
  ------------------
  |  Branch (714:13): [True: 206, False: 28.8k]
  ------------------
  715|  29.0k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Cannot add vertex element after reading buffer");
  716|       |
  717|  28.8k|        dest->vertexDeclaration->addElement(source, offset, vType, vSemantic, index);
  718|       |
  719|  28.8k|        if (vType == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (719:13): [True: 4.03k, False: 24.8k]
  ------------------
  720|  4.03k|        {
  721|  4.03k|            LogManager::getSingleton().stream(LML_WARNING)
  722|  4.03k|                << "Warning: VET_COLOUR_ARGB element type is deprecated and incurs conversion on load. "
  723|  4.03k|                << "Use OgreMeshUpgrader on '" << pMesh->getName() << "' as soon as possible.";
  724|  4.03k|        }
  725|       |
  726|  28.8k|    }
_ZN4Ogre18MeshSerializerImpl24readGeometryVertexBufferERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  730|  10.7k|    {
  731|  10.7k|        unsigned short bindIndex, vertexSize;
  732|       |        // unsigned short bindIndex;    // Index to bind this buffer to
  733|  10.7k|        readShorts(stream, &bindIndex, 1);
  734|       |        // unsigned short vertexSize;   // Per-vertex size, must agree with declaration at this index
  735|  10.7k|        readShorts(stream, &vertexSize, 1);
  736|  10.7k|        if (dest->vertexBufferBinding->isBufferBound(bindIndex))
  ------------------
  |  Branch (736:13): [True: 242, False: 10.4k]
  ------------------
  737|  10.7k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate vertex buffer binding");
  738|  10.4k|        pushInnerChunk(stream);
  739|  10.4k|        {
  740|       |        // Check for vertex data header
  741|  10.4k|        unsigned short headerID;
  742|  10.4k|        headerID = readChunk(stream);
  743|  10.4k|        if (headerID != M_GEOMETRY_VERTEX_BUFFER_DATA)
  ------------------
  |  Branch (743:13): [True: 364, False: 10.1k]
  ------------------
  744|    364|        {
  745|    364|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Can't find vertex buffer data area",
  746|    364|                "MeshSerializerImpl::readGeometryVertexBuffer");
  747|    364|        }
  748|  10.1k|        size_t declaredVertexSize = dest->vertexDeclaration->getVertexSize(bindIndex);
  749|  10.1k|        if (declaredVertexSize == 0)
  ------------------
  |  Branch (749:13): [True: 605, False: 9.50k]
  ------------------
  750|    605|        {
  751|    605|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Missing vertex declaration for buffer bind index");
  752|    605|        }
  753|       |        // Check that vertex size agrees
  754|  9.50k|        if (declaredVertexSize != vertexSize)
  ------------------
  |  Branch (754:13): [True: 145, False: 9.36k]
  ------------------
  755|    145|        {
  756|    145|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer vertex size does not agree with vertex declaration");
  757|    145|        }
  758|       |
  759|       |        // Create / populate vertex buffer
  760|  9.36k|        size_t vbufBytes = dest->vertexCount * (size_t)vertexSize;
  761|  9.36k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vbufBytes, 1))
  ------------------
  |  Branch (761:13): [True: 486, False: 8.87k]
  ------------------
  762|  9.36k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex buffer size exceeds remaining chunk data");
  763|  8.87k|        HardwareVertexBufferSharedPtr vbuf;
  764|  8.87k|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
  765|  8.87k|            vertexSize,
  766|  8.87k|            dest->vertexCount,
  767|  8.87k|            pMesh->mVertexBufferUsage,
  768|  8.87k|            pMesh->mVertexBufferShadowBuffer);
  769|  8.87k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
  770|  8.87k|        stream->read(vbufLock.pData, vbufBytes);
  771|       |
  772|  8.87k|        auto elems = dest->vertexDeclaration->findElementsBySource(bindIndex);
  773|       |        // validate vertex element declarations
  774|  8.87k|        for (auto& elem : elems)
  ------------------
  |  Branch (774:25): [True: 14.5k, False: 7.95k]
  ------------------
  775|  14.5k|        {
  776|  14.5k|            if (elem.getSize() == 0)
  ------------------
  |  Branch (776:17): [True: 213, False: 14.3k]
  ------------------
  777|  14.5k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid vertex element type");
  778|  14.3k|            if (elem.getOffset() + elem.getSize() > vertexSize)
  ------------------
  |  Branch (778:17): [True: 702, False: 13.6k]
  ------------------
  779|  14.3k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  780|  14.3k|                                "Vertex element offset + size exceeds vertex buffer stride");
  781|  14.3k|        }
  782|       |
  783|       |        // endian conversion for OSX
  784|  7.95k|        flipFromLittleEndian(vbufLock.pData, dest->vertexCount, vertexSize, elems);
  785|       |
  786|       |        // Set binding
  787|  7.95k|        dest->vertexBufferBinding->setBinding(bindIndex, vbuf);
  788|  7.95k|        }
  789|      0|        popInnerChunk(stream);
  790|       |
  791|  7.95k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshNameTableERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  794|  4.95k|    {
  795|       |        // The map for
  796|  4.95k|        std::map<unsigned short, String> subMeshNames;
  797|  4.95k|        unsigned short streamID, subMeshIndex;
  798|       |
  799|       |        // Need something to store the index, and the objects name
  800|       |        // This table is a method that imported meshes can retain their naming
  801|       |        // so that the names established in the modelling software can be used
  802|       |        // to get the sub-meshes by name. The exporter must support exporting
  803|       |        // the optional stream M_SUBMESH_NAME_TABLE.
  804|       |
  805|       |        // Read in all the sub-streams. Each sub-stream should contain an index and Ogre::String for the name.
  806|  4.95k|        if (!stream->eof())
  ------------------
  |  Branch (806:13): [True: 4.95k, False: 0]
  ------------------
  807|  4.95k|        {
  808|  4.95k|            pushInnerChunk(stream);
  809|  4.95k|            streamID = readChunk(stream);
  810|  17.0k|            while(!stream->eof() && (streamID == M_SUBMESH_NAME_TABLE_ELEMENT ))
  ------------------
  |  Branch (810:19): [True: 16.7k, False: 287]
  |  Branch (810:37): [True: 12.1k, False: 4.66k]
  ------------------
  811|  12.1k|            {
  812|       |                // Read in the index of the submesh.
  813|  12.1k|                readShorts(stream, &subMeshIndex, 1);
  814|       |                // Read in the String and map it to its index.
  815|  12.1k|                subMeshNames[subMeshIndex] = readString(stream);
  816|       |
  817|       |                // If we're not end of file get the next stream ID
  818|  12.1k|                if (!stream->eof())
  ------------------
  |  Branch (818:21): [True: 11.9k, False: 188]
  ------------------
  819|  11.9k|                    streamID = readChunk(stream);
  820|  12.1k|            }
  821|  4.95k|            if (!stream->eof())
  ------------------
  |  Branch (821:17): [True: 4.66k, False: 287]
  ------------------
  822|  4.66k|            {
  823|       |                // Backpedal back to start of stream
  824|  4.66k|                backpedalChunkHeader(stream);
  825|  4.66k|            }
  826|  4.95k|            popInnerChunk(stream);
  827|  4.95k|        }
  828|       |
  829|       |        // Set all the submeshes names
  830|       |        // ?
  831|       |        // Loop through and save out the index and names.
  832|  4.95k|        for (auto& sn : subMeshNames)
  ------------------
  |  Branch (832:23): [True: 11.0k, False: 4.95k]
  ------------------
  833|  11.0k|        {
  834|       |            // Name this submesh to the stored name.
  835|  11.0k|            pMesh->nameSubMesh(sn.second, sn.first);
  836|  11.0k|        }
  837|  4.95k|    }
_ZN4Ogre18MeshSerializerImpl8readMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  840|  31.3k|    {
  841|       |        // Never automatically build edge lists for this version
  842|       |        // expect them in the file or not at all
  843|  31.3k|        pMesh->mAutoBuildEdgeLists = false;
  844|       |
  845|       |        // bool skeletallyAnimated
  846|  31.3k|        bool skeletallyAnimated;
  847|  31.3k|        readBools(stream, &skeletallyAnimated, 1);
  848|       |
  849|       |        // Find all substreams
  850|  31.3k|        if (!stream->eof())
  ------------------
  |  Branch (850:13): [True: 31.3k, False: 6]
  ------------------
  851|  31.3k|        {
  852|  31.3k|            pushInnerChunk(stream);
  853|  31.3k|            unsigned short streamID = readChunk(stream);
  854|   215k|            while(!stream->eof() &&
  ------------------
  |  Branch (854:19): [True: 213k, False: 2.10k]
  ------------------
  855|   213k|                (streamID == M_GEOMETRY ||
  ------------------
  |  Branch (855:18): [True: 24.8k, False: 188k]
  ------------------
  856|   188k|                 streamID == M_SUBMESH ||
  ------------------
  |  Branch (856:18): [True: 105k, False: 83.1k]
  ------------------
  857|  83.1k|                 streamID == M_MESH_SKELETON_LINK ||
  ------------------
  |  Branch (857:18): [True: 26.5k, False: 56.5k]
  ------------------
  858|  56.5k|                 streamID == M_MESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (858:18): [True: 2.37k, False: 54.1k]
  ------------------
  859|  54.1k|                 streamID == M_MESH_LOD_LEVEL ||
  ------------------
  |  Branch (859:18): [True: 9.90k, False: 44.2k]
  ------------------
  860|  44.2k|                 streamID == M_MESH_BOUNDS ||
  ------------------
  |  Branch (860:18): [True: 3.26k, False: 40.9k]
  ------------------
  861|  40.9k|                 streamID == M_SUBMESH_NAME_TABLE ||
  ------------------
  |  Branch (861:18): [True: 4.95k, False: 36.0k]
  ------------------
  862|  36.0k|                 streamID == M_EDGE_LISTS ||
  ------------------
  |  Branch (862:18): [True: 905, False: 35.1k]
  ------------------
  863|  35.1k|                 streamID == M_POSES ||
  ------------------
  |  Branch (863:18): [True: 1.51k, False: 33.6k]
  ------------------
  864|  33.6k|                 streamID == M_ANIMATIONS ||
  ------------------
  |  Branch (864:18): [True: 4.17k, False: 29.4k]
  ------------------
  865|  29.4k|                 streamID == M_TABLE_EXTREMES))
  ------------------
  |  Branch (865:18): [True: 1.58k, False: 27.8k]
  ------------------
  866|   185k|            {
  867|   185k|                switch(streamID)
  ------------------
  |  Branch (867:24): [True: 185k, False: 0]
  ------------------
  868|   185k|                {
  869|  24.8k|                case M_GEOMETRY:
  ------------------
  |  Branch (869:17): [True: 24.8k, False: 160k]
  ------------------
  870|  24.8k|                    pMesh->createVertexData();
  871|  24.8k|                    try {
  872|  24.8k|                        readGeometry(stream, pMesh, pMesh->sharedVertexData);
  873|  24.8k|                    }
  874|  24.8k|                    catch (Exception&)
  875|  24.8k|                    {
  876|       |                        // duff geometry data entry with 0 vertices
  877|  5.47k|                        pMesh->resetVertexData();
  878|       |                        // Skip this stream (pointer will have been returned to just after header)
  879|  5.47k|                        stream->skip(mCurrentstreamLen - MSTREAM_OVERHEAD_SIZE);
  880|  5.47k|                    }
  881|  24.8k|                    break;
  882|   105k|                case M_SUBMESH:
  ------------------
  |  Branch (882:17): [True: 105k, False: 80.0k]
  ------------------
  883|   105k|                    readSubMesh(stream, pMesh, listener);
  884|   105k|                    break;
  885|  26.5k|                case M_MESH_SKELETON_LINK:
  ------------------
  |  Branch (885:17): [True: 26.5k, False: 159k]
  ------------------
  886|  26.5k|                    readSkeletonLink(stream, pMesh, listener);
  887|  26.5k|                    break;
  888|  2.37k|                case M_MESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (888:17): [True: 2.37k, False: 183k]
  ------------------
  889|  2.37k|                    readMeshBoneAssignment(stream, pMesh);
  890|  2.37k|                    break;
  891|  9.90k|                case M_MESH_LOD_LEVEL:
  ------------------
  |  Branch (891:17): [True: 9.90k, False: 175k]
  ------------------
  892|  9.90k|                    readMeshLodLevel(stream, pMesh);
  893|  9.90k|                    break;
  894|  3.26k|                case M_MESH_BOUNDS:
  ------------------
  |  Branch (894:17): [True: 3.26k, False: 182k]
  ------------------
  895|  3.26k|                    readBoundsInfo(stream, pMesh);
  896|  3.26k|                    break;
  897|  4.95k|                case M_SUBMESH_NAME_TABLE:
  ------------------
  |  Branch (897:17): [True: 4.95k, False: 180k]
  ------------------
  898|  4.95k|                    readSubMeshNameTable(stream, pMesh);
  899|  4.95k|                    break;
  900|    905|                case M_EDGE_LISTS:
  ------------------
  |  Branch (900:17): [True: 905, False: 184k]
  ------------------
  901|    905|                    readEdgeList(stream, pMesh);
  902|    905|                    break;
  903|  1.51k|                case M_POSES:
  ------------------
  |  Branch (903:17): [True: 1.51k, False: 184k]
  ------------------
  904|  1.51k|                    readPoses(stream, pMesh);
  905|  1.51k|                    break;
  906|  4.17k|                case M_ANIMATIONS:
  ------------------
  |  Branch (906:17): [True: 4.17k, False: 181k]
  ------------------
  907|  4.17k|                    readAnimations(stream, pMesh);
  908|  4.17k|                    break;
  909|  1.58k|                case M_TABLE_EXTREMES:
  ------------------
  |  Branch (909:17): [True: 1.58k, False: 184k]
  ------------------
  910|  1.58k|                    readExtremes(stream, pMesh);
  911|  1.58k|                    break;
  912|   185k|                }
  913|       |
  914|   184k|                if (!stream->eof())
  ------------------
  |  Branch (914:21): [True: 182k, False: 1.48k]
  ------------------
  915|   182k|                {
  916|   182k|                    streamID = readChunk(stream);
  917|   182k|                }
  918|       |
  919|   184k|            }
  920|  29.9k|            if (!stream->eof())
  ------------------
  |  Branch (920:17): [True: 27.8k, False: 2.10k]
  ------------------
  921|  27.8k|            {
  922|       |                // Backpedal back to start of stream
  923|  27.8k|                backpedalChunkHeader(stream);
  924|  27.8k|            }
  925|  29.9k|            popInnerChunk(stream);
  926|  29.9k|        }
  927|       |
  928|  31.3k|    }
_ZN4Ogre18MeshSerializerImpl11readSubMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  931|   105k|    {
  932|   105k|        unsigned short streamID;
  933|       |
  934|   105k|        SubMesh* sm = pMesh->createSubMesh();
  935|       |
  936|       |        // char* materialName
  937|   105k|        String materialName = readString(stream);
  938|   105k|        if(listener)
  ------------------
  |  Branch (938:12): [True: 0, False: 105k]
  ------------------
  939|      0|            listener->processMaterialName(pMesh, &materialName);
  940|   105k|        if (auto material = MaterialManager::getSingleton().getByName(materialName, pMesh->getGroup()))
  ------------------
  |  Branch (940:18): [True: 0, False: 105k]
  ------------------
  941|      0|        {
  942|      0|            sm->setMaterial(material);
  943|      0|        }
  944|   105k|        else
  945|   105k|        {
  946|   105k|            logMaterialNotFound(materialName, pMesh->getGroup(), "SubMesh of", pMesh->getName(), LML_WARNING);
  947|   105k|        }
  948|       |
  949|       |        // bool useSharedVertices
  950|   105k|        readBools(stream,&sm->useSharedVertices, 1);
  951|       |
  952|   105k|        sm->indexData->indexStart = 0;
  953|   105k|        unsigned int indexCount = 0;
  954|   105k|        readInts(stream, &indexCount, 1);
  955|   105k|        sm->indexData->indexCount = indexCount;
  956|       |
  957|   105k|        HardwareIndexBufferSharedPtr ibuf;
  958|       |        // bool indexes32Bit
  959|   105k|        bool idx32bit;
  960|   105k|        readBools(stream, &idx32bit, 1);
  961|   105k|        if (indexCount > 0)
  ------------------
  |  Branch (961:13): [True: 95.2k, False: 10.3k]
  ------------------
  962|  95.2k|        {
  963|  95.2k|            if (!checkChunkRemainingSize(mCurrentstreamLen, indexCount, idx32bit ? sizeof(unsigned int) : sizeof(unsigned short)))
  ------------------
  |  Branch (963:17): [True: 88, False: 95.1k]
  |  Branch (963:73): [True: 4.69k, False: 90.5k]
  ------------------
  964|  95.2k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Index buffer size exceeds chunk size");
  965|  95.1k|            if (idx32bit)
  ------------------
  |  Branch (965:17): [True: 4.64k, False: 90.4k]
  ------------------
  966|  4.64k|            {
  967|  4.64k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  968|  4.64k|                        HardwareIndexBuffer::IT_32BIT,
  969|  4.64k|                        sm->indexData->indexCount,
  970|  4.64k|                        pMesh->mIndexBufferUsage,
  971|  4.64k|                        pMesh->mIndexBufferShadowBuffer);
  972|  4.64k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  973|  4.64k|                readInts(stream, static_cast<unsigned int*>(ibufLock.pData), sm->indexData->indexCount);
  974|       |
  975|  4.64k|            }
  976|  90.4k|            else // 16-bit
  977|  90.4k|            {
  978|  90.4k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  979|  90.4k|                        HardwareIndexBuffer::IT_16BIT,
  980|  90.4k|                        sm->indexData->indexCount,
  981|  90.4k|                        pMesh->mIndexBufferUsage,
  982|  90.4k|                        pMesh->mIndexBufferShadowBuffer);
  983|  90.4k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  984|  90.4k|                readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), sm->indexData->indexCount);
  985|  90.4k|            }
  986|  95.1k|        }
  987|   105k|        sm->indexData->indexBuffer = ibuf;
  988|       |
  989|   105k|        pushInnerChunk(stream);
  990|   105k|        {
  991|       |        // M_GEOMETRY stream (Optional: present only if useSharedVertices = false)
  992|   105k|        if (!sm->useSharedVertices)
  ------------------
  |  Branch (992:13): [True: 89.4k, False: 16.0k]
  ------------------
  993|  89.4k|        {
  994|  89.4k|            streamID = readChunk(stream);
  995|  89.4k|            if (streamID != M_GEOMETRY)
  ------------------
  |  Branch (995:17): [True: 38, False: 89.4k]
  ------------------
  996|     38|            {
  997|     38|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Missing geometry data in mesh file",
  998|     38|                    "MeshSerializerImpl::readSubMesh");
  999|     38|            }
 1000|  89.4k|            sm->createVertexData();
 1001|  89.4k|            readGeometry(stream, pMesh, sm->vertexData);
 1002|  89.4k|        }
 1003|       |
 1004|       |
 1005|       |        // Find all bone assignments, submesh operation, and texture aliases (if present)
 1006|   105k|        if (!stream->eof())
  ------------------
  |  Branch (1006:13): [True: 105k, False: 247]
  ------------------
 1007|   105k|        {
 1008|   105k|            streamID = readChunk(stream);
 1009|   105k|            bool seenTexAlias = false;
 1010|   108k|            while(!stream->eof() &&
  ------------------
  |  Branch (1010:19): [True: 108k, False: 116]
  ------------------
 1011|   108k|                (streamID == M_SUBMESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (1011:18): [True: 1.35k, False: 107k]
  ------------------
 1012|   107k|                 streamID == M_SUBMESH_OPERATION ||
  ------------------
  |  Branch (1012:18): [True: 194, False: 106k]
  ------------------
 1013|   106k|                 streamID == M_SUBMESH_TEXTURE_ALIAS))
  ------------------
  |  Branch (1013:18): [True: 1.85k, False: 105k]
  ------------------
 1014|  3.40k|            {
 1015|  3.40k|                switch(streamID)
  ------------------
  |  Branch (1015:24): [True: 3.40k, False: 0]
  ------------------
 1016|  3.40k|                {
 1017|    194|                case M_SUBMESH_OPERATION:
  ------------------
  |  Branch (1017:17): [True: 194, False: 3.21k]
  ------------------
 1018|    194|                    readSubMeshOperation(stream, pMesh, sm);
 1019|    194|                    break;
 1020|  1.35k|                case M_SUBMESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (1020:17): [True: 1.35k, False: 2.04k]
  ------------------
 1021|  1.35k|                    readSubMeshBoneAssignment(stream, pMesh, sm);
 1022|  1.35k|                    break;
 1023|  1.85k|                case M_SUBMESH_TEXTURE_ALIAS:
  ------------------
  |  Branch (1023:17): [True: 1.85k, False: 1.55k]
  ------------------
 1024|  1.85k|                    seenTexAlias = true;
 1025|  1.85k|                    String aliasName = readString(stream);
 1026|  1.85k|                    String textureName = readString(stream);
 1027|  1.85k|                    break;
 1028|  3.40k|                }
 1029|       |
 1030|  3.40k|                if (!stream->eof())
  ------------------
  |  Branch (1030:21): [True: 3.38k, False: 24]
  ------------------
 1031|  3.38k|                {
 1032|  3.38k|                    streamID = readChunk(stream);
 1033|  3.38k|                }
 1034|       |
 1035|  3.40k|            }
 1036|       |
 1037|   105k|            if (seenTexAlias)
  ------------------
  |  Branch (1037:17): [True: 1.32k, False: 103k]
  ------------------
 1038|  1.32k|                LogManager::getSingleton().logError("texture aliases for SubMeshes are unsupported - " +
 1039|  1.32k|                                                      stream->getName());
 1040|       |
 1041|   105k|            if (!stream->eof())
  ------------------
  |  Branch (1041:17): [True: 105k, False: 116]
  ------------------
 1042|   105k|            {
 1043|       |                // Backpedal back to start of stream
 1044|   105k|                    backpedalChunkHeader(stream);
 1045|   105k|                }
 1046|   105k|            }
 1047|   105k|        }
 1048|   105k|        popInnerChunk(stream);
 1049|       |
 1050|   105k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshOperationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1054|    194|    {
 1055|       |        // unsigned short operationType
 1056|    194|        unsigned short opType;
 1057|    194|        readShorts(stream, &opType, 1);
 1058|    194|        sm->operationType = static_cast<RenderOperation::OperationType>(opType);
 1059|    194|    }
_ZN4Ogre18MeshSerializerImpl16readSkeletonLinkERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 1070|  26.5k|    {
 1071|  26.5k|        String skelName = readString(stream);
 1072|       |
 1073|  26.5k|        if(listener)
  ------------------
  |  Branch (1073:12): [True: 0, False: 26.5k]
  ------------------
 1074|      0|            listener->processSkeletonName(pMesh, &skelName);
 1075|       |
 1076|  26.5k|        pMesh->setSkeletonName(skelName);
 1077|  26.5k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1120|  2.37k|    {
 1121|  2.37k|        VertexBoneAssignment assign;
 1122|       |
 1123|       |        // unsigned int vertexIndex;
 1124|  2.37k|        readInts(stream, &(assign.vertexIndex),1);
 1125|       |        // unsigned short boneIndex;
 1126|  2.37k|        readShorts(stream, &(assign.boneIndex),1);
 1127|       |        // float weight;
 1128|  2.37k|        readFloats(stream, &(assign.weight), 1);
 1129|       |
 1130|  2.37k|        pMesh->addBoneAssignment(assign);
 1131|       |
 1132|  2.37k|    }
_ZN4Ogre18MeshSerializerImpl25readSubMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1136|  1.35k|    {
 1137|  1.35k|        VertexBoneAssignment assign;
 1138|       |
 1139|       |        // unsigned int vertexIndex;
 1140|  1.35k|        readInts(stream, &(assign.vertexIndex),1);
 1141|       |        // unsigned short boneIndex;
 1142|  1.35k|        readShorts(stream, &(assign.boneIndex),1);
 1143|       |        // float weight;
 1144|  1.35k|        readFloats(stream, &(assign.weight), 1);
 1145|       |
 1146|  1.35k|        sub->addBoneAssignment(assign);
 1147|       |
 1148|  1.35k|    }
_ZN4Ogre18MeshSerializerImpl14readBoundsInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1342|  3.26k|    {
 1343|  3.26k|        Vector3 min, max;
 1344|  3.26k|        readFloats(stream, min.ptr(), 3);
 1345|  3.26k|        readFloats(stream, max.ptr(), 3);
 1346|  3.26k|        AxisAlignedBox box(min, max);
 1347|  3.26k|        pMesh->_setBounds(box, false);
 1348|       |
 1349|  3.26k|        float radius;
 1350|  3.26k|        readFloats(stream, &radius, 1);
 1351|  3.26k|        pMesh->_setBoundingSphereRadius(radius);
 1352|  3.26k|    }
_ZN4Ogre18MeshSerializerImpl16readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1362|  4.44k|    {
 1363|       |#if OGRE_NO_MESHLOD
 1364|       |
 1365|       |        /*
 1366|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 1367|       |        // We need to walk through the data to not rely on the chunk size!
 1368|       |        stream->skip(mCurrentstreamLen);
 1369|       |
 1370|       |        // Since we got here, we have already read the chunk header.
 1371|       |        backpedalChunkHeader(stream);
 1372|       |        */
 1373|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 1374|       |        String strategyName = readString(stream);
 1375|       |        uint16 numLods;
 1376|       |        readShorts(stream, &numLods, 1);
 1377|       |        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 1378|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 1379|       |        pushInnerChunk(stream);
 1380|       |        for (int lodID = 1; lodID < numLods; lodID++){
 1381|       |            unsigned short streamID = readChunk(stream);
 1382|       |            Real usageValue;
 1383|       |            readFloats(stream, &usageValue, 1);
 1384|       |            switch (streamID){
 1385|       |            case M_MESH_LOD_MANUAL:
 1386|       |            {
 1387|       |                                      String manualName = readString(stream);
 1388|       |                                      break;
 1389|       |            }
 1390|       |            case M_MESH_LOD_GENERATED:
 1391|       |                for (int i = 0; i < numSubs; ++i)
 1392|       |                {
 1393|       |                    unsigned int numIndexes;
 1394|       |                    readInts(stream, &numIndexes, 1);
 1395|       |
 1396|       |                    unsigned int offset;
 1397|       |                    readInts(stream, &offset, 1);
 1398|       |
 1399|       |                    // For merged buffers, you can pass the index of previous Lod.
 1400|       |                    // To create buffer it should be -1.
 1401|       |                    unsigned int bufferIndex;
 1402|       |                    readInts(stream, &bufferIndex, 1);
 1403|       |                    if (bufferIndex == (unsigned int)-1) {
 1404|       |                        // generate buffers
 1405|       |
 1406|       |                        // bool indexes32Bit
 1407|       |                        bool idx32Bit;
 1408|       |                        readBools(stream, &idx32Bit, 1);
 1409|       |
 1410|       |                        unsigned int buffIndexCount;
 1411|       |                        readInts(stream, &buffIndexCount, 1);
 1412|       |
 1413|       |                        size_t buffSize = buffIndexCount * (idx32Bit ? 4 : 2);
 1414|       |                        stream->skip(buffSize);
 1415|       |                    }
 1416|       |                }
 1417|       |                break;
 1418|       |            default:
 1419|       |                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1420|       |                    "Invalid Lod Usage type in " + pMesh->getName(),
 1421|       |                    "MeshSerializerImpl::readMeshLodInfo");
 1422|       |            }
 1423|       |        }
 1424|       |        popInnerChunk(stream);
 1425|       |#else
 1426|       |        // Read the strategy to be used for this mesh
 1427|  4.44k|        String strategyName = readString(stream);
 1428|  4.44k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 1429|       |
 1430|       |        // Check that valid strategy name was given, otherwise use default
 1431|  4.44k|        if (strategy == 0)
  ------------------
  |  Branch (1431:13): [True: 3.87k, False: 566]
  ------------------
 1432|  3.87k|            strategy = LodStrategyManager::getSingleton().getDefaultStrategy();
 1433|       |
 1434|  4.44k|        pMesh->setLodStrategy(strategy);
 1435|       |
 1436|       |        // unsigned short numLevels;
 1437|  4.44k|        uint16 numLods;
 1438|  4.44k|        readShorts(stream, &numLods, 1);
 1439|  4.44k|        numLods = std::max<ushort>(numLods, 1);
 1440|       |
 1441|  4.44k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (1441:13): [True: 63, False: 4.38k]
  ------------------
 1442|  4.44k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 1443|       |
 1444|  4.38k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (1444:12): [True: 3, False: 4.37k]
  ------------------
 1445|  4.38k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 1446|       |
 1447|  4.37k|        pMesh->_setLodInfo(numLods);
 1448|  4.37k|        pushInnerChunk(stream);
 1449|       |        // lodID=0 is the original mesh. We need to skip it.
 1450|  4.73k|        for(int lodID = 1; lodID < pMesh->getNumLodLevels(); lodID++){
  ------------------
  |  Branch (1450:28): [True: 594, False: 4.13k]
  ------------------
 1451|       |            // Read depth
 1452|    594|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[lodID];
 1453|    594|            unsigned short streamID = readChunk(stream);
 1454|    594|            readFloats(stream, &(usage.userValue), 1);
 1455|    594|            switch(streamID){
 1456|    290|            case M_MESH_LOD_MANUAL:
  ------------------
  |  Branch (1456:13): [True: 290, False: 304]
  ------------------
 1457|    290|                readMeshLodUsageManual(stream, pMesh, lodID, usage);
 1458|    290|                break;
 1459|    173|            case M_MESH_LOD_GENERATED:
  ------------------
  |  Branch (1459:13): [True: 173, False: 421]
  ------------------
 1460|    173|                readMeshLodUsageGenerated(stream, pMesh, lodID, usage);
 1461|    173|                break;
 1462|     76|            default:
  ------------------
  |  Branch (1462:13): [True: 76, False: 518]
  ------------------
 1463|     76|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1464|    594|                "Invalid Lod Usage type in " + pMesh->getName(),
 1465|    594|                    "MeshSerializerImpl::readMeshLodInfo");
 1466|    594|            }
 1467|    354|            usage.manualMesh.reset(); // will trigger load later with manual Lod
 1468|    354|            usage.edgeData = NULL;
 1469|    354|        }
 1470|  4.13k|        popInnerChunk(stream);
 1471|  4.13k|#endif
 1472|  4.13k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1476|    290|    {
 1477|    290|        pMesh->mHasManualLodLevel = true;
 1478|    290|        usage.manualName = readString(stream);
 1479|       |        
 1480|       |        // Generate for mixed
 1481|    290|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1481:22): [True: 1.51k, False: 290]
  ------------------
 1482|  1.51k|        {
 1483|       |            s->mLodFaceList[lodNum-1] = OGRE_NEW IndexData();
 1484|  1.51k|        }
 1485|    290|    }
_ZN4Ogre18MeshSerializerImpl25readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1488|    173|    {
 1489|    173|        usage.manualName = "";
 1490|       |
 1491|       |        // Get one set of detail per SubMesh
 1492|    173|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1492:22): [True: 3.15k, False: 64]
  ------------------
 1493|  3.15k|        {
 1494|  3.15k|            s->mLodFaceList[lodNum - 1] = OGRE_NEW IndexData();
 1495|  3.15k|            IndexData* indexData = s->mLodFaceList[lodNum - 1];
 1496|       |
 1497|  3.15k|            unsigned int numIndexes;
 1498|  3.15k|            readInts(stream, &numIndexes, 1);
 1499|  3.15k|            indexData->indexCount = static_cast<size_t>(numIndexes);
 1500|       |
 1501|  3.15k|            unsigned int offset;
 1502|  3.15k|            readInts(stream, &offset, 1);
 1503|  3.15k|            indexData->indexStart = static_cast<size_t>(offset);
 1504|       |
 1505|       |            // For merged buffers, you can pass the index of previous Lod.
 1506|       |            // To create buffer it should be -1.
 1507|  3.15k|            unsigned int bufferIndex;
 1508|  3.15k|            readInts(stream, &bufferIndex, 1);
 1509|  3.15k|            if(bufferIndex != (unsigned int)-1) {
  ------------------
  |  Branch (1509:16): [True: 69, False: 3.08k]
  ------------------
 1510|     69|                if (bufferIndex - 1 >= (unsigned int)lodNum - 1)
  ------------------
  |  Branch (1510:21): [True: 62, False: 7]
  ------------------
 1511|     69|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid LOD buffer index in mesh LOD data");
 1512|       |                // copy buffer pointer
 1513|      7|                indexData->indexBuffer = s->mLodFaceList.at(bufferIndex - 1)->indexBuffer;
 1514|      7|                if (!indexData->indexBuffer)
  ------------------
  |  Branch (1514:21): [True: 2, False: 5]
  ------------------
 1515|      7|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Referenced LOD index buffer is null");
 1516|  3.08k|            } else {
 1517|       |                // generate buffers
 1518|       |
 1519|       |                // bool indexes32Bit
 1520|  3.08k|                bool idx32Bit;
 1521|  3.08k|                readBools(stream, &idx32Bit, 1);
 1522|       |                
 1523|  3.08k|                unsigned int buffIndexCount;
 1524|  3.08k|                readInts(stream, &buffIndexCount, 1);
 1525|       |
 1526|  3.08k|                if (!checkChunkRemainingSize(mCurrentstreamLen, buffIndexCount, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (1526:21): [True: 45, False: 3.04k]
  |  Branch (1526:81): [True: 2.37k, False: 711]
  ------------------
 1527|  3.08k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 1528|       |
 1529|  3.04k|                indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 1530|  3.04k|                    idx32Bit ? HardwareIndexBuffer::IT_32BIT : HardwareIndexBuffer::IT_16BIT,
  ------------------
  |  Branch (1530:21): [True: 2.33k, False: 710]
  ------------------
 1531|  3.04k|                    buffIndexCount, pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 1532|  3.04k|                HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 1533|       |
 1534|  3.04k|                if (idx32Bit)
  ------------------
  |  Branch (1534:21): [True: 2.33k, False: 710]
  ------------------
 1535|  2.33k|                {
 1536|  2.33k|                    readInts(stream, (uint32*)ibufLock.pData, buffIndexCount);
 1537|  2.33k|                }
 1538|    710|                else
 1539|    710|                {
 1540|    710|                    readShorts(stream, (uint16*)ibufLock.pData, buffIndexCount);
 1541|    710|                }
 1542|  3.04k|            }
 1543|  3.15k|        }
 1544|    173|    }
_ZN4Ogre18MeshSerializerImpl20flipFromLittleEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1549|  7.95k|    {
 1550|  7.95k|        if (mFlipEndian)
  ------------------
  |  Branch (1550:13): [True: 7.95k, False: 0]
  ------------------
 1551|  7.95k|        {
 1552|  7.95k|            flipEndian(pData, vertexCount, vertexSize, elems);
 1553|  7.95k|        }
 1554|  7.95k|    }
_ZN4Ogre18MeshSerializerImpl10flipEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1567|  7.95k|    {
 1568|  7.95k|        void *pBase = pData;
 1569|  26.9k|        for (size_t v = 0; v < vertexCount; ++v)
  ------------------
  |  Branch (1569:28): [True: 18.9k, False: 7.95k]
  ------------------
 1570|  18.9k|        {
 1571|  18.9k|            for (auto& e : elems)
  ------------------
  |  Branch (1571:26): [True: 33.8k, False: 18.9k]
  ------------------
 1572|  33.8k|            {
 1573|  33.8k|                void *pElem;
 1574|       |                // re-base pointer to the element
 1575|  33.8k|                e.baseVertexPointerToElement(pBase, &pElem);
 1576|       |                // Flip the endian based on the type
 1577|  33.8k|                size_t typeSize = 0;
 1578|  33.8k|                switch (VertexElement::getBaseType(e.getType()))
 1579|  33.8k|                {
 1580|  1.90k|                    case VET_FLOAT1:
  ------------------
  |  Branch (1580:21): [True: 1.90k, False: 31.9k]
  ------------------
 1581|  1.90k|                        typeSize = sizeof(float);
 1582|  1.90k|                        break;
 1583|    855|                    case VET_DOUBLE1:
  ------------------
  |  Branch (1583:21): [True: 855, False: 33.0k]
  ------------------
 1584|    855|                        typeSize = sizeof(double);
 1585|    855|                        break;
 1586|    697|                    case VET_SHORT1:
  ------------------
  |  Branch (1586:21): [True: 697, False: 33.1k]
  ------------------
 1587|    697|                        typeSize = sizeof(short);
 1588|    697|                        break;
 1589|    765|                    case VET_USHORT1:
  ------------------
  |  Branch (1589:21): [True: 765, False: 33.1k]
  ------------------
 1590|    765|                        typeSize = sizeof(unsigned short);
 1591|    765|                        break;
 1592|    307|                    case VET_INT1:
  ------------------
  |  Branch (1592:21): [True: 307, False: 33.5k]
  ------------------
 1593|    307|                        typeSize = sizeof(int);
 1594|    307|                        break;
 1595|    572|                    case VET_UINT1:
  ------------------
  |  Branch (1595:21): [True: 572, False: 33.3k]
  ------------------
 1596|    572|                        typeSize = sizeof(unsigned int);
 1597|    572|                        break;
 1598|  8.26k|                    case VET_UBYTE4_NORM:
  ------------------
  |  Branch (1598:21): [True: 8.26k, False: 25.6k]
  ------------------
 1599|  8.32k|                    case VET_UBYTE4:
  ------------------
  |  Branch (1599:21): [True: 57, False: 33.8k]
  ------------------
 1600|  8.32k|                        typeSize = 0; // NO FLIPPING
 1601|  8.32k|                        break;
 1602|  20.4k|                    default:
  ------------------
  |  Branch (1602:21): [True: 20.4k, False: 13.4k]
  ------------------
 1603|  20.4k|                        assert(false); // Should never happen
 1604|  33.8k|                };
 1605|  33.8k|				Bitwise::bswapChunks(pElem, typeSize,
 1606|  33.8k|                    VertexElement::getTypeCount(e.getType()));
 1607|  33.8k|            }
 1608|       |
 1609|  18.9k|            pBase = static_cast<void*>(
 1610|  18.9k|                static_cast<unsigned char*>(pBase) + vertexSize);
 1611|  18.9k|        }
 1612|  7.95k|    }
_ZN4Ogre18MeshSerializerImpl12readEdgeListERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1797|    905|    {
 1798|    905|        pMesh->mEdgeListsBuilt = true; // set this early, so any partial data is freed
 1799|       |
 1800|    905|        if (!stream->eof())
  ------------------
  |  Branch (1800:13): [True: 905, False: 0]
  ------------------
 1801|    905|        {
 1802|    905|            pushInnerChunk(stream);
 1803|    905|            unsigned short streamID = readChunk(stream);
 1804|  1.71k|            while(!stream->eof() &&
  ------------------
  |  Branch (1804:19): [True: 1.44k, False: 261]
  ------------------
 1805|  1.44k|                streamID == M_EDGE_LIST_LOD)
  ------------------
  |  Branch (1805:17): [True: 816, False: 633]
  ------------------
 1806|    816|            {
 1807|       |                // Process single LOD
 1808|       |
 1809|       |                // unsigned short lodIndex
 1810|    816|                unsigned short lodIndex;
 1811|    816|                readShorts(stream, &lodIndex, 1);
 1812|       |
 1813|       |                // bool isManual            // If manual, no edge data here, loaded from manual mesh
 1814|    816|                bool isManual;
 1815|    816|                readBools(stream, &isManual, 1);
 1816|       |                // Only load in non-manual levels; others will be connected up by Mesh on demand
 1817|       |#if OGRE_NO_MESHLOD
 1818|       |                // 
 1819|       |                if (!isManual)
 1820|       |                    if (lodIndex != 0) {
 1821|       |                        readEdgeListLodInfo(stream, NULL);
 1822|       |                    } else {
 1823|       |#else
 1824|    816|                if (!isManual) {
  ------------------
  |  Branch (1824:21): [True: 249, False: 567]
  ------------------
 1825|    249|#endif
 1826|    249|                    MeshLodUsage& usage = pMesh->mMeshLodUsageList.at(lodIndex);
 1827|    249|                    if(!usage.manualName.empty())
  ------------------
  |  Branch (1827:24): [True: 9, False: 240]
  ------------------
 1828|    249|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD is marked as non-manual, but has a manual mesh name");
 1829|       |
 1830|    240|                    if (usage.edgeData)
  ------------------
  |  Branch (1830:25): [True: 2, False: 238]
  ------------------
 1831|    240|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate edge data for LOD");
 1832|       |
 1833|    238|                    auto edgeData = std::make_unique<EdgeData>(); // in case of exception, will be deleted automatically
 1834|       |
 1835|       |                    // Read detail information of the edge list
 1836|    238|                    readEdgeListLodInfo(stream, edgeData.get());
 1837|       |
 1838|       |                    // Postprocessing edge groups
 1839|    238|                    for (auto& edgeGroup : edgeData->edgeGroups)
  ------------------
  |  Branch (1839:42): [True: 133, False: 238]
  ------------------
 1840|    133|                    {
 1841|       |                        // Populate edgeGroup.vertexData pointers
 1842|       |                        // If there is shared vertex data, vertexSet 0 is that,
 1843|       |                        // otherwise 0 is first dedicated
 1844|    133|                        if (pMesh->sharedVertexData)
  ------------------
  |  Branch (1844:29): [True: 98, False: 35]
  ------------------
 1845|     98|                        {
 1846|     98|                            if (edgeGroup.vertexSet == 0)
  ------------------
  |  Branch (1846:33): [True: 47, False: 51]
  ------------------
 1847|     47|                            {
 1848|     47|                                edgeGroup.vertexData = pMesh->sharedVertexData;
 1849|     47|                            }
 1850|     51|                            else
 1851|     51|                            {
 1852|     51|                                edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet - 1)->vertexData;
 1853|     51|                            }
 1854|     98|                        }
 1855|     35|                        else
 1856|     35|                        {
 1857|     35|                            edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet)->vertexData;
 1858|     35|                        }
 1859|    133|                    }
 1860|       |
 1861|    238|                    usage.edgeData = edgeData.release();
 1862|    238|                }
 1863|       |
 1864|    805|                if (!stream->eof())
  ------------------
  |  Branch (1864:21): [True: 582, False: 223]
  ------------------
 1865|    582|                {
 1866|    582|                    streamID = readChunk(stream);
 1867|    582|                }
 1868|       |
 1869|    805|            }
 1870|    894|            if (!stream->eof())
  ------------------
  |  Branch (1870:17): [True: 633, False: 261]
  ------------------
 1871|    633|            {
 1872|       |                // Backpedal back to start of stream
 1873|    633|                backpedalChunkHeader(stream);
 1874|    633|            }
 1875|    894|            popInnerChunk(stream);
 1876|    894|        }
 1877|    905|    }
_ZN4Ogre18MeshSerializerImpl19readEdgeListLodInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_8EdgeDataE:
 1881|    231|    {
 1882|       |#if OGRE_NO_MESHLOD
 1883|       |        if (edgeData == NULL) { // skip it!
 1884|       |            bool isClosed;
 1885|       |            readBools(stream, &isClosed, 1);
 1886|       |            // unsigned long numTriangles
 1887|       |            uint32 numTriangles;
 1888|       |            readInts(stream, &numTriangles, 1);
 1889|       |            // unsigned long numEdgeGroups
 1890|       |            uint32 numEdgeGroups;
 1891|       |            readInts(stream, &numEdgeGroups, 1);
 1892|       |            stream->skip(numTriangles * (8 * sizeof(uint32) + 4 * sizeof(float)));
 1893|       |            pushInnerChunk(stream);
 1894|       |            for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
 1895|       |            {
 1896|       |                unsigned short streamID = readChunk(stream);
 1897|       |                if (streamID != M_EDGE_GROUP)
 1898|       |                {
 1899|       |                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1900|       |                        "Missing M_EDGE_GROUP stream",
 1901|       |                        "MeshSerializerImpl::readEdgeListLodInfo");
 1902|       |                }
 1903|       |                uint32 tmp[3];
 1904|       |                // unsigned long vertexSet
 1905|       |                readInts(stream, &tmp[0], 3);
 1906|       |                uint32 numEdges;
 1907|       |                readInts(stream, &numEdges, 1);
 1908|       |
 1909|       |                stream->skip(numEdges * (6 * sizeof(uint32) + sizeof(bool)));
 1910|       |            }
 1911|       |            popInnerChunk(stream);
 1912|       |            return;
 1913|       |        }
 1914|       |#endif
 1915|       |        // bool isClosed
 1916|    231|        readBools(stream, &edgeData->isClosed, 1);
 1917|       |        // unsigned long numTriangles
 1918|    231|        uint32 numTriangles;
 1919|    231|        readInts(stream, &numTriangles, 1);
 1920|    231|        if(!checkChunkRemainingSize(mCurrentstreamLen, numTriangles, sizeof(EdgeData::Triangle) + sizeof(Vector4f)))
  ------------------
  |  Branch (1920:12): [True: 51, False: 180]
  ------------------
 1921|    231|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list triangle data exceeds chunk size");
 1922|       |
 1923|       |        // Allocate correct amount of memory
 1924|    180|        edgeData->triangles.resize(numTriangles);
 1925|    180|        edgeData->triangleFaceNormals.resize(numTriangles);
 1926|    180|        edgeData->triangleLightFacings.resize(numTriangles);
 1927|       |        // unsigned long numEdgeGroups
 1928|    180|        uint32 numEdgeGroups;
 1929|    180|        readInts(stream, &numEdgeGroups, 1);
 1930|    180|        if(!checkChunkRemainingSize(mCurrentstreamLen, numEdgeGroups, sizeof(uint32) * 4))
  ------------------
  |  Branch (1930:12): [True: 42, False: 138]
  ------------------
 1931|    180|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list group data exceeds chunk size");
 1932|       |
 1933|       |        // Allocate correct amount of memory
 1934|    138|        edgeData->edgeGroups.resize(numEdgeGroups);
 1935|       |        // Triangle* triangleList
 1936|    138|        uint32 tmp[3];
 1937|  1.68k|        for (size_t t = 0; t < numTriangles; ++t)
  ------------------
  |  Branch (1937:28): [True: 1.54k, False: 138]
  ------------------
 1938|  1.54k|        {
 1939|  1.54k|            EdgeData::Triangle& tri = edgeData->triangles[t];
 1940|       |            // unsigned long indexSet
 1941|  1.54k|            readInts(stream, tmp, 1);
 1942|  1.54k|            tri.indexSet = tmp[0];
 1943|       |            // unsigned long vertexSet
 1944|  1.54k|            readInts(stream, tmp, 1);
 1945|  1.54k|            tri.vertexSet = tmp[0];
 1946|       |            // unsigned long vertIndex[3]
 1947|  1.54k|            readInts(stream, tmp, 3);
 1948|       |
 1949|  1.54k|            tri.vertIndex[0] = tmp[0];
 1950|  1.54k|            tri.vertIndex[1] = tmp[1];
 1951|  1.54k|            tri.vertIndex[2] = tmp[2];
 1952|       |            // unsigned long sharedVertIndex[3]
 1953|  1.54k|            readInts(stream, tmp, 3);
 1954|  1.54k|            tri.sharedVertIndex[0] = tmp[0];
 1955|  1.54k|            tri.sharedVertIndex[1] = tmp[1];
 1956|  1.54k|            tri.sharedVertIndex[2] = tmp[2];
 1957|       |            // float normal[4]
 1958|  1.54k|            readFloats(stream, &(edgeData->triangleFaceNormals[t].x), 4);
 1959|       |
 1960|  1.54k|        }
 1961|    138|        pushInnerChunk(stream);
 1962|    365|        for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
  ------------------
  |  Branch (1962:29): [True: 281, False: 84]
  ------------------
 1963|    281|        {
 1964|    281|            unsigned short streamID = readChunk(stream);
 1965|    281|            if (streamID != M_EDGE_GROUP)
  ------------------
  |  Branch (1965:17): [True: 18, False: 263]
  ------------------
 1966|     18|            {
 1967|     18|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1968|     18|                    "Missing M_EDGE_GROUP stream",
 1969|     18|                    "MeshSerializerImpl::readEdgeListLodInfo");
 1970|     18|            }
 1971|    263|            EdgeData::EdgeGroup& edgeGroup = edgeData->edgeGroups[eg];
 1972|       |
 1973|       |            // unsigned long vertexSet
 1974|    263|            readInts(stream, tmp, 1);
 1975|    263|            edgeGroup.vertexSet = tmp[0];
 1976|       |            // unsigned long triStart
 1977|    263|            readInts(stream, tmp, 1);
 1978|    263|            edgeGroup.triStart = tmp[0];
 1979|       |            // unsigned long triCount
 1980|    263|            readInts(stream, tmp, 1);
 1981|    263|            edgeGroup.triCount = tmp[0];
 1982|       |            // unsigned long numEdges
 1983|    263|            uint32 numEdges;
 1984|    263|            readInts(stream, &numEdges, 1);
 1985|    263|            if(!checkChunkRemainingSize(mCurrentstreamLen, numEdges, sizeof(uint32) * 6 + sizeof(bool)))
  ------------------
  |  Branch (1985:16): [True: 36, False: 227]
  ------------------
 1986|    263|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list edge data exceeds chunk size");
 1987|       |
 1988|    227|            edgeGroup.edges.resize(numEdges);
 1989|       |            // Edge* edgeList
 1990|  1.34k|            for (uint32 e = 0; e < numEdges; ++e)
  ------------------
  |  Branch (1990:32): [True: 1.11k, False: 227]
  ------------------
 1991|  1.11k|            {
 1992|  1.11k|                EdgeData::Edge& edge = edgeGroup.edges[e];
 1993|       |                // unsigned long  triIndex[2]
 1994|  1.11k|                readInts(stream, tmp, 2);
 1995|  1.11k|                edge.triIndex[0] = tmp[0];
 1996|  1.11k|                edge.triIndex[1] = tmp[1];
 1997|       |                // unsigned long  vertIndex[2]
 1998|  1.11k|                readInts(stream, tmp, 2);
 1999|  1.11k|                edge.vertIndex[0] = tmp[0];
 2000|  1.11k|                edge.vertIndex[1] = tmp[1];
 2001|       |                // unsigned long  sharedVertIndex[2]
 2002|  1.11k|                readInts(stream, tmp, 2);
 2003|  1.11k|                edge.sharedVertIndex[0] = tmp[0];
 2004|  1.11k|                edge.sharedVertIndex[1] = tmp[1];
 2005|       |                // bool degenerate
 2006|  1.11k|                readBools(stream, &(edge.degenerate), 1);
 2007|  1.11k|            }
 2008|    227|        }
 2009|     84|        popInnerChunk(stream);
 2010|     84|    }
_ZN4Ogre18MeshSerializerImpl9readPosesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2325|  1.51k|    {
 2326|       |        // Find all substreams
 2327|  1.51k|        if (!stream->eof())
  ------------------
  |  Branch (2327:13): [True: 1.51k, False: 0]
  ------------------
 2328|  1.51k|        {
 2329|  1.51k|            pushInnerChunk(stream);
 2330|  1.51k|            unsigned short streamID = readChunk(stream);
 2331|  35.0k|            while(!stream->eof() &&
  ------------------
  |  Branch (2331:19): [True: 34.8k, False: 139]
  ------------------
 2332|  34.8k|                (streamID == M_POSE))
  ------------------
  |  Branch (2332:17): [True: 33.5k, False: 1.27k]
  ------------------
 2333|  33.5k|            {
 2334|  33.5k|                switch(streamID)
  ------------------
  |  Branch (2334:24): [True: 33.5k, False: 0]
  ------------------
 2335|  33.5k|                {
 2336|  33.5k|                case M_POSE:
  ------------------
  |  Branch (2336:17): [True: 33.5k, False: 0]
  ------------------
 2337|  33.5k|                    readPose(stream, pMesh);
 2338|  33.5k|                    break;
 2339|       |
 2340|  33.5k|                }
 2341|       |
 2342|  33.5k|                if (!stream->eof())
  ------------------
  |  Branch (2342:21): [True: 33.3k, False: 120]
  ------------------
 2343|  33.3k|                {
 2344|  33.3k|                    streamID = readChunk(stream);
 2345|  33.3k|                }
 2346|       |
 2347|  33.5k|            }
 2348|  1.41k|            if (!stream->eof())
  ------------------
  |  Branch (2348:17): [True: 1.27k, False: 139]
  ------------------
 2349|  1.27k|            {
 2350|       |                // Backpedal back to start of stream
 2351|  1.27k|                backpedalChunkHeader(stream);
 2352|  1.27k|            }
 2353|  1.41k|            popInnerChunk(stream);
 2354|  1.41k|        }
 2355|  1.51k|    }
_ZN4Ogre18MeshSerializerImpl8readPoseERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2358|  33.5k|    {
 2359|       |        // char* name (may be blank)
 2360|  33.5k|        String name = readString(stream);
 2361|       |        // unsigned short target
 2362|  33.5k|        unsigned short target;
 2363|  33.5k|        readShorts(stream, &target, 1);
 2364|       |
 2365|       |        // bool includesNormals
 2366|  33.5k|        bool includesNormals;
 2367|  33.5k|        readBools(stream, &includesNormals, 1);
 2368|       |        
 2369|  33.5k|        Pose* pose = pMesh->createPose(target, name);
 2370|       |
 2371|       |        // Find all substreams
 2372|  33.5k|        if (!stream->eof())
  ------------------
  |  Branch (2372:13): [True: 33.5k, False: 21]
  ------------------
 2373|  33.5k|        {
 2374|  33.5k|            pushInnerChunk(stream);
 2375|  33.5k|            unsigned short streamID = readChunk(stream);
 2376|  38.8k|            while(!stream->eof() &&
  ------------------
  |  Branch (2376:19): [True: 38.6k, False: 191]
  ------------------
 2377|  38.6k|                (streamID == M_POSE_VERTEX))
  ------------------
  |  Branch (2377:17): [True: 5.26k, False: 33.3k]
  ------------------
 2378|  5.26k|            {
 2379|  5.26k|                switch(streamID)
  ------------------
  |  Branch (2379:24): [True: 5.26k, False: 0]
  ------------------
 2380|  5.26k|                {
 2381|  5.26k|                case M_POSE_VERTEX:
  ------------------
  |  Branch (2381:17): [True: 5.26k, False: 0]
  ------------------
 2382|       |                    // create vertex offset
 2383|  5.26k|                    uint32 vertIndex;
 2384|  5.26k|                    Vector3f offset, normal;
 2385|       |                    // unsigned long vertexIndex
 2386|  5.26k|                    readInts(stream, &vertIndex, 1);
 2387|       |                    // float xoffset, yoffset, zoffset
 2388|  5.26k|                    readFloats(stream, offset.ptr(), 3);
 2389|       |                    
 2390|  5.26k|                    if (includesNormals)
  ------------------
  |  Branch (2390:25): [True: 2.97k, False: 2.29k]
  ------------------
 2391|  2.97k|                    {
 2392|  2.97k|                        readFloats(stream, normal.ptr(), 3);
 2393|  2.97k|                        pose->addVertex(vertIndex, offset, normal);                     
 2394|  2.97k|                    }
 2395|  2.29k|                    else 
 2396|  2.29k|                    {
 2397|  2.29k|                        pose->addVertex(vertIndex, offset);
 2398|  2.29k|                    }
 2399|       |
 2400|       |
 2401|  5.26k|                    break;
 2402|       |
 2403|  5.26k|                }
 2404|       |
 2405|  5.26k|                if (!stream->eof())
  ------------------
  |  Branch (2405:21): [True: 5.20k, False: 60]
  ------------------
 2406|  5.20k|                {
 2407|  5.20k|                    streamID = readChunk(stream);
 2408|  5.20k|                }
 2409|       |
 2410|  5.26k|            }
 2411|  33.5k|            if (!stream->eof())
  ------------------
  |  Branch (2411:17): [True: 33.3k, False: 191]
  ------------------
 2412|  33.3k|            {
 2413|       |                // Backpedal back to start of stream
 2414|  33.3k|                backpedalChunkHeader(stream);
 2415|  33.3k|            }
 2416|  33.5k|            popInnerChunk(stream);
 2417|  33.5k|        }
 2418|  33.5k|    }
_ZN4Ogre18MeshSerializerImpl14readAnimationsERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2421|  4.17k|    {
 2422|       |        // Find all substreams
 2423|  4.17k|        if (!stream->eof())
  ------------------
  |  Branch (2423:13): [True: 4.17k, False: 0]
  ------------------
 2424|  4.17k|        {
 2425|  4.17k|            pushInnerChunk(stream);
 2426|  4.17k|            unsigned short streamID = readChunk(stream);
 2427|  5.30k|            while(!stream->eof() &&
  ------------------
  |  Branch (2427:19): [True: 5.22k, False: 78]
  ------------------
 2428|  5.22k|                (streamID == M_ANIMATION))
  ------------------
  |  Branch (2428:17): [True: 1.27k, False: 3.95k]
  ------------------
 2429|  1.27k|            {
 2430|  1.27k|                switch(streamID)
  ------------------
  |  Branch (2430:24): [True: 1.27k, False: 0]
  ------------------
 2431|  1.27k|                {
 2432|  1.27k|                case M_ANIMATION:
  ------------------
  |  Branch (2432:17): [True: 1.27k, False: 0]
  ------------------
 2433|  1.27k|                    readAnimation(stream, pMesh);
 2434|  1.27k|                    break;
 2435|       |
 2436|  1.27k|                }
 2437|       |
 2438|  1.13k|                if (!stream->eof())
  ------------------
  |  Branch (2438:21): [True: 1.06k, False: 69]
  ------------------
 2439|  1.06k|                {
 2440|  1.06k|                    streamID = readChunk(stream);
 2441|  1.06k|                }
 2442|       |
 2443|  1.13k|            }
 2444|  4.03k|            if (!stream->eof())
  ------------------
  |  Branch (2444:17): [True: 3.95k, False: 78]
  ------------------
 2445|  3.95k|            {
 2446|       |                // Backpedal back to start of stream
 2447|  3.95k|                backpedalChunkHeader(stream);
 2448|  3.95k|            }
 2449|  4.03k|            popInnerChunk(stream);
 2450|  4.03k|        }
 2451|  4.17k|    }
_ZN4Ogre18MeshSerializerImpl13readAnimationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2454|  1.27k|    {
 2455|       |        // char* name
 2456|  1.27k|        String name = readString(stream);
 2457|       |        // float length
 2458|  1.27k|        float len;
 2459|  1.27k|        readFloats(stream, &len, 1);
 2460|       |
 2461|  1.27k|        Animation* anim = pMesh->createAnimation(name, len);
 2462|       |
 2463|       |        // tracks
 2464|  1.27k|        if (!stream->eof())
  ------------------
  |  Branch (2464:13): [True: 1.24k, False: 32]
  ------------------
 2465|  1.24k|        {
 2466|  1.24k|            pushInnerChunk(stream);
 2467|  1.24k|            unsigned short streamID = readChunk(stream);
 2468|       |            
 2469|       |            // Optional base info is possible
 2470|  1.24k|            if (streamID == M_ANIMATION_BASEINFO)
  ------------------
  |  Branch (2470:17): [True: 169, False: 1.07k]
  ------------------
 2471|    169|            {
 2472|       |                // char baseAnimationName
 2473|    169|                String baseAnimName = readString(stream);
 2474|       |                // float baseKeyFrameTime
 2475|    169|                float baseKeyTime;
 2476|    169|                readFloats(stream, &baseKeyTime, 1);
 2477|       |                
 2478|    169|                anim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
 2479|       |                
 2480|    169|                if (!stream->eof())
  ------------------
  |  Branch (2480:21): [True: 163, False: 6]
  ------------------
 2481|    163|                {
 2482|       |                    // Get next stream
 2483|    163|                    streamID = readChunk(stream);
 2484|    163|                }
 2485|    169|            }
 2486|       |            
 2487|  1.59k|            while(!stream->eof() &&
  ------------------
  |  Branch (2487:19): [True: 1.53k, False: 62]
  ------------------
 2488|  1.53k|                streamID == M_ANIMATION_TRACK)
  ------------------
  |  Branch (2488:17): [True: 468, False: 1.06k]
  ------------------
 2489|    468|            {
 2490|    468|                switch(streamID)
  ------------------
  |  Branch (2490:24): [True: 468, False: 0]
  ------------------
 2491|    468|                {
 2492|    468|                case M_ANIMATION_TRACK:
  ------------------
  |  Branch (2492:17): [True: 468, False: 0]
  ------------------
 2493|    468|                    readAnimationTrack(stream, anim, pMesh);
 2494|    468|                    break;
 2495|    468|                };
 2496|    351|                if (!stream->eof())
  ------------------
  |  Branch (2496:21): [True: 330, False: 21]
  ------------------
 2497|    330|                {
 2498|    330|                    streamID = readChunk(stream);
 2499|    330|                }
 2500|       |
 2501|    351|            }
 2502|  1.12k|            if (!stream->eof())
  ------------------
  |  Branch (2502:17): [True: 1.06k, False: 62]
  ------------------
 2503|  1.06k|            {
 2504|       |                // Backpedal back to start of stream
 2505|  1.06k|                backpedalChunkHeader(stream);
 2506|  1.06k|            }
 2507|  1.12k|            popInnerChunk(stream);
 2508|  1.12k|        }
 2509|  1.27k|    }
_ZN4Ogre18MeshSerializerImpl18readAnimationTrackERKNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_4MeshE:
 2513|    468|    {
 2514|       |        // ushort type
 2515|    468|        uint16 inAnimType;
 2516|    468|        readShorts(stream, &inAnimType, 1);
 2517|    468|        VertexAnimationType animType = (VertexAnimationType)inAnimType;
 2518|       |
 2519|       |        // unsigned short target
 2520|    468|        uint16 target;
 2521|    468|        readShorts(stream, &target, 1);
 2522|       |
 2523|    468|        if (target > pMesh->getNumSubMeshes())
  ------------------
  |  Branch (2523:13): [True: 4, False: 464]
  ------------------
 2524|    468|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid target for vertex animation track");
 2525|       |
 2526|    464|        VertexData* vdata = pMesh->getVertexDataByTrackHandle(target);
 2527|    464|        if (!vdata)
  ------------------
  |  Branch (2527:13): [True: 2, False: 462]
  ------------------
 2528|    464|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track references target with no vertex data");
 2529|    462|        VertexAnimationTrack* track = anim->createVertexTrack(target, vdata, animType);
 2530|       |
 2531|       |        // keyframes
 2532|    462|        if (!stream->eof())
  ------------------
  |  Branch (2532:13): [True: 453, False: 9]
  ------------------
 2533|    453|        {
 2534|    453|            pushInnerChunk(stream);
 2535|    453|            unsigned short streamID = readChunk(stream);
 2536|  2.88k|            while(!stream->eof() &&
  ------------------
  |  Branch (2536:19): [True: 2.82k, False: 57]
  ------------------
 2537|  2.82k|                (streamID == M_ANIMATION_MORPH_KEYFRAME ||
  ------------------
  |  Branch (2537:18): [True: 579, False: 2.24k]
  ------------------
 2538|  2.24k|                 streamID == M_ANIMATION_POSE_KEYFRAME))
  ------------------
  |  Branch (2538:18): [True: 1.91k, False: 330]
  ------------------
 2539|  2.49k|            {
 2540|  2.49k|                switch(streamID)
  ------------------
  |  Branch (2540:24): [True: 2.49k, False: 0]
  ------------------
 2541|  2.49k|                {
 2542|    579|                case M_ANIMATION_MORPH_KEYFRAME:
  ------------------
  |  Branch (2542:17): [True: 579, False: 1.91k]
  ------------------
 2543|    579|                    readMorphKeyFrame(stream, pMesh, track);
 2544|    579|                    break;
 2545|  1.91k|                case M_ANIMATION_POSE_KEYFRAME:
  ------------------
  |  Branch (2545:17): [True: 1.91k, False: 579]
  ------------------
 2546|  1.91k|                    readPoseKeyFrame(stream, track);
 2547|  1.91k|                    break;
 2548|  2.49k|                };
 2549|  2.43k|                if (!stream->eof())
  ------------------
  |  Branch (2549:21): [True: 2.41k, False: 19]
  ------------------
 2550|  2.41k|                {
 2551|  2.41k|                    streamID = readChunk(stream);
 2552|  2.41k|                }
 2553|       |
 2554|  2.43k|            }
 2555|    387|            if (!stream->eof())
  ------------------
  |  Branch (2555:17): [True: 330, False: 57]
  ------------------
 2556|    330|            {
 2557|       |                // Backpedal back to start of stream
 2558|    330|                backpedalChunkHeader(stream);
 2559|    330|            }
 2560|    387|            popInnerChunk(stream);
 2561|    387|        }
 2562|       |
 2563|    462|    }
_ZN4Ogre18MeshSerializerImpl17readMorphKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_20VertexAnimationTrackE:
 2566|    579|    {
 2567|       |        // float time
 2568|    579|        float timePos;
 2569|    579|        readFloats(stream, &timePos, 1);
 2570|       |        
 2571|       |        // bool includesNormals
 2572|    579|        bool includesNormals;
 2573|    579|        readBools(stream, &includesNormals, 1);
 2574|       |
 2575|    579|        VertexMorphKeyFrame* kf = track->createVertexMorphKeyFrame(timePos);
 2576|       |
 2577|       |        // Create buffer, allow read and use shadow buffer
 2578|    579|        size_t vertexCount = track->getAssociatedVertexData()->vertexCount;
 2579|    579|        size_t vertexSize = sizeof(float) * (includesNormals ? 6 : 3);
  ------------------
  |  Branch (2579:46): [True: 285, False: 294]
  ------------------
 2580|    579|        HardwareVertexBufferSharedPtr vbuf =
 2581|    579|            pMesh->getHardwareBufferManager()->createVertexBuffer(
 2582|    579|                vertexSize, vertexCount,
 2583|    579|                HardwareBuffer::HBU_STATIC, true);
 2584|       |        // float x,y,z          // repeat by number of vertices in original geometry
 2585|    579|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 2586|    579|        readFloats(stream, static_cast<float*>(vbufLock.pData), vertexCount * (includesNormals ? 6 : 3));
  ------------------
  |  Branch (2586:80): [True: 285, False: 294]
  ------------------
 2587|    579|        kf->setVertexBuffer(vbuf);
 2588|       |
 2589|    579|    }
_ZN4Ogre18MeshSerializerImpl16readPoseKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_20VertexAnimationTrackE:
 2592|  1.91k|    {
 2593|       |        // float time
 2594|  1.91k|        float timePos;
 2595|  1.91k|        readFloats(stream, &timePos, 1);
 2596|       |
 2597|       |        // Create keyframe
 2598|  1.91k|        VertexPoseKeyFrame* kf = track->createVertexPoseKeyFrame(timePos);
 2599|       |
 2600|  1.91k|        if (!stream->eof())
  ------------------
  |  Branch (2600:13): [True: 1.90k, False: 9]
  ------------------
 2601|  1.90k|        {
 2602|  1.90k|            pushInnerChunk(stream);
 2603|  1.90k|            unsigned short streamID = readChunk(stream);
 2604|  4.03k|            while(!stream->eof() &&
  ------------------
  |  Branch (2604:19): [True: 3.96k, False: 68]
  ------------------
 2605|  3.96k|                streamID == M_ANIMATION_POSE_REF)
  ------------------
  |  Branch (2605:17): [True: 2.12k, False: 1.84k]
  ------------------
 2606|  2.12k|            {
 2607|  2.12k|                switch(streamID)
  ------------------
  |  Branch (2607:24): [True: 2.12k, False: 0]
  ------------------
 2608|  2.12k|                {
 2609|  2.12k|                case M_ANIMATION_POSE_REF:
  ------------------
  |  Branch (2609:17): [True: 2.12k, False: 0]
  ------------------
 2610|  2.12k|                    uint16 poseIndex;
 2611|  2.12k|                    float influence;
 2612|       |                    // unsigned short poseIndex
 2613|  2.12k|                    readShorts(stream, &poseIndex, 1);
 2614|       |                    // float influence
 2615|  2.12k|                    readFloats(stream, &influence, 1);
 2616|       |
 2617|  2.12k|                    kf->addPoseReference(poseIndex, influence);
 2618|       |
 2619|  2.12k|                    break;
 2620|  2.12k|                };
 2621|  2.12k|                if (!stream->eof())
  ------------------
  |  Branch (2621:21): [True: 2.12k, False: 3]
  ------------------
 2622|  2.12k|                {
 2623|  2.12k|                    streamID = readChunk(stream);
 2624|  2.12k|                }
 2625|  2.12k|            }
 2626|  1.90k|            if (!stream->eof())
  ------------------
  |  Branch (2626:17): [True: 1.84k, False: 68]
  ------------------
 2627|  1.84k|            {
 2628|       |                // Backpedal back to start of stream
 2629|  1.84k|                backpedalChunkHeader(stream);
 2630|  1.84k|            }
 2631|  1.90k|            popInnerChunk(stream);
 2632|  1.90k|        }
 2633|  1.91k|    }
_ZN4Ogre18MeshSerializerImpl12readExtremesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2636|  1.58k|    {
 2637|  1.58k|        unsigned short idx;
 2638|  1.58k|        readShorts(stream, &idx, 1);
 2639|       |        
 2640|  1.58k|        SubMesh *sm = pMesh->getSubMeshes().at(idx);
 2641|       |
 2642|  1.58k|        const size_t minChunkSize = MSTREAM_OVERHEAD_SIZE + sizeof(unsigned short);
 2643|  1.58k|        if (mCurrentstreamLen <= minChunkSize)
  ------------------
  |  Branch (2643:13): [True: 1, False: 1.58k]
  ------------------
 2644|  1.58k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Extremes chunk too small");
 2645|       |
 2646|  1.58k|        size_t n_floats = (mCurrentstreamLen - minChunkSize) / sizeof(float);
 2647|       |
 2648|  1.58k|        if (n_floats == 0 || n_floats % 3 != 0)
  ------------------
  |  Branch (2648:13): [True: 14, False: 1.56k]
  |  Branch (2648:30): [True: 4, False: 1.56k]
  ------------------
 2649|  1.58k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid extremes data size");
 2650|       |        
 2651|  1.57k|        sm->extremityPoints.resize(n_floats / 3);
 2652|       |
 2653|  1.57k|        readFloats(stream, sm->extremityPoints.front().ptr(), n_floats);
 2654|  1.57k|    }
_ZN4Ogre23MeshSerializerImpl_v1_8C2Ev:
 2668|  3.86k|    {
 2669|       |        // Version number
 2670|  3.86k|        mVersion = "[MeshSerializer_v1.8]";
 2671|  3.86k|    }
_ZN4Ogre23MeshSerializerImpl_v1_825readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2898|    146|    {
 2899|    146|        usage.manualName = "";
 2900|    146|        usage.manualMesh.reset();
 2901|    146|        pushInnerChunk(stream);
 2902|    146|        {
 2903|       |            // Get one set of detail per SubMesh
 2904|    146|            for (auto *sm : pMesh->getSubMeshes())
  ------------------
  |  Branch (2904:27): [True: 140, False: 87]
  ------------------
 2905|    140|            {
 2906|    140|                unsigned long streamID = readChunk(stream);
 2907|    140|                if (streamID != M_MESH_LOD_GENERATED)
  ------------------
  |  Branch (2907:21): [True: 16, False: 124]
  ------------------
 2908|     16|                {
 2909|     16|                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2910|     16|                        "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 2911|     16|                        "MeshSerializerImpl::readMeshLodUsageGenerated");
 2912|     16|                }
 2913|       |
 2914|    124|                IndexData* indexData = OGRE_NEW IndexData();
 2915|    124|                sm->mLodFaceList[lodNum - 1] = indexData;
 2916|    124|                unsigned int numIndexes;
 2917|    124|                readInts(stream, &numIndexes, 1);
 2918|    124|                bool idx32Bit;
 2919|    124|                readBools(stream, &idx32Bit, 1);
 2920|       |
 2921|    124|                if (!checkChunkRemainingSize(mCurrentstreamLen, numIndexes, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (2921:21): [True: 43, False: 81]
  |  Branch (2921:77): [True: 76, False: 48]
  ------------------
 2922|    124|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 2923|       |
 2924|     81|                indexData->indexCount = numIndexes;
 2925|       |
 2926|     81|                if (idx32Bit)
  ------------------
  |  Branch (2926:21): [True: 41, False: 40]
  ------------------
 2927|     41|                {
 2928|     41|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2929|     41|                        HardwareIndexBuffer::IT_32BIT, indexData->indexCount,
 2930|     41|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2931|     41|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2932|     41|                    readInts(stream, static_cast<unsigned int*>(ibufLock.pData), indexData->indexCount);
 2933|     41|                }
 2934|     40|                else
 2935|     40|                {
 2936|     40|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2937|     40|                        HardwareIndexBuffer::IT_16BIT, indexData->indexCount,
 2938|     40|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2939|     40|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2940|     40|                    readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), indexData->indexCount);
 2941|     40|                }
 2942|     81|            }
 2943|    146|        }
 2944|     87|        popInnerChunk(stream);
 2945|     87|    }
_ZN4Ogre23MeshSerializerImpl_v1_822readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2949|     27|    {
 2950|     27|        pushInnerChunk(stream);
 2951|     27|        unsigned long streamID;
 2952|       |        // Read detail stream
 2953|     27|        streamID = readChunk(stream);
 2954|     27|        if (streamID != M_MESH_LOD_MANUAL)
  ------------------
  |  Branch (2954:13): [True: 5, False: 22]
  ------------------
 2955|      5|        {
 2956|      5|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2957|      5|                "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 2958|      5|                "MeshSerializerImpl::readMeshLodUsageManual");
 2959|      5|        }
 2960|       |
 2961|     22|        usage.manualName = readString(stream);
 2962|     22|        usage.manualMesh.reset(); // will trigger load later
 2963|     22|        popInnerChunk(stream);
 2964|     22|    }
_ZN4Ogre23MeshSerializerImpl_v1_816readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2968|  5.46k|    {
 2969|       |#if OGRE_NO_MESHLOD
 2970|       |
 2971|       |        /*
 2972|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 2973|       |        // We need to walk through the data to not rely on the chunk size!
 2974|       |        stream->skip(mCurrentstreamLen);
 2975|       |
 2976|       |        // Since we got here, we have already read the chunk header.
 2977|       |        backpedalChunkHeader(stream);
 2978|       |        */
 2979|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 2980|       |        String strategyName = readString(stream);
 2981|       |        uint16 numLods;
 2982|       |        readShorts(stream, &numLods, 1);
 2983|       |        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 2984|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 2985|       |        bool manual;
 2986|       |        readBools(stream, &manual, 1); // missing in v1_9
 2987|       |        pushInnerChunk(stream);
 2988|       |        for (uint16 i = 1; i < numLods; ++i)
 2989|       |        {
 2990|       |            uint16 streamID = readChunk(stream);
 2991|       |            if (streamID != M_MESH_LOD_USAGE)
 2992|       |            {
 2993|       |                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2994|       |                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 2995|       |                    "MeshSerializerImpl::readMeshLodInfo");
 2996|       |            }
 2997|       |            float usageValue;
 2998|       |            readFloats(stream, &usageValue, 1);
 2999|       |
 3000|       |            if (manual)
 3001|       |            {
 3002|       |                // Read detail stream
 3003|       |                streamID = readChunk(stream);
 3004|       |                if (streamID != M_MESH_LOD_MANUAL)
 3005|       |                {
 3006|       |                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3007|       |                        "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 3008|       |                        "MeshSerializerImpl::readMeshLodUsageManual");
 3009|       |                }
 3010|       |
 3011|       |                String manualName = readString(stream);
 3012|       |            }
 3013|       |            else
 3014|       |            {
 3015|       |                pushInnerChunk(stream);
 3016|       |                for (uint16 n = 0; n < numSubs; ++n)
 3017|       |                {
 3018|       |                    streamID = readChunk(stream);
 3019|       |                    if (streamID != M_MESH_LOD_GENERATED)
 3020|       |                    {
 3021|       |                        OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3022|       |                            "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 3023|       |                            "MeshSerializerImpl::readMeshLodUsageGenerated");
 3024|       |                    }
 3025|       |
 3026|       |                    unsigned int numIndexes;
 3027|       |                    readInts(stream, &numIndexes, 1);
 3028|       |
 3029|       |                    bool idx32Bit;
 3030|       |                    readBools(stream, &idx32Bit, 1);
 3031|       |
 3032|       |                    size_t buffSize = numIndexes * (idx32Bit ? 4 : 2);
 3033|       |                    stream->skip(buffSize);
 3034|       |                }
 3035|       |                popInnerChunk(stream);
 3036|       |            }
 3037|       |        }
 3038|       |        popInnerChunk(stream);
 3039|       |#else
 3040|  5.46k|        unsigned short streamID, i;
 3041|       |
 3042|       |        // Read the strategy to be used for this mesh
 3043|  5.46k|        String strategyName = readString(stream);
 3044|  5.46k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 3045|       |        
 3046|  5.46k|        if (strategy)
  ------------------
  |  Branch (3046:13): [True: 2.40k, False: 3.06k]
  ------------------
 3047|  2.40k|            pMesh->setLodStrategy(strategy);
 3048|       |
 3049|       |        // unsigned short numLevels;
 3050|  5.46k|        uint16 numLods;
 3051|  5.46k|        readShorts(stream, &numLods, 1);
 3052|  5.46k|        numLods = std::max<ushort>(numLods, 1);
 3053|       |
 3054|  5.46k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (3054:13): [True: 38, False: 5.42k]
  ------------------
 3055|  5.46k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 3056|       |
 3057|  5.42k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (3057:12): [True: 3, False: 5.42k]
  ------------------
 3058|  5.42k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 3059|       |
 3060|  5.42k|        pMesh->mMeshLodUsageList.resize(numLods);
 3061|       |
 3062|  5.42k|        bool manual; // true for manual alternate meshes, false for generated
 3063|  5.42k|        readBools(stream, &manual, 1);
 3064|  5.42k|        pMesh->mHasManualLodLevel = manual;
 3065|       |
 3066|       |        // Preallocate submesh lod face data if not manual
 3067|  5.42k|        if (!pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3067:13): [True: 4.21k, False: 1.20k]
  ------------------
 3068|  4.21k|        {
 3069|  4.21k|            unsigned short numsubs = pMesh->getNumSubMeshes();
 3070|   387k|            for (i = 0; i < numsubs; ++i)
  ------------------
  |  Branch (3070:25): [True: 383k, False: 4.21k]
  ------------------
 3071|   383k|            {
 3072|   383k|                SubMesh* sm = pMesh->getSubMesh(i);
 3073|   383k|                assert(sm->mLodFaceList.empty());
 3074|   383k|                sm->mLodFaceList.resize(numLods - 1);
 3075|   383k|            }
 3076|  4.21k|        }
 3077|       |
 3078|  5.42k|        pushInnerChunk(stream);
 3079|       |        // Loop from 1 rather than 0 (full detail index is not in file)
 3080|  5.63k|        for (i = 1; i < numLods; ++i)
  ------------------
  |  Branch (3080:21): [True: 233, False: 5.40k]
  ------------------
 3081|    233|        {
 3082|    233|            streamID = readChunk(stream);
 3083|    233|            if (streamID != M_MESH_LOD_USAGE)
  ------------------
  |  Branch (3083:17): [True: 25, False: 208]
  ------------------
 3084|     25|            {
 3085|     25|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3086|     25|                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3087|     25|                    "MeshSerializerImpl::readMeshLodInfo");
 3088|     25|            }
 3089|       |            // Read depth
 3090|    208|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[i];
 3091|    208|            readFloats(stream, &(usage.userValue), 1);
 3092|       |
 3093|    208|            if (pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3093:17): [True: 27, False: 181]
  ------------------
 3094|     27|            {
 3095|     27|                readMeshLodUsageManual(stream, pMesh, i, usage);
 3096|     27|            }
 3097|    181|            else //(!pMesh->hasManualLodLevel())
 3098|    181|            {
 3099|    181|                readMeshLodUsageGenerated(stream, pMesh, i, usage);
 3100|    181|            }
 3101|    208|            usage.edgeData = NULL;
 3102|    208|        }
 3103|  5.40k|        popInnerChunk(stream);
 3104|  5.40k|#endif
 3105|  5.40k|    }
OgreMeshSerializerImpl.cpp:_ZN4OgreL23checkChunkRemainingSizeEmmm:
   51|   232k|    {
   52|   232k|        if (itemCount == 0)
  ------------------
  |  Branch (52:13): [True: 27.5k, False: 204k]
  ------------------
   53|  27.5k|            return true;
   54|       |
   55|   204k|        if (chunkSize <= MSTREAM_OVERHEAD_SIZE || itemSize == 0)
  ------------------
  |  Branch (55:13): [True: 761, False: 204k]
  |  Branch (55:51): [True: 0, False: 204k]
  ------------------
   56|    761|            return false;
   57|       |
   58|   204k|        size_t remaining = chunkSize - MSTREAM_OVERHEAD_SIZE;
   59|   204k|        return remaining / itemSize >= itemCount;
   60|   204k|    }

_ZN4Ogre4NodeC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   35|    701|        :mParent(0),
   36|    701|        mName(name),
   37|    701|        mNeedParentUpdate(false),
   38|    701|        mNeedChildUpdate(false),
   39|    701|        mParentNotified(false),
   40|    701|        mQueuedForUpdate(false),
   41|    701|        mInheritOrientation(true),
   42|    701|        mInheritScale(true),
   43|    701|        mCachedTransformOutOfDate(true),
   44|    701|        mOrientation(Quaternion::IDENTITY),
   45|    701|        mPosition(Vector3::ZERO),
   46|    701|        mScale(Vector3::UNIT_SCALE),
   47|    701|        mDerivedOrientation(Quaternion::IDENTITY),
   48|    701|        mDerivedPosition(Vector3::ZERO),
   49|    701|        mDerivedScale(Vector3::UNIT_SCALE),
   50|    701|        mInitialPosition(Vector3::ZERO),
   51|    701|        mInitialOrientation(Quaternion::IDENTITY),
   52|    701|        mInitialScale(Vector3::UNIT_SCALE),
   53|    701|        mListener(0)
   54|    701|    {
   55|    701|        needUpdate();
   56|    701|    }
_ZN4Ogre4NodeD2Ev:
   60|    701|    {
   61|       |        // Call listener (note, only called if there's something to do)
   62|    701|        if (mListener)
  ------------------
  |  Branch (62:13): [True: 0, False: 701]
  ------------------
   63|      0|        {
   64|      0|            mListener->nodeDestroyed(this);
   65|      0|        }
   66|       |
   67|    701|        removeAllChildren();
   68|    701|        if(mParent)
  ------------------
  |  Branch (68:12): [True: 5, False: 696]
  ------------------
   69|      5|            mParent->removeChild(this);
   70|       |
   71|    701|        if (mQueuedForUpdate)
  ------------------
  |  Branch (71:13): [True: 0, False: 701]
  ------------------
   72|      0|        {
   73|       |            // Erase from queued updates
   74|      0|            QueuedUpdates::iterator it =
   75|      0|                std::find(msQueuedUpdates.begin(), msQueuedUpdates.end(), this);
   76|      0|            assert(it != msQueuedUpdates.end());
   77|      0|            if (it != msQueuedUpdates.end())
  ------------------
  |  Branch (77:17): [True: 0, False: 0]
  ------------------
   78|      0|            {
   79|       |                // Optimised algorithm to erase an element from unordered vector.
   80|      0|                *it = msQueuedUpdates.back();
   81|      0|                msQueuedUpdates.pop_back();
   82|      0|            }
   83|      0|        }
   84|       |
   85|    701|    }
_ZN4Ogre4Node9setParentEPS0_:
   89|     18|    {
   90|     18|        bool different = (parent != mParent);
   91|       |
   92|     18|        mParent = parent;
   93|       |        // Request update from parent
   94|     18|        mParentNotified = false ;
   95|     18|        needUpdate();
   96|       |
   97|       |        // Call listener (note, only called if there's something to do)
   98|     18|        if (mListener && different)
  ------------------
  |  Branch (98:13): [True: 0, False: 18]
  |  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|     18|    }
_ZNK4Ogre4Node17_updateFromParentEv:
  192|    578|    {
  193|    578|        updateFromParentImpl();
  194|       |
  195|       |        // Call listener (note, this method only called if there's something to do)
  196|    578|        if (mListener)
  ------------------
  |  Branch (196:13): [True: 0, False: 578]
  ------------------
  197|      0|        {
  198|      0|            mListener->nodeUpdated(this);
  199|      0|        }
  200|    578|    }
_ZNK4Ogre4Node20updateFromParentImplEv:
  203|    578|    {
  204|    578|        mCachedTransformOutOfDate = true;
  205|       |
  206|    578|        if (mParent)
  ------------------
  |  Branch (206:13): [True: 3, False: 575]
  ------------------
  207|      3|        {
  208|       |#if OGRE_NODE_INHERIT_TRANSFORM
  209|       |            // Decompose full transform to position, orientation and scale, shear is lost here.
  210|       |            _getFullTransform().decomposition(mDerivedPosition, mDerivedScale, mDerivedOrientation);
  211|       |#else
  212|       |            // Update orientation
  213|      3|            const Quaternion& parentOrientation = mParent->_getDerivedOrientation();
  214|      3|            if (mInheritOrientation)
  ------------------
  |  Branch (214:17): [True: 3, False: 0]
  ------------------
  215|      3|            {
  216|       |                // Combine orientation with that of parent
  217|      3|                mDerivedOrientation = parentOrientation * mOrientation;
  218|      3|            }
  219|      0|            else
  220|      0|            {
  221|       |                // No inheritance
  222|      0|                mDerivedOrientation = mOrientation;
  223|      0|            }
  224|       |
  225|       |            // Update scale
  226|      3|            const Vector3& parentScale = mParent->_getDerivedScale();
  227|      3|            if (mInheritScale)
  ------------------
  |  Branch (227:17): [True: 3, False: 0]
  ------------------
  228|      3|            {
  229|       |                // Scale own position by parent scale, NB just combine
  230|       |                // as equivalent axes, no shearing
  231|      3|                mDerivedScale = parentScale * mScale;
  232|      3|            }
  233|      0|            else
  234|      0|            {
  235|       |                // No inheritance
  236|      0|                mDerivedScale = mScale;
  237|      0|            }
  238|       |
  239|       |            // Change position vector based on parent's orientation & scale
  240|      3|            mDerivedPosition = parentOrientation * (parentScale * mPosition);
  241|       |
  242|       |            // Add altered position vector to parents
  243|      3|            mDerivedPosition += mParent->_getDerivedPosition();
  244|      3|#endif
  245|      3|        }
  246|    575|        else
  247|    575|        {
  248|       |            // Root node, no parent
  249|    575|            mDerivedOrientation = mOrientation;
  250|    575|            mDerivedPosition = mPosition;
  251|    575|            mDerivedScale = mScale;
  252|    575|        }
  253|       |
  254|    578|        mNeedParentUpdate = false;
  255|       |
  256|    578|    }
_ZN4Ogre4Node8addChildEPS0_:
  280|     12|    {
  281|     12|        if (child->mParent)
  ------------------
  |  Branch (281:13): [True: 3, False: 9]
  ------------------
  282|      3|        {
  283|      3|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
  284|      3|                        "Node '" + child->getName() + "' already is a child of '" + child->mParent->getName() + "'");
  285|      3|        }
  286|       |
  287|      9|        mChildren.push_back(child);
  288|      9|        child->setParent(this);
  289|       |
  290|      9|    }
_ZN4Ogre4Node11removeChildEPS0_:
  320|      5|    {
  321|      5|        if (child)
  ------------------
  |  Branch (321:13): [True: 5, False: 0]
  ------------------
  322|      5|        {
  323|      5|            ChildNodeMap::iterator i = std::find(mChildren.begin(), mChildren.end(), child);
  324|      5|            if(i != mChildren.end() && *i == child)
  ------------------
  |  Branch (324:16): [True: 5, False: 0]
  |  Branch (324:16): [True: 5, False: 0]
  |  Branch (324:40): [True: 5, False: 0]
  ------------------
  325|      5|            {
  326|       |                // cancel any pending update
  327|      5|                cancelUpdate(child);
  328|       |
  329|      5|                std::swap(*i, mChildren.back());
  330|      5|                mChildren.pop_back();
  331|       |                child->setParent(NULL);
  332|      5|            }
  333|      5|        }
  334|      5|        return child;
  335|      5|    }
_ZN4Ogre4Node14setOrientationERKNS_10QuaternionE:
  339|    701|    {
  340|    701|#ifndef OGRE_FAST_MATH
  341|    701|        OgreAssertDbg(!q.isNaN(), "Invalid orientation supplied as parameter");
  342|    701|#endif
  343|    701|        mOrientation = q;
  344|    701|        mOrientation.normalise();
  345|    701|        needUpdate();
  346|    701|    }
_ZN4Ogre4Node11setPositionERKNS_6VectorILi3EfEE:
  361|    701|    {
  362|    701|#ifndef OGRE_FAST_MATH
  363|       |        assert(!pos.isNaN() && "Invalid vector supplied as parameter");
  364|    701|#endif
  365|    701|        mPosition = pos;
  366|    701|        needUpdate();
  367|    701|    }
_ZNK4Ogre4Node22_getDerivedOrientationEv:
  448|    581|    {
  449|    581|        if (mNeedParentUpdate)
  ------------------
  |  Branch (449:13): [True: 2, False: 579]
  ------------------
  450|      2|        {
  451|      2|            _updateFromParent();
  452|      2|        }
  453|    581|        return mDerivedOrientation;
  454|    581|    }
_ZNK4Ogre4Node19_getDerivedPositionEv:
  457|    581|    {
  458|    581|        if (mNeedParentUpdate)
  ------------------
  |  Branch (458:13): [True: 576, False: 5]
  ------------------
  459|    576|        {
  460|    576|            _updateFromParent();
  461|    576|        }
  462|    581|        return mDerivedPosition;
  463|    581|    }
_ZNK4Ogre4Node16_getDerivedScaleEv:
  466|    581|    {
  467|    581|        if (mNeedParentUpdate)
  ------------------
  |  Branch (467:13): [True: 0, False: 581]
  ------------------
  468|      0|        {
  469|      0|            _updateFromParent();
  470|      0|        }
  471|    581|        return mDerivedScale;
  472|    581|    }
_ZN4Ogre4Node17removeAllChildrenEv:
  542|    701|    {
  543|    701|        for (auto *c : mChildren)
  ------------------
  |  Branch (543:22): [True: 4, False: 701]
  ------------------
  544|      4|        {
  545|      4|            c->setParent(0);
  546|      4|        }
  547|    701|        mChildren.clear();
  548|    701|        mChildrenToUpdate.clear();
  549|    701|    }
_ZN4Ogre4Node8setScaleERKNS_6VectorILi3EfEE:
  559|     23|    {
  560|     23|#ifndef OGRE_FAST_MATH
  561|       |        assert(!inScale.isNaN() && "Invalid vector supplied as parameter");
  562|     23|#endif
  563|     23|        mScale = inScale;
  564|     23|        needUpdate();
  565|     23|    }
_ZN4Ogre4Node15setInitialStateEv:
  596|    578|    {
  597|    578|        mInitialPosition = mPosition;
  598|    578|        mInitialOrientation = mOrientation;
  599|    578|        mInitialScale = mScale;
  600|    578|    }
_ZN4Ogre4Node10needUpdateEb:
  676|  2.14k|    {
  677|       |
  678|  2.14k|        mNeedParentUpdate = true;
  679|  2.14k|        mNeedChildUpdate = true;
  680|  2.14k|        mCachedTransformOutOfDate = true;
  681|       |
  682|       |        // Make sure we're not root and parent hasn't been notified before
  683|  2.14k|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (683:13): [True: 9, False: 2.13k]
  |  Branch (683:25): [True: 9, False: 0]
  |  Branch (683:45): [True: 0, False: 0]
  ------------------
  684|      9|        {
  685|      9|            mParent->requestUpdate(this, forceParentUpdate);
  686|      9|            mParentNotified = true ;
  687|      9|        }
  688|       |
  689|       |        // all children will be updated
  690|  2.14k|        mChildrenToUpdate.clear();
  691|  2.14k|    }
_ZN4Ogre4Node13requestUpdateEPS0_b:
  694|      9|    {
  695|       |        // If we're already going to update everything this doesn't matter
  696|      9|        if (mNeedChildUpdate)
  ------------------
  |  Branch (696:13): [True: 9, False: 0]
  ------------------
  697|      9|        {
  698|      9|            return;
  699|      9|        }
  700|       |
  701|      0|        mChildrenToUpdate.push_back(child);
  702|       |        // Request selective update of me, if we didn't do it before
  703|      0|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (703:13): [True: 0, False: 0]
  |  Branch (703:25): [True: 0, False: 0]
  |  Branch (703:45): [True: 0, False: 0]
  ------------------
  704|      0|        {
  705|      0|            mParent->requestUpdate(this, forceParentUpdate);
  706|      0|            mParentNotified = true ;
  707|      0|        }
  708|       |
  709|      0|    }
_ZN4Ogre4Node12cancelUpdateEPS0_:
  712|      5|    {
  713|      5|        mChildrenToUpdate.erase(std::remove(mChildrenToUpdate.begin(), mChildrenToUpdate.end(), child),
  714|      5|                                mChildrenToUpdate.end());
  715|       |
  716|       |        // Propagate this up if we're done
  717|      5|        if (mChildrenToUpdate.empty() && mParent && !mNeedChildUpdate)
  ------------------
  |  Branch (717:13): [True: 5, False: 0]
  |  Branch (717:42): [True: 0, False: 5]
  |  Branch (717:53): [True: 0, False: 0]
  ------------------
  718|      0|        {
  719|      0|            mParent->cancelUpdate(this);
  720|      0|            mParentNotified = false ;
  721|      0|        }
  722|      5|    }

_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|    229|    {
   42|       |        // Use the maximum possible value as base
   43|    229|        return std::numeric_limits<Real>::max();
   44|    229|    }
_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|  33.5k|        : mTarget(target), mName(name)
   35|  33.5k|    {
   36|  33.5k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEE:
   39|  2.29k|    {
   40|  2.29k|        OgreAssert(mNormalsMap.empty(),
  ------------------
  |  Branch (40:9): [True: 0, False: 2.29k]
  ------------------
   41|  2.29k|                   "Inconsistent calls to addVertex, must include normals always or never");
   42|       |
   43|  2.29k|        if(offset.squaredLength() < 1e-6f)
  ------------------
  |  Branch (43:12): [True: 241, False: 2.05k]
  ------------------
   44|    241|        {
   45|    241|            return;
   46|    241|        }
   47|       |
   48|  2.05k|        mVertexOffsetMap[index] = offset;
   49|  2.05k|        mBuffer.reset();
   50|  2.05k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEES4_:
   53|  2.97k|    {
   54|  2.97k|        OgreAssert(mVertexOffsetMap.empty() || !mNormalsMap.empty(),
  ------------------
  |  Branch (54:9): [True: 978, False: 1.99k]
  |  Branch (54:9): [True: 1.99k, False: 0]
  ------------------
   55|  2.97k|                   "Inconsistent calls to addVertex, must include normals always or never");
   56|       |
   57|  2.97k|        if(offset.squaredLength() < 1e-6f && normal.squaredLength() < 1e-6f)
  ------------------
  |  Branch (57:12): [True: 1.01k, False: 1.95k]
  |  Branch (57:46): [True: 262, False: 752]
  ------------------
   58|    262|        {
   59|    262|            return;
   60|    262|        }
   61|       |
   62|  2.70k|        mVertexOffsetMap[index] = offset;
   63|  2.70k|        mNormalsMap[index] = normal;
   64|  2.70k|        mBuffer.reset();
   65|  2.70k|    }

_ZNK4Ogre10QuaternionmlERKS0_:
  261|      3|    {
  262|       |        // NOTE:  Multiplication is not generally commutative, so in most
  263|       |        // cases p*q != q*p.
  264|       |
  265|      3|        return Quaternion
  266|      3|        (
  267|      3|            w * rkQ.w - x * rkQ.x - y * rkQ.y - z * rkQ.z,
  268|      3|            w * rkQ.x + x * rkQ.w + y * rkQ.z - z * rkQ.y,
  269|      3|            w * rkQ.y + y * rkQ.w + z * rkQ.x - x * rkQ.z,
  270|      3|            w * rkQ.z + z * rkQ.w + x * rkQ.y - y * rkQ.x
  271|      3|        );
  272|      3|    }
_ZNK4Ogre10Quaternion7InverseEv:
  275|    578|    {
  276|    578|        Real fNorm = w*w+x*x+y*y+z*z;
  277|    578|        if ( fNorm > 0.0 )
  ------------------
  |  Branch (277:14): [True: 356, False: 222]
  ------------------
  278|    356|        {
  279|    356|            Real fInvNorm = 1.0f/fNorm;
  280|    356|            return Quaternion(w*fInvNorm,-x*fInvNorm,-y*fInvNorm,-z*fInvNorm);
  281|    356|        }
  282|    222|        else
  283|    222|        {
  284|       |            // return an invalid result to flag the error
  285|    222|            return ZERO;
  286|    222|        }
  287|    578|    }
_ZNK4Ogre10QuaternionmlERKNS_6VectorILi3EfEE:
  360|      3|    {
  361|       |		// nVidia SDK implementation
  362|      3|		Vector3 uv, uuv;
  363|      3|		Vector3 qvec(x, y, z);
  364|      3|		uv = qvec.crossProduct(v);
  365|      3|		uuv = qvec.crossProduct(uv);
  366|      3|		uv *= (2.0f * w);
  367|      3|		uuv *= 2.0f;
  368|       |
  369|      3|		return v + uv + uuv;
  370|       |
  371|      3|    }

_ZN4Ogre8ResourceC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   36|  8.83k|        : mCreator(creator), mName(name), mGroup(group), mHandle(handle), 
   37|  8.83k|        mLoadingState(LOADSTATE_UNLOADED), mIsBackgroundLoaded(false),
   38|  8.83k|        mIsManual(isManual), mSize(0),  mLoader(loader), mStateCount(0)
   39|  8.83k|    {
   40|  8.83k|    }
_ZN4Ogre8ResourceD2Ev:
   43|  4.86k|    { 
   44|  4.86k|    }
_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|    }
_ZN4Ogre8Resource7prepareEb:
   70|  1.10k|    {
   71|       |        // quick check that avoids any synchronisation
   72|  1.10k|        LoadingState old = mLoadingState.load();
   73|  1.10k|        if (old != LOADSTATE_UNLOADED && old != LOADSTATE_PREPARING) return;
  ------------------
  |  Branch (73:13): [True: 0, False: 1.10k]
  |  Branch (73:42): [True: 0, False: 0]
  ------------------
   74|       |
   75|       |        // atomically do slower check to make absolutely sure,
   76|       |        // and set the load state to PREPARING
   77|  1.10k|        old = LOADSTATE_UNLOADED;
   78|  1.10k|        if (!mLoadingState.compare_exchange_strong(old,LOADSTATE_PREPARING))
  ------------------
  |  Branch (78:13): [True: 0, False: 1.10k]
  ------------------
   79|      0|        {
   80|      0|            while( mLoadingState.load() == LOADSTATE_PREPARING )
  ------------------
  |  Branch (80:20): [True: 0, False: 0]
  ------------------
   81|      0|            {
   82|      0|                            OGRE_LOCK_AUTO_MUTEX;
   83|      0|            }
   84|       |
   85|      0|            LoadingState state = mLoadingState.load();
   86|      0|            if( state != LOADSTATE_PREPARED && state != LOADSTATE_LOADING && state != LOADSTATE_LOADED )
  ------------------
  |  Branch (86:17): [True: 0, False: 0]
  |  Branch (86:48): [True: 0, False: 0]
  |  Branch (86:78): [True: 0, False: 0]
  ------------------
   87|      0|            {
   88|      0|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Another thread failed in resource operation",
   89|      0|                    "Resource::prepare");
   90|      0|            }
   91|      0|            return;
   92|      0|        }
   93|       |
   94|       |        // Scope lock for actual loading
   95|  1.10k|        try
   96|  1.10k|        {
   97|       |
   98|  1.10k|                    OGRE_LOCK_AUTO_MUTEX;
   99|       |
  100|  1.10k|            if (mIsManual)
  ------------------
  |  Branch (100:17): [True: 998, False: 104]
  ------------------
  101|    998|            {
  102|    998|                if (mLoader)
  ------------------
  |  Branch (102:21): [True: 0, False: 998]
  ------------------
  103|      0|                {
  104|      0|                    mLoader->prepareResource(this);
  105|      0|                }
  106|    998|                else
  107|    998|                {
  108|       |                    // Warn that this resource is not reloadable
  109|    998|                    LogManager::getSingleton().stream(LML_TRIVIAL) 
  110|    998|                        << "Note: " << mCreator->getResourceType()
  111|    998|                        << " instance '" << mName << "' was defined as manually "
  112|    998|                        << "loaded, but no manual loader was provided. This Resource "
  113|    998|                        << "will be lost if it has to be reloaded.";
  114|    998|                }
  115|    998|            }
  116|    104|            else
  117|    104|            {
  118|    104|                if (mGroup == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (118:21): [True: 0, False: 104]
  ------------------
  119|      0|                {
  120|       |                    // Derive resource group
  121|      0|                    changeGroupOwnership(
  122|      0|                        ResourceGroupManager::getSingleton()
  123|      0|                        .findGroupContainingResource(mName));
  124|      0|                }
  125|    104|                prepareImpl();
  126|    104|            }
  127|  1.10k|        }
  128|  1.10k|        catch (...)
  129|  1.10k|        {
  130|    104|            mLoadingState.store(LOADSTATE_UNLOADED);
  131|       |
  132|    104|            OGRE_LOCK_AUTO_MUTEX;
  133|    104|            unloadImpl();
  134|       |
  135|    104|            throw;
  136|    104|        }
  137|       |
  138|    998|        mLoadingState.store(LOADSTATE_PREPARED);
  139|       |
  140|       |        // Since we don't distinguish between GPU and CPU RAM, this
  141|       |        // seems pointless
  142|       |        //if(mCreator)
  143|       |        //  mCreator->_notifyResourcePrepared(this);
  144|       |
  145|       |        // Fire events (if not background)
  146|    998|        if (!background)
  ------------------
  |  Branch (146:13): [True: 998, False: 0]
  ------------------
  147|    998|            _firePreparingComplete();
  148|       |
  149|       |
  150|    998|    }
_ZN4Ogre8Resource4loadEb:
  153|  29.9k|    {
  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|  29.9k|        if (mIsBackgroundLoaded && !background) return;
  ------------------
  |  Branch (161:13): [True: 0, False: 29.9k]
  |  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|  29.9k|        bool keepChecking = true;
  166|  29.9k|        LoadingState old = LOADSTATE_UNLOADED;
  167|  59.8k|        while (keepChecking)
  ------------------
  |  Branch (167:16): [True: 29.9k, False: 29.9k]
  ------------------
  168|  29.9k|        {
  169|       |            // quick check that avoids any synchronisation
  170|  29.9k|            old = mLoadingState.load();
  171|       |
  172|  29.9k|            if ( old == LOADSTATE_PREPARING )
  ------------------
  |  Branch (172:18): [True: 0, False: 29.9k]
  ------------------
  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|  29.9k|            if (old!=LOADSTATE_UNLOADED && old!=LOADSTATE_PREPARED && old!=LOADSTATE_LOADING) return;
  ------------------
  |  Branch (181:17): [True: 0, False: 29.9k]
  |  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|  29.9k|            if (old==LOADSTATE_LOADING || !mLoadingState.compare_exchange_strong(old,LOADSTATE_LOADING))
  ------------------
  |  Branch (185:17): [True: 0, False: 29.9k]
  |  Branch (185:43): [True: 0, False: 29.9k]
  ------------------
  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|  29.9k|            keepChecking = false;
  206|  29.9k|        }
  207|       |
  208|       |        // Scope lock for actual loading
  209|  29.9k|        try
  210|  29.9k|        {
  211|       |
  212|  29.9k|                    OGRE_LOCK_AUTO_MUTEX;
  213|       |
  214|       |
  215|       |
  216|  29.9k|            if (mIsManual)
  ------------------
  |  Branch (216:17): [True: 3.86k, False: 26.0k]
  ------------------
  217|  3.86k|            {
  218|  3.86k|                if (old==LOADSTATE_UNLOADED && mLoader)
  ------------------
  |  Branch (218:21): [True: 3.86k, False: 0]
  |  Branch (218:48): [True: 0, False: 3.86k]
  ------------------
  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|  3.86k|                preLoadImpl();
  227|       |
  228|       |                // Load from manual loader
  229|  3.86k|                if (mLoader)
  ------------------
  |  Branch (229:21): [True: 0, False: 3.86k]
  ------------------
  230|      0|                {
  231|      0|                    mLoader->loadResource(this);
  232|      0|                }
  233|  3.86k|                else
  234|  3.86k|                {
  235|       |                    // Warn that this resource is not reloadable
  236|  3.86k|                    LogManager::getSingleton().stream(LML_TRIVIAL) 
  237|  3.86k|                        << "Note: " << mCreator->getResourceType()
  238|  3.86k|                        << " instance '" << mName << "' was defined as manually "
  239|  3.86k|                        << "loaded, but no manual loader was provided. This Resource "
  240|  3.86k|                        << "will be lost if it has to be reloaded.";
  241|  3.86k|                }
  242|  3.86k|                postLoadImpl();
  243|  3.86k|            }
  244|  26.0k|            else
  245|  26.0k|            {
  246|       |
  247|  26.0k|                if (old==LOADSTATE_UNLOADED)
  ------------------
  |  Branch (247:21): [True: 26.0k, False: 0]
  ------------------
  248|  26.0k|                {
  249|  26.0k|                    prepareImpl();
  250|       |
  251|  26.0k|                    if (!background)
  ------------------
  |  Branch (251:25): [True: 0, False: 26.0k]
  ------------------
  252|      0|                        _firePreparingComplete();
  253|  26.0k|                }
  254|       |
  255|  26.0k|                preLoadImpl();
  256|       |
  257|  26.0k|                if (mGroup == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (257:21): [True: 0, False: 26.0k]
  ------------------
  258|      0|                {
  259|       |                    // Derive resource group
  260|      0|                    changeGroupOwnership(
  261|      0|                        ResourceGroupManager::getSingleton()
  262|      0|                        .findGroupContainingResource(mName));
  263|      0|                }
  264|       |
  265|  26.0k|                loadImpl();
  266|       |
  267|  26.0k|                postLoadImpl();
  268|  26.0k|            }
  269|       |
  270|       |            // Calculate resource size
  271|  29.9k|            mSize = calculateSize();
  272|       |
  273|  29.9k|        }
  274|  29.9k|        catch (...)
  275|  29.9k|        {
  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|  26.0k|            mLoadingState.store(LOADSTATE_UNLOADED);
  281|       |
  282|  26.0k|            OGRE_LOCK_AUTO_MUTEX;
  283|  26.0k|            unloadImpl();
  284|       |
  285|       |            // Re-throw
  286|  26.0k|            throw;
  287|  26.0k|        }
  288|       |
  289|  3.86k|        mLoadingState.store(LOADSTATE_LOADED);
  290|  3.86k|        _dirtyState();
  291|       |
  292|       |        // Notify manager
  293|  3.86k|        if(mCreator)
  ------------------
  |  Branch (293:12): [True: 3.86k, False: 0]
  ------------------
  294|  3.86k|            mCreator->_notifyResourceLoaded(this);
  295|       |
  296|       |        // Fire events, if not background
  297|  3.86k|        if (!background)
  ------------------
  |  Branch (297:13): [True: 3.86k, False: 0]
  ------------------
  298|  3.86k|            _fireLoadingComplete();
  299|       |
  300|       |
  301|  3.86k|    }
_ZN4Ogre8Resource11_dirtyStateEv:
  315|   135k|    {
  316|       |        // don't worry about threading here, count only ever increases so 
  317|       |        // doesn't matter if we get a lost increment (one is enough)
  318|   135k|        ++mStateCount;  
  319|   135k|    }
_ZN4Ogre8Resource6unloadEv:
  333|  4.86k|    { 
  334|       |        // Early-out without lock (mitigate perf cost of ensuring unloaded)
  335|  4.86k|        LoadingState old = mLoadingState.load();
  336|  4.86k|        if (old!=LOADSTATE_LOADED && old!=LOADSTATE_PREPARED) return;
  ------------------
  |  Branch (336:13): [True: 998, False: 3.86k]
  |  Branch (336:38): [True: 0, False: 998]
  ------------------
  337|       |
  338|       |
  339|  4.86k|        if (!mLoadingState.compare_exchange_strong(old,LOADSTATE_UNLOADING)) return;
  ------------------
  |  Branch (339:13): [True: 0, False: 4.86k]
  ------------------
  340|       |
  341|       |        // Scope lock for actual unload
  342|  4.86k|        {
  343|  4.86k|                    OGRE_LOCK_AUTO_MUTEX;
  344|  4.86k|            if (old==LOADSTATE_PREPARED) {
  ------------------
  |  Branch (344:17): [True: 998, False: 3.86k]
  ------------------
  345|    998|                unprepareImpl();
  346|  3.86k|            } else {
  347|  3.86k|                preUnloadImpl();
  348|  3.86k|                unloadImpl();
  349|  3.86k|                postUnloadImpl();
  350|  3.86k|            }
  351|  4.86k|        }
  352|       |
  353|  4.86k|        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|  4.86k|        if(old==LOADSTATE_LOADED && mCreator)
  ------------------
  |  Branch (358:12): [True: 3.86k, False: 998]
  |  Branch (358:37): [True: 3.86k, False: 0]
  ------------------
  359|  3.86k|            mCreator->_notifyResourceUnloaded(this);
  360|       |
  361|  4.86k|        _fireUnloadingComplete();
  362|       |
  363|       |
  364|  4.86k|    }
_ZN4Ogre8Resource20_fireLoadingCompleteEb:
  399|  3.86k|    {
  400|  3.86k|        ListenerList listenerList;
  401|  3.86k|        {
  402|       |            // Lock the listener list and make a copy of it
  403|  3.86k|            OGRE_LOCK_MUTEX(mListenerListMutex);
  404|  3.86k|            listenerList = mListenerList;
  405|  3.86k|        }
  406|  3.86k|        for (auto& l : listenerList)
  ------------------
  |  Branch (406:22): [True: 0, False: 3.86k]
  ------------------
  407|      0|        {
  408|      0|            l->loadingComplete(this);
  409|      0|        }
  410|  3.86k|    }
_ZN4Ogre8Resource22_firePreparingCompleteEb:
  413|    998|    {
  414|    998|        ListenerList listenerList;
  415|    998|        {
  416|       |            // Lock the listener list and make a copy of it
  417|    998|            OGRE_LOCK_MUTEX(mListenerListMutex);
  418|    998|            listenerList = mListenerList;
  419|    998|        }
  420|    998|        for (auto& l : listenerList)
  ------------------
  |  Branch (420:22): [True: 0, False: 998]
  ------------------
  421|      0|        {
  422|      0|            l->preparingComplete(this);
  423|      0|        }
  424|    998|    }
_ZN4Ogre8Resource22_fireUnloadingCompleteEv:
  427|  4.86k|    {
  428|  4.86k|        ListenerList listenerList;
  429|  4.86k|        {
  430|       |            // Lock the listener list and make a copy of it
  431|  4.86k|            OGRE_LOCK_MUTEX(mListenerListMutex);
  432|  4.86k|            listenerList = mListenerList;
  433|  4.86k|        }
  434|  4.86k|        for (auto& l : listenerList)
  ------------------
  |  Branch (434:22): [True: 0, False: 4.86k]
  ------------------
  435|      0|        {
  436|      0|            l->unloadingComplete(this);
  437|      0|        }
  438|  4.86k|    }

_ZN4Ogre20ResourceGroupManager12getSingletonEv:
   40|   194k|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|   194k|    }
_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|  26.1k|    {
  516|  26.1k|        OgreAssert(!resourceName.empty(), "resourceName is empty string");
  ------------------
  |  Branch (516:9): [True: 0, False: 26.1k]
  ------------------
  517|  26.1k|        if(mLoadingListener)
  ------------------
  |  Branch (517:12): [True: 0, False: 26.1k]
  ------------------
  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|  26.1k|        ResourceGroup* grp = getResourceGroup(groupName, throwOnFailure);
  526|  26.1k|        if (!grp)
  ------------------
  |  Branch (526:13): [True: 0, False: 26.1k]
  ------------------
  527|      0|        {
  528|       |            // we only get here if throwOnFailure is false
  529|      0|            return DataStreamPtr();
  530|      0|        }
  531|       |
  532|  26.1k|        Archive* pArch = resourceExists(grp, resourceName);
  533|       |
  534|  26.1k|        if (pArch == NULL && (searchGroupsIfNotFound ||
  ------------------
  |  Branch (534:13): [True: 26.1k, False: 0]
  |  Branch (534:31): [True: 0, False: 26.1k]
  ------------------
  535|  26.1k|            groupName == AUTODETECT_RESOURCE_GROUP_NAME || grp->inGlobalPool ||
  ------------------
  |  Branch (535:13): [True: 0, False: 26.1k]
  |  Branch (535:60): [True: 26.1k, 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|  26.1k|        {
  538|  26.1k|            std::pair<Archive*, ResourceGroup*> ret = resourceExistsInAnyGroupImpl(resourceName);
  539|       |
  540|  26.1k|            if(ret.second && resourceBeingLoaded && !ret.second->inGlobalPool) {
  ------------------
  |  Branch (540:16): [True: 0, False: 26.1k]
  |  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|  26.1k|            pArch = ret.first;
  545|  26.1k|        }
  546|       |
  547|  26.1k|        if (pArch)
  ------------------
  |  Branch (547:13): [True: 0, False: 26.1k]
  ------------------
  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|  26.1k|        if(!throwOnFailure)
  ------------------
  |  Branch (555:12): [True: 0, False: 26.1k]
  ------------------
  556|      0|            return DataStreamPtr();
  557|       |
  558|  26.1k|        OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND, "Cannot locate resource " + 
  559|  26.1k|            resourceName + " in resource group " + groupName + ".", 
  560|  26.1k|            "ResourceGroupManager::openResource");
  561|       |
  562|  26.1k|    }
_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|  8.83k|    {
  870|  8.83k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (870:13): [True: 0, False: 8.83k]
  |  Branch (870:30): [True: 0, False: 0]
  ------------------
  871|      0|        {
  872|       |            // Use current group (batch loading)
  873|      0|            addCreatedResource(res, *mCurrentGroup);
  874|      0|        }
  875|  8.83k|        else
  876|  8.83k|        {
  877|       |            // Find group
  878|  8.83k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  879|  8.83k|            if (grp)
  ------------------
  |  Branch (879:17): [True: 8.83k, False: 0]
  ------------------
  880|  8.83k|            {
  881|  8.83k|                addCreatedResource(res, *grp);
  882|  8.83k|            }
  883|  8.83k|        }
  884|       |
  885|  8.83k|        fireResourceCreated(res);
  886|  8.83k|    }
_ZNK4Ogre20ResourceGroupManager22_notifyResourceRemovedERKNS_9SharedPtrINS_8ResourceEEE:
  889|  4.86k|    {
  890|  4.86k|        fireResourceRemove(res);
  891|       |
  892|  4.86k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (892:13): [True: 0, False: 4.86k]
  |  Branch (892:30): [True: 0, False: 0]
  ------------------
  893|      0|        {
  894|       |            // Do nothing - we're batch unloading so list will be cleared
  895|      0|        }
  896|  4.86k|        else
  897|  4.86k|        {
  898|       |            // Find group
  899|  4.86k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  900|  4.86k|            if (grp)
  ------------------
  |  Branch (900:17): [True: 4.86k, False: 0]
  ------------------
  901|  4.86k|            {
  902|  4.86k|                            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
  903|  4.86k|                ResourceGroup::LoadResourceOrderMap::iterator i = 
  904|  4.86k|                    grp->loadResourceOrderMap.find(
  905|  4.86k|                        res->getCreator()->getLoadingOrder());
  906|  4.86k|                if (i != grp->loadResourceOrderMap.end())
  ------------------
  |  Branch (906:21): [True: 4.86k, False: 0]
  ------------------
  907|  4.86k|                {
  908|       |                    // Iterate over the resource list and remove
  909|  4.86k|                    LoadUnloadResourceList& resList = i->second;
  910|  4.86k|                    for (LoadUnloadResourceList::iterator l = resList.begin();
  911|   395k|                        l != resList.end(); ++ l)
  ------------------
  |  Branch (911:25): [True: 395k, False: 0]
  ------------------
  912|   395k|                    {
  913|   395k|                        if ((*l).get() == res.get())
  ------------------
  |  Branch (913:29): [True: 4.86k, False: 390k]
  ------------------
  914|  4.86k|                        {
  915|       |                            // this is the one
  916|  4.86k|                            resList.erase(l);
  917|  4.86k|                            break;
  918|  4.86k|                        }
  919|   395k|                    }
  920|  4.86k|                }
  921|  4.86k|            }
  922|  4.86k|        }
  923|  4.86k|    }
_ZNK4Ogre20ResourceGroupManager18addCreatedResourceERNS_9SharedPtrINS_8ResourceEEERNS0_13ResourceGroupE:
  996|  8.83k|    {
  997|  8.83k|            OGRE_LOCK_MUTEX(grp.OGRE_AUTO_MUTEX_NAME);
  998|  8.83k|        Real order = res->getCreator()->getLoadingOrder();
  999|       |
 1000|  8.83k|        ResourceGroup::LoadResourceOrderMap::iterator i = grp.loadResourceOrderMap.find(order);
 1001|  8.83k|        LoadUnloadResourceList& loadList =
 1002|  8.83k|            i == grp.loadResourceOrderMap.end() ? grp.loadResourceOrderMap[order] : i->second;
  ------------------
  |  Branch (1002:13): [True: 3, False: 8.83k]
  ------------------
 1003|       |
 1004|  8.83k|        loadList.push_back(res);
 1005|  8.83k|    }
_ZNK4Ogre20ResourceGroupManager16getResourceGroupERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 1009|   185k|    {
 1010|   185k|        OGRE_LOCK_AUTO_MUTEX;
 1011|   185k|        ResourceGroupMap::const_iterator i = mResourceGroupMap.find(name);
 1012|       |
 1013|   185k|        if (i == mResourceGroupMap.end())
  ------------------
  |  Branch (1013:13): [True: 3, False: 185k]
  ------------------
 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|   185k|        return i->second;
 1022|   185k|    }
_ZNK4Ogre20ResourceGroupManager19fireResourceCreatedERKNS_9SharedPtrINS_8ResourceEEE:
 1209|  8.83k|    {
 1210|  8.83k|        OGRE_LOCK_AUTO_MUTEX;
 1211|  8.83k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1211:21): [True: 0, False: 8.83k]
  ------------------
 1212|      0|        {
 1213|      0|            l->resourceCreated(resource);
 1214|      0|        }
 1215|  8.83k|    }
_ZNK4Ogre20ResourceGroupManager18fireResourceRemoveERKNS_9SharedPtrINS_8ResourceEEE:
 1218|  4.86k|    {
 1219|  4.86k|        OGRE_LOCK_AUTO_MUTEX;
 1220|  4.86k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1220:21): [True: 0, False: 4.86k]
  ------------------
 1221|      0|        {
 1222|      0|            l->resourceRemove(resource);
 1223|      0|        }
 1224|  4.86k|    }
_ZNK4Ogre20ResourceGroupManager14resourceExistsEPNS0_13ResourceGroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1323|   104k|    {
 1324|       |
 1325|   104k|            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
 1326|       |
 1327|       |        // Try indexes first
 1328|   104k|        ResourceLocationIndex::iterator rit = grp->resourceIndexCaseSensitive.find(resourceName);
 1329|   104k|        if (rit != grp->resourceIndexCaseSensitive.end())
  ------------------
  |  Branch (1329:13): [True: 0, False: 104k]
  ------------------
 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|   104k|        return NULL;
 1357|       |
 1358|   104k|    }
_ZNK4Ogre20ResourceGroupManager28resourceExistsInAnyGroupImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1380|  26.1k|    {
 1381|  26.1k|        OgreAssert(!filename.empty(), "resourceName is empty string");
  ------------------
  |  Branch (1381:9): [True: 0, False: 26.1k]
  ------------------
 1382|  26.1k|            OGRE_LOCK_AUTO_MUTEX;
 1383|       |
 1384|       |            // Iterate over resource groups and find
 1385|  26.1k|        for (const auto & i : mResourceGroupMap)
  ------------------
  |  Branch (1385:29): [True: 78.4k, False: 26.1k]
  ------------------
 1386|  78.4k|        {
 1387|  78.4k|            Archive* arch = resourceExists(i.second, filename);
 1388|  78.4k|            if (arch)
  ------------------
  |  Branch (1388:17): [True: 0, False: 78.4k]
  ------------------
 1389|      0|                return std::make_pair(arch, i.second);
 1390|  78.4k|        }
 1391|       |        // Not found
 1392|  26.1k|        return std::pair<Archive*, ResourceGroup*>();
 1393|  26.1k|    }
_ZNK4Ogre20ResourceGroupManager27isResourceGroupInGlobalPoolERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1468|   145k|    {
 1469|   145k|        return getResourceGroup(name, true)->inGlobalPool;
 1470|   145k|    }
_ZNK4Ogre20ResourceGroupManager18getLoadingListenerEv:
 1501|  8.83k|    {
 1502|  8.83k|        return mLoadingListener;
 1503|  8.83k|    }

_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|  8.83k|    {
   54|  8.83k|        OgreAssert(!name.empty(), "resource name must not be empty");
  ------------------
  |  Branch (54:9): [True: 1, False: 8.83k]
  ------------------
   55|       |
   56|       |        // Call creation implementation
   57|  8.83k|        ResourcePtr ret = ResourcePtr(
   58|  8.83k|            createImpl(name, getNextHandle(), group, isManual, loader, params));
   59|  8.83k|        if (params)
  ------------------
  |  Branch (59:13): [True: 0, False: 8.83k]
  ------------------
   60|      0|            ret->setParameterList(*params);
   61|       |
   62|  8.83k|        addImpl(ret);
   63|       |        // Tell resource group manager
   64|  8.83k|        if(ret)
  ------------------
  |  Branch (64:12): [True: 8.83k, False: 0]
  ------------------
   65|  8.83k|            ResourceGroupManager::getSingleton()._notifyResourceCreated(ret);
   66|  8.83k|        return ret;
   67|       |
   68|  8.83k|    }
_ZN4Ogre15ResourceManager16createOrRetrieveERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   75|  26.1k|    {
   76|       |        // Lock for the whole get / insert
   77|  26.1k|            OGRE_LOCK_AUTO_MUTEX;
   78|       |
   79|  26.1k|        ResourcePtr res = getResourceByName(name, group);
   80|  26.1k|        bool created = false;
   81|  26.1k|        if (!res)
  ------------------
  |  Branch (81:13): [True: 3.96k, False: 22.1k]
  ------------------
   82|  3.96k|        {
   83|  3.96k|            created = true;
   84|  3.96k|            res = createResource(name, group, isManual, loader, params);
   85|  3.96k|        }
   86|       |
   87|  26.1k|        return ResourceCreateOrRetrieveResult(res, created);
   88|  26.1k|    }
_ZN4Ogre15ResourceManager7prepareERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
   93|    105|    {
   94|    105|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
   95|       |        // ensure prepared
   96|    105|        r->prepare(backgroundThread);
   97|    105|        return r;
   98|    105|    }
_ZN4Ogre15ResourceManager4loadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
  103|  26.0k|    {
  104|  26.0k|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
  105|       |        // ensure loaded
  106|  26.0k|        r->load(backgroundThread);
  107|       |
  108|  26.0k|        return r;
  109|  26.0k|    }
_ZN4Ogre15ResourceManager7addImplERNS_9SharedPtrINS_8ResourceEEE:
  112|  8.83k|    {
  113|  8.83k|            OGRE_LOCK_AUTO_MUTEX;
  114|       |
  115|  8.83k|            std::pair<ResourceMap::iterator, bool> result;
  116|  8.83k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (116:12): [True: 8.83k, False: 0]
  ------------------
  117|  8.83k|        {
  118|  8.83k|            result = mResources.emplace(res->getName(), res);
  119|  8.83k|        }
  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|  8.83k|        ResourceLoadingListener* listener = ResourceGroupManager::getSingleton().getLoadingListener();
  129|  8.83k|        if (!result.second && listener)
  ------------------
  |  Branch (129:13): [True: 0, False: 8.83k]
  |  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|  8.83k|        if (!result.second)
  ------------------
  |  Branch (150:13): [True: 0, False: 8.83k]
  ------------------
  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|  8.83k|        std::pair<ResourceHandleMap::iterator, bool> resultHandle = mResourcesByHandle.emplace(res->getHandle(), res);
  158|  8.83k|        if (!resultHandle.second)
  ------------------
  |  Branch (158:13): [True: 0, False: 8.83k]
  ------------------
  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|  8.83k|    }
_ZN4Ogre15ResourceManager10removeImplERKNS_9SharedPtrINS_8ResourceEEE:
  167|  4.86k|    {
  168|  4.86k|        OgreAssert(res, "attempting to remove nullptr");
  ------------------
  |  Branch (168:9): [True: 0, False: 4.86k]
  ------------------
  169|       |
  170|  4.86k|#if OGRE_RESOURCEMANAGER_STRICT
  171|  4.86k|        if (res->getCreator() != this)
  ------------------
  |  Branch (171:13): [True: 0, False: 4.86k]
  ------------------
  172|  4.86k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Resource '" + res->getName() + "' was not created by the '" +
  173|  4.86k|                                                          getResourceType() + "' ResourceManager");
  174|  4.86k|#endif
  175|       |
  176|  4.86k|        OGRE_LOCK_AUTO_MUTEX;
  177|       |
  178|  4.86k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (178:12): [True: 4.86k, False: 0]
  ------------------
  179|  4.86k|        {
  180|  4.86k|            ResourceMap::iterator nameIt = mResources.find(res->getName());
  181|  4.86k|            if (nameIt != mResources.end())
  ------------------
  |  Branch (181:17): [True: 4.86k, False: 0]
  ------------------
  182|  4.86k|            {
  183|  4.86k|                mResources.erase(nameIt);
  184|  4.86k|            }
  185|  4.86k|        }
  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|  4.86k|        ResourceHandleMap::iterator handleIt = mResourcesByHandle.find(res->getHandle());
  205|  4.86k|        if (handleIt != mResourcesByHandle.end())
  ------------------
  |  Branch (205:13): [True: 4.86k, False: 0]
  ------------------
  206|  4.86k|        {
  207|  4.86k|            mResourcesByHandle.erase(handleIt);
  208|  4.86k|        }
  209|       |        // Tell resource group manager
  210|  4.86k|        ResourceGroupManager::getSingleton()._notifyResourceRemoved(res);
  211|  4.86k|    }
_ZN4Ogre15ResourceManager6removeERKNS_9SharedPtrINS_8ResourceEEE:
  298|  4.86k|    {
  299|  4.86k|        removeImpl(res);
  300|  4.86k|    }
_ZNK4Ogre15ResourceManager17getResourceByNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  368|   131k|    {
  369|   131k|        OGRE_LOCK_AUTO_MUTEX;
  370|       |
  371|       |        // resource should be in global pool
  372|   131k|        bool isGlobal = ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(groupName);
  373|       |
  374|   131k|        if(isGlobal)
  ------------------
  |  Branch (374:12): [True: 131k, False: 0]
  ------------------
  375|   131k|        {
  376|   131k|            auto it = mResources.find(name);
  377|   131k|            if( it != mResources.end())
  ------------------
  |  Branch (377:17): [True: 22.1k, False: 109k]
  ------------------
  378|  22.1k|            {
  379|  22.1k|                return it->second;
  380|  22.1k|            }
  381|   131k|        }
  382|       |
  383|       |        // look in all grouped pools
  384|   109k|        if (groupName == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (384:13): [True: 0, False: 109k]
  ------------------
  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|   109k|        else if (!isGlobal)
  ------------------
  |  Branch (396:18): [True: 0, False: 109k]
  ------------------
  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|   109k|        return ResourcePtr();
  421|   109k|    }
_ZN4Ogre15ResourceManager13getNextHandleEv:
  431|  8.83k|    {
  432|       |        // This is an atomic operation and hence needs no locking
  433|  8.83k|        return mNextHandle++;
  434|  8.83k|    }
_ZN4Ogre15ResourceManager10checkUsageEv:
  437|  3.86k|    {
  438|  3.86k|        if (getMemoryUsage() > mMemoryBudget)
  ------------------
  |  Branch (438:13): [True: 0, False: 3.86k]
  ------------------
  439|      0|        {
  440|      0|            OGRE_LOCK_AUTO_MUTEX;
  441|       |            // unload unreferenced resources until we are within our budget again
  442|      0|            ResourceMap::iterator i, iend;
  443|      0|            iend = mResources.end();
  444|      0|            for (i = mResources.begin(); i != iend && getMemoryUsage() > mMemoryBudget; ++i)
  ------------------
  |  Branch (444:42): [True: 0, False: 0]
  |  Branch (444:55): [True: 0, False: 0]
  ------------------
  445|      0|            {
  446|       |                // A use count of 3 means that only RGM and RM have references
  447|       |                // RGM has one (this one) and RM has 2 (by name and by handle)
  448|      0|                if (i->second.use_count() == ResourceGroupManager::RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS)
  ------------------
  |  Branch (448:21): [True: 0, False: 0]
  ------------------
  449|      0|                {
  450|      0|                    Resource* res = i->second.get();
  451|      0|                    if (res->isReloadable())
  ------------------
  |  Branch (451:25): [True: 0, False: 0]
  ------------------
  452|      0|                    {
  453|      0|                        res->unload();
  454|      0|                    }
  455|      0|                }
  456|      0|            }
  457|      0|        }
  458|  3.86k|    }
_ZN4Ogre15ResourceManager21_notifyResourceLoadedEPNS_8ResourceE:
  466|  3.86k|    {
  467|  3.86k|        mMemoryUsage += res->getSize();
  468|  3.86k|        checkUsage();
  469|  3.86k|    }
_ZN4Ogre15ResourceManager23_notifyResourceUnloadedEPNS_8ResourceE:
  472|  3.86k|    {
  473|  3.86k|        mMemoryUsage -= res->getSize();
  474|  3.86k|    }

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

_ZN4Ogre10SerializerC2Ev:
   36|  38.7k|        mVersion("[Serializer_v1.00]"), // Version number
   37|  38.7k|        mFlipEndian(false)
   38|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
   39|       |        , mReportChunkErrors(true)
   40|       |#endif
   41|  38.7k|    {
   42|  38.7k|    }
_ZN4Ogre10SerializerD2Ev:
   46|  38.7k|    {
   47|  38.7k|    }
_ZN4Ogre10Serializer19determineEndiannessERKNS_9SharedPtrINS_10DataStreamEEE:
   50|  8.62k|    {
   51|  8.62k|        if (stream->tell() != 0)
  ------------------
  |  Branch (51:13): [True: 0, False: 8.62k]
  ------------------
   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|  8.62k|        uint16 dest;
   59|       |        // read header id manually (no conversion)
   60|  8.62k|        size_t actually_read = stream->read(&dest, sizeof(uint16));
   61|       |        // skip back
   62|  8.62k|        stream->skip(0 - (long)actually_read);
   63|  8.62k|        if (actually_read != sizeof(uint16))
  ------------------
  |  Branch (63:13): [True: 5, False: 8.61k]
  ------------------
   64|      5|        {
   65|       |            // end of file?
   66|      5|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   67|      5|                        "Couldn't read 16 bit header value from input stream.",
   68|      5|                        "Serializer::determineEndianness");
   69|      5|        }
   70|  8.61k|        if (dest == HEADER_STREAM_ID)
  ------------------
  |  Branch (70:13): [True: 2.19k, False: 6.42k]
  ------------------
   71|  2.19k|        {
   72|  2.19k|            mFlipEndian = false;
   73|  2.19k|        }
   74|  6.42k|        else if (dest == OTHER_ENDIAN_HEADER_STREAM_ID)
  ------------------
  |  Branch (74:18): [True: 6.38k, False: 46]
  ------------------
   75|  6.38k|        {
   76|  6.38k|            mFlipEndian = true;
   77|  6.38k|        }
   78|     46|        else
   79|     46|        {
   80|       |            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   81|     46|                "Header chunk didn't match either endian: Corrupted stream?",
   82|     46|                "Serializer::determineEndianness");
   83|     46|        }
   84|  8.61k|    }
_ZN4Ogre10Serializer14readFileHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  235|  3.76k|    {
  236|  3.76k|        unsigned short headerID;
  237|       |        
  238|       |        // Read header ID
  239|  3.76k|        readShorts(stream, &headerID, 1);
  240|       |        
  241|  3.76k|        if (headerID == HEADER_STREAM_ID)
  ------------------
  |  Branch (241:13): [True: 3.76k, False: 0]
  ------------------
  242|  3.76k|        {
  243|       |            // Read version
  244|  3.76k|            String ver = readString(stream);
  245|  3.76k|            if (ver != mVersion)
  ------------------
  |  Branch (245:17): [True: 0, False: 3.76k]
  ------------------
  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|  3.76k|        }
  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|  3.76k|    }
_ZN4Ogre10Serializer9readChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  262|   766k|    {
  263|   766k|        size_t pos = stream->tell();
  264|   766k|        unsigned short id;
  265|   766k|        readShorts(stream, &id, 1);
  266|       |        
  267|   766k|        readInts(stream, &mCurrentstreamLen, 1);
  268|       |
  269|   766k|        if (!stream->eof())
  ------------------
  |  Branch (269:13): [True: 763k, False: 2.85k]
  ------------------
  270|   763k|        {
  271|       |            // chunk size cant be smaller than the header size, and must fit within the stream
  272|   763k|            if (mCurrentstreamLen < calcChunkHeaderSize() || pos + mCurrentstreamLen > stream->size())
  ------------------
  |  Branch (272:17): [True: 883, False: 762k]
  |  Branch (272:62): [True: 1.50k, False: 761k]
  ------------------
  273|   763k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Corrupt chunk length");
  274|   763k|        }
  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|   764k|        return id;
  285|   766k|    }
_ZN4Ogre10Serializer9readBoolsERKNS_9SharedPtrINS_10DataStreamEEEPbm:
  288|   287k|    {
  289|   287k|        static_assert(sizeof(bool) == 1, "add conversion to char for your platform");
  290|   287k|        stream->read(pDest, sizeof(bool) * count);
  291|       |        // Normalize raw bytes to canonical bool values (0 or 1).
  292|       |        // A non-zero byte that is not exactly 1 can cause miscompile bugs later
  293|   574k|        for (size_t i = 0; i < count; ++i)
  ------------------
  |  Branch (293:28): [True: 287k, False: 287k]
  ------------------
  294|   287k|        {
  295|   287k|            uint8_t raw;
  296|   287k|            memcpy(&raw, &pDest[i], 1);
  297|   287k|            pDest[i] = (raw != 0);
  298|   287k|        }
  299|   287k|    }
_ZN4Ogre10Serializer10readFloatsERKNS_9SharedPtrINS_10DataStreamEEEPfm:
  302|  39.0k|    {
  303|  39.0k|        stream->read(pDest, sizeof(float) * count);
  304|  39.0k|        flipFromLittleEndian(pDest, sizeof(float), count);
  305|  39.0k|    }
_ZN4Ogre10Serializer10readShortsERKNS_9SharedPtrINS_10DataStreamEEEPtm:
  323|  1.09M|    {
  324|  1.09M|        stream->read(pDest, sizeof(unsigned short) * count);
  325|  1.09M|        flipFromLittleEndian(pDest, sizeof(unsigned short), count);
  326|  1.09M|    }
_ZN4Ogre10Serializer8readIntsERKNS_9SharedPtrINS_10DataStreamEEEPjm:
  329|  1.02M|    {
  330|  1.02M|        stream->read(pDest, sizeof(uint32) * count);
  331|  1.02M|        flipFromLittleEndian(pDest, sizeof(uint32), count);
  332|  1.02M|    }
_ZN4Ogre10Serializer10readStringERKNS_9SharedPtrINS_10DataStreamEEE:
  335|   205k|    {
  336|   205k|        return stream->getLine(false);
  337|   205k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_6VectorILi3EfEE:
  356|  1.84k|    {
  357|  1.84k|        readFloats(stream, pDest.ptr(), 3);
  358|  1.84k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_10QuaternionE:
  361|  1.61k|    {
  362|  1.61k|        float tmp[4];
  363|  1.61k|        readFloats(stream, tmp, 4);
  364|  1.61k|        pDest.x = tmp[0];
  365|  1.61k|        pDest.y = tmp[1];
  366|  1.61k|        pDest.z = tmp[2];
  367|  1.61k|        pDest.w = tmp[3];
  368|  1.61k|    }
_ZN4Ogre10Serializer20flipFromLittleEndianEPvmm:
  381|  2.16M|    {
  382|  2.16M|        if(mFlipEndian)
  ------------------
  |  Branch (382:12): [True: 1.86M, False: 301k]
  ------------------
  383|  1.86M|        {
  384|  1.86M|	        Bitwise::bswapChunks(pData, size, count);
  385|  1.86M|        }
  386|  2.16M|    }
_ZN4Ogre10Serializer14pushInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  389|   348k|    {
  390|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  391|       |        mChunkSizeStack.push_back(stream->tell());
  392|       |#endif
  393|   348k|    }
_ZN4Ogre10Serializer20backpedalChunkHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  395|   312k|    {
  396|   312k|        if (!stream->eof()){
  ------------------
  |  Branch (396:13): [True: 312k, False: 0]
  ------------------
  397|   312k|            stream->skip(-(int)calcChunkHeaderSize());
  398|   312k|        }
  399|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  400|       |        mChunkSizeStack.back() = stream->tell();
  401|       |#endif
  402|   312k|    }
_ZN4Ogre10Serializer13popInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  404|   335k|    {
  405|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  406|       |        if (!mChunkSizeStack.empty()){
  407|       |            size_t pos = stream->tell();
  408|       |            if (pos != static_cast<size_t>(mChunkSizeStack.back()) && !stream->eof() && mReportChunkErrors){
  409|       |                LogManager::getSingleton().logMessage("Corrupted chunk detected! Stream name: " + stream->getName());
  410|       |            }
  411|       |
  412|       |            mChunkSizeStack.pop_back();
  413|       |        }
  414|       |#endif
  415|   335k|    }

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

_ZN4Ogre15SkeletonManager12getSingletonEv:
   40|  28.1k|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|  28.1k|    }
_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|    998|    {
   61|    998|        return static_pointer_cast<Skeleton>(createResource(name,group,isManual,loader,createParams));
   62|    998|    }
_ZN4Ogre15SkeletonManager10createImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmS9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   72|  4.96k|    {
   73|       |        return OGRE_NEW Skeleton(this, name, handle, group, isManual, loader);
   74|  4.96k|    }

_ZN4Ogre18SkeletonSerializerC2Ev:
   42|  27.1k|    {
   43|       |        // Version number
   44|       |        // NB changed to include bone names in 1.1
   45|  27.1k|        mVersion = "[Unknown]";
   46|  27.1k|    }
_ZN4Ogre18SkeletonSerializer14importSkeletonERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  105|    998|    {
  106|       |        // Determine endianness (must be the first thing we do!)
  107|    998|        determineEndianness(stream);
  108|       |
  109|       |        // Check header
  110|    998|        unsigned short headerID;
  111|    998|        readShorts(stream, &headerID, 1);
  112|    998|        if (headerID != HEADER_STREAM_ID_EXT)
  ------------------
  |  Branch (112:13): [True: 0, False: 998]
  ------------------
  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|    998|        String ver = readString(stream);
  120|    998|        if ((ver != "[Serializer_v1.10]") &&
  ------------------
  |  Branch (120:13): [True: 941, False: 57]
  ------------------
  121|    941|            (ver != "[Serializer_v1.80]"))
  ------------------
  |  Branch (121:13): [True: 112, False: 829]
  ------------------
  122|    112|        {
  123|    112|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  124|    112|                "Invalid file: version incompatible, file reports " + String(ver),
  125|    112|                "SkeletonSerializer::importSkeleton");
  126|    112|        }
  127|    886|        mVersion = ver;
  128|       |
  129|    886|        pushInnerChunk(stream);
  130|    886|        unsigned short streamID = readChunk(stream);
  131|       |
  132|  4.31k|        while(!stream->eof())
  ------------------
  |  Branch (132:15): [True: 3.64k, False: 669]
  ------------------
  133|  3.64k|        {
  134|  3.64k|            switch (streamID)
  135|  3.64k|            {
  136|    229|            case SKELETON_BLENDMODE:
  ------------------
  |  Branch (136:13): [True: 229, False: 3.41k]
  ------------------
  137|    229|            {
  138|       |                // Optional blend mode
  139|    229|                uint16 blendMode;
  140|    229|                readShorts(stream, &blendMode, 1);
  141|    229|                pSkel->setBlendMode(static_cast<SkeletonAnimationBlendMode>(blendMode));
  142|    229|                break;
  143|      0|            }
  144|    718|            case SKELETON_BONE:
  ------------------
  |  Branch (144:13): [True: 718, False: 2.92k]
  ------------------
  145|    718|                readBone(stream, pSkel);
  146|    718|                break;
  147|     35|            case SKELETON_BONE_PARENT:
  ------------------
  |  Branch (147:13): [True: 35, False: 3.60k]
  ------------------
  148|     35|                readBoneParent(stream, pSkel);
  149|     35|                break;
  150|  2.25k|            case SKELETON_ANIMATION:
  ------------------
  |  Branch (150:13): [True: 2.25k, False: 1.38k]
  ------------------
  151|  2.25k|                readAnimation(stream, pSkel);
  152|  2.25k|                break;
  153|    105|            case SKELETON_ANIMATION_LINK:
  ------------------
  |  Branch (153:13): [True: 105, False: 3.53k]
  ------------------
  154|    105|                readSkeletonAnimationLink(stream, pSkel);
  155|    105|                break;
  156|    299|            default:
  ------------------
  |  Branch (156:13): [True: 299, False: 3.34k]
  ------------------
  157|    299|                break;
  158|  3.64k|            }
  159|       |
  160|  3.42k|            streamID = readChunk(stream);
  161|  3.42k|        }
  162|       |        // Assume bones are stored in the binding pose
  163|    669|        pSkel->setBindingPose();
  164|    669|        popInnerChunk(stream);
  165|       |
  166|    669|    }
_ZN4Ogre18SkeletonSerializer24calcBoneSizeWithoutScaleEPKNS_8SkeletonEPKNS_4BoneE:
  337|    701|    {
  338|    701|        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|    701|        size += sizeof(unsigned short);
  346|       |
  347|       |        // position
  348|    701|        size += sizeof(float) * 3;
  349|       |
  350|       |        // orientation
  351|    701|        size += sizeof(float) * 4;
  352|       |
  353|    701|        return size;
  354|    701|    }
_ZN4Ogre18SkeletonSerializer28calcKeyFrameSizeWithoutScaleEPKNS_8SkeletonEPKNS_17TransformKeyFrameE:
  432|    915|    {
  433|    915|        size_t size = SSTREAM_OVERHEAD_SIZE;
  434|       |
  435|       |        // float time                    : The time position (seconds)
  436|    915|        size += sizeof(float);
  437|       |        // Quaternion rotate            : Rotation to apply at this keyframe
  438|    915|        size += sizeof(float) * 4;
  439|       |        // Vector3 translate            : Translation to apply at this keyframe
  440|    915|        size += sizeof(float) * 3;
  441|       |
  442|    915|        return size;
  443|    915|    }
_ZN4Ogre18SkeletonSerializer8readBoneERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  446|    718|    {
  447|       |        // char* name
  448|    718|        String name = readString(stream);
  449|       |        // unsigned short handle            : handle of the bone, should be contiguous & start at 0
  450|    718|        unsigned short handle;
  451|    718|        readShorts(stream, &handle, 1);
  452|       |
  453|    718|        if (handle > pSkel->getNumBones())
  ------------------
  |  Branch (453:13): [True: 9, False: 709]
  ------------------
  454|    718|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone handles must be contiguous");
  455|       |
  456|       |        // Create new bone
  457|    709|        Bone* pBone = pSkel->createBone(name, handle);
  458|       |
  459|       |        // Vector3 position                 : position of this bone relative to parent 
  460|    709|        Vector3 pos;
  461|    709|        readObject(stream, pos);
  462|    709|        pBone->setPosition(pos);
  463|       |        // Quaternion orientation           : orientation of this bone relative to parent 
  464|    709|        Quaternion q;
  465|    709|        readObject(stream, q);
  466|    709|        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|    709|        if (mCurrentstreamLen > calcBoneSizeWithoutScale(pSkel, pBone))
  ------------------
  |  Branch (475:13): [True: 23, False: 686]
  ------------------
  476|     23|        {
  477|     23|            Vector3 scale;
  478|     23|            readObject(stream, scale);
  479|     23|            pBone->setScale(scale);
  480|     23|        }
  481|       |        
  482|    709|    }
_ZN4Ogre18SkeletonSerializer14readBoneParentERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  485|     35|    {
  486|       |        // All bones have been created by this point
  487|     35|        Bone *child, *parent;
  488|     35|        unsigned short childHandle, parentHandle;
  489|       |
  490|       |        // unsigned short handle             : child bone
  491|     35|        readShorts(stream, &childHandle, 1);
  492|       |        // unsigned short parentHandle   : parent bone
  493|     35|        readShorts(stream, &parentHandle, 1);
  494|       |
  495|     35|        auto numBones = pSkel->getBones().size();
  496|     35|        if (parentHandle >= numBones || childHandle >= numBones)
  ------------------
  |  Branch (496:13): [True: 12, False: 23]
  |  Branch (496:41): [True: 9, False: 14]
  ------------------
  497|     35|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone handle out of range");
  498|       |
  499|     14|        if (childHandle == parentHandle)
  ------------------
  |  Branch (499:13): [True: 2, False: 12]
  ------------------
  500|     14|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "A bone cannot be parent of itself");
  501|       |
  502|       |        // Find bones
  503|     12|        parent = pSkel->getBone(parentHandle);
  504|     12|        child = pSkel->getBone(childHandle);
  505|       |
  506|       |        // attach
  507|     12|        parent->addChild(child);
  508|       |
  509|     12|    }
_ZN4Ogre18SkeletonSerializer13readAnimationERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  512|  2.25k|    {
  513|       |        // char* name                       : Name of the animation
  514|  2.25k|        String name;
  515|  2.25k|        name = readString(stream);
  516|       |        // float length                      : Length of the animation in seconds
  517|  2.25k|        float len;
  518|  2.25k|        readFloats(stream, &len, 1);
  519|       |
  520|  2.25k|        Animation *pAnim = pSkel->createAnimation(name, len);
  521|       |        // Read all tracks
  522|  2.25k|        if (!stream->eof())
  ------------------
  |  Branch (522:13): [True: 2.08k, False: 173]
  ------------------
  523|  2.08k|        {
  524|  2.08k|            pushInnerChunk(stream);
  525|  2.08k|            unsigned short streamID = readChunk(stream);
  526|       |            // Optional base info is possible
  527|  2.08k|            if (streamID == SKELETON_ANIMATION_BASEINFO)
  ------------------
  |  Branch (527:17): [True: 122, False: 1.96k]
  ------------------
  528|    122|            {
  529|       |                // char baseAnimationName
  530|    122|                String baseAnimName = readString(stream);
  531|       |                // float baseKeyFrameTime
  532|    122|                float baseKeyTime;
  533|    122|                readFloats(stream, &baseKeyTime, 1);
  534|       |                
  535|    122|                pAnim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
  536|       |                
  537|    122|                if (!stream->eof())
  ------------------
  |  Branch (537:21): [True: 115, False: 7]
  ------------------
  538|    115|                {
  539|       |                    // Get next stream
  540|    115|                    streamID = readChunk(stream);
  541|    115|                }
  542|    122|            }
  543|       |            
  544|  2.27k|            while(streamID == SKELETON_ANIMATION_TRACK && !stream->eof())
  ------------------
  |  Branch (544:19): [True: 232, False: 2.03k]
  |  Branch (544:59): [True: 189, False: 43]
  ------------------
  545|    189|            {
  546|    189|                readAnimationTrack(stream, pAnim, pSkel);
  547|       |
  548|    189|                if (!stream->eof())
  ------------------
  |  Branch (548:21): [True: 127, False: 62]
  ------------------
  549|    127|                {
  550|       |                    // Get next stream
  551|    127|                    streamID = readChunk(stream);
  552|    127|                }
  553|    189|            }
  554|  2.08k|            if (!stream->eof())
  ------------------
  |  Branch (554:17): [True: 1.93k, False: 152]
  ------------------
  555|  1.93k|            {
  556|       |                // Backpedal back to start of this stream if we've found a non-track
  557|  1.93k|                backpedalChunkHeader(stream);
  558|  1.93k|            }
  559|  2.08k|            popInnerChunk(stream);
  560|  2.08k|        }
  561|  2.25k|    }
_ZN4Ogre18SkeletonSerializer18readAnimationTrackERNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_8SkeletonE:
  565|    189|    {
  566|       |        // unsigned short boneIndex     : Index of bone to apply to
  567|    189|        unsigned short boneHandle;
  568|    189|        readShorts(stream, &boneHandle, 1);
  569|       |
  570|       |        // Find bone
  571|    189|        if (boneHandle >= pSkel->getBones().size())
  ------------------
  |  Branch (571:13): [True: 4, False: 185]
  ------------------
  572|    189|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track boneHandle out of range");
  573|    185|        Bone* targetBone = pSkel->getBone(boneHandle);
  574|       |
  575|       |        // Create track
  576|    185|        NodeAnimationTrack* pTrack = anim->createNodeTrack(boneHandle, targetBone);
  577|       |
  578|       |        // Keep looking for nested keyframes
  579|    185|        if (!stream->eof())
  ------------------
  |  Branch (579:13): [True: 179, False: 6]
  ------------------
  580|    179|        {
  581|    179|            pushInnerChunk(stream);
  582|    179|            unsigned short streamID = readChunk(stream);
  583|  1.09k|            while(streamID == SKELETON_ANIMATION_TRACK_KEYFRAME && !stream->eof())
  ------------------
  |  Branch (583:19): [True: 938, False: 156]
  |  Branch (583:68): [True: 915, False: 23]
  ------------------
  584|    915|            {
  585|    915|                readKeyFrame(stream, pTrack, pSkel);
  586|       |
  587|    915|                if (!stream->eof())
  ------------------
  |  Branch (587:21): [True: 896, False: 19]
  ------------------
  588|    896|                {
  589|       |                    // Get next stream
  590|    896|                    streamID = readChunk(stream);
  591|    896|                }
  592|    915|            }
  593|    179|            if (!stream->eof())
  ------------------
  |  Branch (593:17): [True: 127, False: 52]
  ------------------
  594|    127|            {
  595|       |                // Backpedal back to start of this stream if we've found a non-keyframe
  596|    127|                backpedalChunkHeader(stream);
  597|    127|            }
  598|    179|            popInnerChunk(stream);
  599|    179|        }
  600|       |
  601|       |
  602|    185|    }
_ZN4Ogre18SkeletonSerializer12readKeyFrameERNS_9SharedPtrINS_10DataStreamEEEPNS_18NodeAnimationTrackEPNS_8SkeletonE:
  606|    915|    {
  607|       |        // float time                    : The time position (seconds)
  608|    915|        float time;
  609|    915|        readFloats(stream, &time, 1);
  610|       |
  611|    915|        TransformKeyFrame *kf = track->createNodeKeyFrame(time);
  612|       |
  613|       |        // Quaternion rotate            : Rotation to apply at this keyframe
  614|    915|        Quaternion rot;
  615|    915|        readObject(stream, rot);
  616|    915|        kf->setRotation(rot);
  617|       |        // Vector3 translate            : Translation to apply at this keyframe
  618|    915|        Vector3 trans;
  619|    915|        readObject(stream, trans);
  620|    915|        kf->setTranslate(trans);
  621|       |        // Do we have scale?
  622|    915|        if (mCurrentstreamLen > calcKeyFrameSizeWithoutScale(pSkel, kf))
  ------------------
  |  Branch (622:13): [True: 206, False: 709]
  ------------------
  623|    206|        {
  624|    206|            Vector3 scale;
  625|    206|            readObject(stream, scale);
  626|    206|            kf->setScale(scale);
  627|    206|        }
  628|    915|    }
_ZN4Ogre18SkeletonSerializer25readSkeletonAnimationLinkERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  659|    105|    {
  660|       |        // char* skeletonName
  661|    105|        String skelName = readString(stream);
  662|       |        // float scale
  663|    105|        float scale;
  664|    105|        readFloats(stream, &scale, 1);
  665|       |
  666|    105|        pSkel->addLinkedSkeletonAnimationSource(skelName, scale);
  667|       |
  668|    105|    }

_ZN4Ogre16StreamSerialiserC2ERKNS_9SharedPtrINS_10DataStreamEEENS0_6EndianEbNS0_17RealStorageFormatE:
  109|    346|        : mStream(stream)
  110|    346|        , mEndian(endianMode)
  111|    346|        , mFlipEndian(false)
  112|    346|        , mReadWriteHeader(autoHeader)
  113|    346|        , mRealFormat(realFormat)
  114|    346|    {
  115|    346|        if (mEndian != ENDIAN_AUTO)
  ------------------
  |  Branch (115:13): [True: 0, False: 346]
  ------------------
  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: 346]
  ------------------
  128|    346|    }
_ZN4Ogre16StreamSerialiserD2Ev:
  131|    346|    {
  132|       |        // really this should be empty if read/write was complete, but be tidy
  133|    346|        if (!mChunkStack.empty())
  ------------------
  |  Branch (133:13): [True: 3, False: 343]
  ------------------
  134|      3|        {
  135|      3|            LogManager::getSingleton().stream(LML_WARNING) <<
  136|      3|                "Warning: stream " << mStream->getName() << " was not fully read / written; " <<
  137|      3|                mChunkStack.size() << " chunks remain unterminated.";
  138|      3|        }
  139|    346|        for (auto & i : mChunkStack)
  ------------------
  |  Branch (139:23): [True: 3, False: 346]
  ------------------
  140|      3|            delete i;
  141|    346|        mChunkStack.clear();
  142|       |
  143|    346|    }
_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|  1.18k|    {
  166|       |        // Have we figured out the endian mode yet?
  167|  1.18k|        if (mReadWriteHeader)
  ------------------
  |  Branch (167:13): [True: 346, False: 840]
  ------------------
  168|    346|            readHeader();
  169|       |
  170|  1.18k|        OgreAssert(mEndian != ENDIAN_AUTO,
  ------------------
  |  Branch (170:9): [True: 0, False: 1.18k]
  ------------------
  171|  1.18k|                   "Endian mode has not been determined, did you disable header without setting?");
  172|       |
  173|  1.18k|        Chunk* chunk = readChunkImpl();
  174|  1.18k|        mChunkStack.push_back(chunk);
  175|       |
  176|  1.18k|        return chunk;
  177|       |
  178|  1.18k|    }
_ZN4Ogre16StreamSerialiser12readChunkEndEj:
  239|    755|    {
  240|    755|        Chunk* c = popChunk(id);
  241|       |
  242|    755|        OgreAssert(mStream, "Stream is null");
  ------------------
  |  Branch (242:9): [True: 0, False: 755]
  ------------------
  243|       |
  244|       |        // skip to the end of the chunk if we were not there already
  245|       |        // this lets us quite reading a chunk anywhere and have the read marker
  246|       |        // automatically skip to the next one
  247|    755|        if (mStream->tell() < (c->offset + CHUNK_HEADER_SIZE + c->length))
  ------------------
  |  Branch (247:13): [True: 91, False: 664]
  ------------------
  248|     91|            mStream->seek(c->offset + CHUNK_HEADER_SIZE + c->length);
  249|       |
  250|       |        OGRE_DELETE c;
  251|    755|    }
_ZN4Ogre16StreamSerialiser10readHeaderEv:
  261|    346|    {
  262|    346|        uint32 headerid = 0;
  263|    346|        size_t actually_read = mStream->read(&headerid, sizeof(uint32));
  264|       |        // skip back
  265|    346|        mStream->skip(0 - (long)actually_read);
  266|       |        // validate that this is a header chunk
  267|    346|        if (headerid == REVERSE_HEADER_ID)
  ------------------
  |  Branch (267:13): [True: 20, False: 326]
  ------------------
  268|     20|        {
  269|     20|            mFlipEndian = true;
  270|     20|        }
  271|    326|        else if (headerid == HEADER_ID)
  ------------------
  |  Branch (271:18): [True: 236, False: 90]
  ------------------
  272|    236|        {
  273|    236|            mFlipEndian = false;
  274|    236|        }
  275|     90|        else
  276|     90|        {
  277|       |            // no good
  278|     90|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, 
  279|     90|                "Cannot determine endian mode because header is missing", 
  280|     90|                "StreamSerialiser::readHeader");
  281|     90|        }
  282|    256|        determineEndianness();
  283|       |
  284|    256|        mReadWriteHeader = false;
  285|       |
  286|    256|        const Chunk* c = readChunkBegin();
  287|       |        // endian should be flipped now
  288|    256|        assert(c->id == HEADER_ID);
  289|    256|        (void)c; // Silence warning
  290|       |
  291|       |        // read real storage format
  292|    256|        bool realIsDouble;
  293|    256|        read(&realIsDouble);
  294|    256|        mRealFormat = realIsDouble? REAL_DOUBLE : REAL_FLOAT;
  ------------------
  |  Branch (294:23): [True: 52, False: 204]
  ------------------
  295|       |
  296|    256|        readChunkEnd(HEADER_ID);
  297|       |
  298|    256|    }
_ZN4Ogre16StreamSerialiser19determineEndiannessEv:
  301|    256|    {
  302|       |#if OGRE_ENDIAN == OGRE_ENDIAN_BIG
  303|       |        if (mFlipEndian)
  304|       |            mEndian = ENDIAN_LITTLE;
  305|       |        else
  306|       |            mEndian = ENDIAN_BIG;
  307|       |#else
  308|    256|        if (mFlipEndian)
  ------------------
  |  Branch (308:13): [True: 20, False: 236]
  ------------------
  309|     20|            mEndian = ENDIAN_BIG;
  310|    236|        else
  311|    236|            mEndian = ENDIAN_LITTLE;
  312|    256|#endif
  313|    256|    }
_ZNK4Ogre16StreamSerialiser11checkStreamEbbb:
  330|  6.23k|    {
  331|  6.23k|        OgreAssert(mStream, "Stream is null");
  ------------------
  |  Branch (331:9): [True: 0, False: 6.23k]
  ------------------
  332|       |
  333|  6.23k|        if (failOnEof && mStream->eof())
  ------------------
  |  Branch (333:13): [True: 6.23k, False: 0]
  |  Branch (333:26): [True: 350, False: 5.88k]
  ------------------
  334|  6.23k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Invalid operation, end of file on stream");
  335|       |
  336|  5.88k|        if (validateReadable && !mStream->isReadable())
  ------------------
  |  Branch (336:13): [True: 5.88k, False: 0]
  |  Branch (336:33): [True: 0, False: 5.88k]
  ------------------
  337|  5.88k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Invalid operation, file is not readable");
  338|       |
  339|  5.88k|        if (validateWriteable && !mStream->isWriteable())
  ------------------
  |  Branch (339:13): [True: 0, False: 5.88k]
  |  Branch (339:34): [True: 0, False: 0]
  ------------------
  340|       |            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Invalid operation, file is not writeable");
  341|  5.88k|    }
_ZN4Ogre16StreamSerialiser13readChunkImplEv:
  421|  1.00k|    {
  422|  1.00k|        auto chunk = std::make_unique<Chunk>();
  423|  1.00k|        chunk->offset = static_cast<uint32>(mStream->tell());
  424|  1.00k|        read(&chunk->id);
  425|  1.00k|        read(&chunk->version);
  426|  1.00k|        read(&chunk->length);
  427|       |
  428|  1.00k|        if (chunk->length > mStream->size() - mStream->tell())
  ------------------
  |  Branch (428:13): [True: 37, False: 970]
  ------------------
  429|  1.00k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Chunk length field exceeds remaining stream data");
  430|       |
  431|    970|        uint32 checksum;
  432|    970|        read(&checksum);
  433|       |        
  434|    970|        if (checksum != calculateChecksum(chunk.get()))
  ------------------
  |  Branch (434:13): [True: 82, False: 888]
  ------------------
  435|     82|        {
  436|       |            // no good, this is an invalid chunk
  437|     82|            uint32 off = chunk->offset;
  438|     82|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, 
  439|     82|                "Corrupt chunk detected in stream " + mStream->getName() + " at byte "
  440|     82|                + StringConverter::toString(off), 
  441|     82|                "StreamSerialiser::readChunkImpl");
  442|     82|        }
  443|       |
  444|    888|        return chunk.release();
  445|       |
  446|       |
  447|    970|    }
_ZN4Ogre16StreamSerialiser8readDataEPvmm:
  617|  6.23k|    {
  618|  6.23k|        checkStream(true, true, false);
  619|       |
  620|  6.23k|        size_t totSize = size * count;
  621|  6.23k|        mStream->read(buf, totSize);
  622|       |
  623|  6.23k|        if (mFlipEndian)
  ------------------
  |  Branch (623:13): [True: 68, False: 6.16k]
  ------------------
  624|     68|			Bitwise::bswapChunks(buf, size, count);
  625|       |
  626|  6.23k|    }
_ZN4Ogre16StreamSerialiser4readEPNS_6VectorILi3EfEEm:
  637|    586|    {
  638|  1.17k|        for (size_t i = 0; i < count; ++i, ++vec)
  ------------------
  |  Branch (638:28): [True: 586, False: 586]
  ------------------
  639|    586|        {
  640|    586|            read(vec->ptr(), 3);
  641|    586|        }
  642|    586|    }
_ZN4Ogre16StreamSerialiser4readEPNS_6VectorILi4EfEEm:
  645|    586|    {
  646|  1.17k|        for (size_t i = 0; i < count; ++i, ++vec)
  ------------------
  |  Branch (646:28): [True: 586, False: 586]
  ------------------
  647|    586|        {
  648|    586|            read(vec->ptr(), 4);
  649|    586|        }
  650|    586|    }
_ZN4Ogre16StreamSerialiser4readEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  677|    586|    {
  678|       |        // String is stored as a uint32 character count, then string
  679|    586|        uint32 len;
  680|    586|        read(&len);
  681|       |
  682|       |        // Guard against OOM from corrupt/malicious input: cap len to remaining chunk bytes
  683|    586|        OgreAssertDbg(mChunkStack.size(), "Not currently in a chunk, cannot read string length");
  684|    586|        if (len > mChunkStack.back()->length)
  ------------------
  |  Branch (684:13): [True: 394, False: 192]
  ------------------
  685|    586|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "String length field exceeds remaining chunk data");
  686|       |
  687|    192|        string->resize(len);
  688|    192|        if (len)
  ------------------
  |  Branch (688:13): [True: 80, False: 112]
  ------------------
  689|     80|            read(&(*string->begin()), len);
  690|    192|    }
_ZN4Ogre16StreamSerialiser4readEPfm:
  693|  1.75k|    {
  694|       |#if OGRE_DOUBLE_PRECISION
  695|       |        if (mRealFormat == REAL_DOUBLE)
  696|       |            readData(val, sizeof(double), count);
  697|       |        else
  698|       |            readFloatsAsDoubles(val, count);
  699|       |#else
  700|  1.75k|        if (mRealFormat == REAL_FLOAT)
  ------------------
  |  Branch (700:13): [True: 1.17k, False: 588]
  ------------------
  701|  1.17k|            readData(val, sizeof(float), count);
  702|    588|        else
  703|    588|            readDoublesAsFloats(val, count);
  704|  1.75k|#endif
  705|       |
  706|  1.75k|    }
_ZN4Ogre16StreamSerialiser4readEPbm:
  785|    170|    {
  786|    340|        for (size_t i = 0; i < count; ++i, ++val)
  ------------------
  |  Branch (786:28): [True: 170, False: 170]
  ------------------
  787|    170|        {
  788|    170|            char c;
  789|    170|            read(&c);
  790|    170|            *val = (c == 1);
  791|    170|        }
  792|    170|    }
_ZN4Ogre16StreamSerialiser19readDoublesAsFloatsEPfm:
  813|    588|    {
  814|    588|        double t = 0;
  815|    588|        readConverted(val, t, count);
  816|    588|    }
_ZN4Ogre16StreamSerialiser17calculateChecksumEPNS0_5ChunkE:
  819|    838|    {
  820|       |        // Always calculate checksums in little endian to make sure they match 
  821|       |        // Otherwise checksums for the same data on different endians will not match
  822|    838|        uint32 id = c->id;
  823|    838|        uint16 version = c->version;
  824|    838|        uint32 length = c->length;
  825|       |#if OGRE_ENDIAN == OGRE_ENDIAN_BIG
  826|       |		Bitwise::bswapBuffer(&id, sizeof(uint32));
  827|       |		Bitwise::bswapBuffer(&version, sizeof(uint16));
  828|       |		Bitwise::bswapBuffer(&length, sizeof(uint32));
  829|       |#endif
  830|       |
  831|       |		// we cannot switch to murmur3 like everywhere else to allow loading legacy files
  832|    838|        uint32 hashVal = SuperFastHash((const char*)&id, sizeof(uint32), 0);
  833|    838|        hashVal = SuperFastHash((const char*)&version, sizeof(uint16), hashVal);
  834|    838|        hashVal = SuperFastHash((const char*)&length, sizeof(uint32), hashVal);
  835|       |
  836|    838|        return hashVal;
  837|    838|    }
_ZN4Ogre16StreamSerialiser8popChunkEj:
  840|    755|    {
  841|    755|        OgreAssert(!mChunkStack.empty(), "No active chunk!");
  ------------------
  |  Branch (841:9): [True: 0, False: 755]
  ------------------
  842|       |
  843|    755|        const Chunk* chunk = mChunkStack.back();
  844|    755|        OgreAssert(chunk->id == id, "Incorrect chunk id!");
  ------------------
  |  Branch (844:9): [True: 2, False: 753]
  ------------------
  845|       |
  846|    753|        Chunk* c = mChunkStack.back();
  847|    753|        mChunkStack.pop_back();
  848|    753|        return c;
  849|       |
  850|    755|    }
OgreStreamSerialiser.cpp:_ZN4OgreL13SuperFastHashEPKcij:
   40|  2.51k|    {
   41|  2.51k|#if OGRE_ENDIAN == OGRE_ENDIAN_LITTLE
   42|  2.51k|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
   43|       |#else
   44|       |    // Cast to uint16 in little endian means first byte is least significant
   45|       |    // replicate that here
   46|       |#  define OGRE_GET16BITS(d) (*((const uint8 *) (d)) + (*((const uint8 *) (d+1))<<8))
   47|       |#endif
   48|  2.51k|        uint32 hash;
   49|  2.51k|        int rem;
   50|       |
   51|  2.51k|        if (hashSoFar)
  ------------------
  |  Branch (51:13): [True: 1.67k, False: 838]
  ------------------
   52|  1.67k|            hash = hashSoFar;
   53|    838|        else
   54|    838|            hash = len;
   55|       |
   56|  2.51k|        if (len <= 0 || data == NULL) return 0;
  ------------------
  |  Branch (56:13): [True: 0, False: 2.51k]
  |  Branch (56:25): [True: 0, False: 2.51k]
  ------------------
   57|       |
   58|  2.51k|        rem = len & 3;
   59|  2.51k|        len >>= 2;
   60|       |
   61|       |        /* Main loop */
   62|  4.19k|        for (;len > 0; len--) {
  ------------------
  |  Branch (62:15): [True: 1.67k, False: 2.51k]
  ------------------
   63|  1.67k|            hash  += OGRE_GET16BITS (data);
  ------------------
  |  |   42|  1.67k|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
   64|  1.67k|            uint32 tmp    = (OGRE_GET16BITS (data+2) << 11) ^ hash;
  ------------------
  |  |   42|  1.67k|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
   65|  1.67k|            hash   = (hash << 16) ^ tmp;
   66|  1.67k|            data  += 2*sizeof (uint16);
   67|  1.67k|            hash  += hash >> 11;
   68|  1.67k|        }
   69|       |
   70|       |        /* Handle end cases */
   71|  2.51k|        switch (rem) {
  ------------------
  |  Branch (71:17): [True: 838, False: 1.67k]
  ------------------
   72|      0|        case 3: hash += OGRE_GET16BITS (data);
  ------------------
  |  |   42|      0|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
  |  Branch (72:9): [True: 0, False: 2.51k]
  ------------------
   73|      0|            hash ^= hash << 16;
   74|      0|            hash ^= data[sizeof (uint16)] << 18;
   75|      0|            hash += hash >> 11;
   76|      0|            break;
   77|    838|        case 2: hash += OGRE_GET16BITS (data);
  ------------------
  |  |   42|    838|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
  |  Branch (77:9): [True: 838, False: 1.67k]
  ------------------
   78|    838|            hash ^= hash << 11;
   79|    838|            hash += hash >> 17;
   80|    838|            break;
   81|      0|        case 1: hash += *data;
  ------------------
  |  Branch (81:9): [True: 0, False: 2.51k]
  ------------------
   82|      0|            hash ^= hash << 10;
   83|      0|            hash += hash >> 1;
   84|  2.51k|        }
   85|       |
   86|       |        /* Force "avalanching" of final 127 bits */
   87|  2.51k|        hash ^= hash << 3;
   88|  2.51k|        hash += hash >> 5;
   89|  2.51k|        hash ^= hash << 4;
   90|  2.51k|        hash += hash >> 17;
   91|  2.51k|        hash ^= hash << 25;
   92|  2.51k|        hash += hash >> 6;
   93|       |
   94|  2.51k|        return hash;
   95|  2.51k|#undef OGRE_GET16BITS
   96|  2.51k|    }

_ZN4Ogre10StringUtil4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbb:
   42|  80.7k|    {
   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|  80.7k|        static const String delims = " \t\r\n";
   67|  80.7k|        if(right)
  ------------------
  |  Branch (67:12): [True: 80.7k, False: 0]
  ------------------
   68|  80.7k|            str.erase(str.find_last_not_of(delims)+1); // trim right
   69|  80.7k|        if(left)
  ------------------
  |  Branch (69:12): [True: 80.7k, False: 0]
  ------------------
   70|  80.7k|            str.erase(0, str.find_first_not_of(delims)); // trim left
   71|  80.7k|    }
_ZN4Ogre10StringUtil6formatEPKcz:
  488|   105k|    {
  489|       |        // try to use a stack buffer and fall back to heap for large strings
  490|   105k|        char sbuf[1024];
  491|   105k|        size_t bsize = sizeof(sbuf);
  492|   105k|        std::vector<char> hbuf;
  493|   105k|        char* pbuf = sbuf;
  494|       |
  495|   105k|        while (true)
  ------------------
  |  Branch (495:16): [True: 105k, Folded]
  ------------------
  496|   105k|        {
  497|   105k|            va_list va;
  498|   105k|            va_start(va, fmt);
  499|   105k|            int len = vsnprintf(pbuf, bsize, fmt, va);
  500|   105k|            va_end(va);
  501|       |
  502|   105k|            OgreAssert(len >= 0, "Check format string for errors");
  ------------------
  |  Branch (502:13): [True: 0, False: 105k]
  ------------------
  503|   105k|            if (size_t(len) >= bsize)
  ------------------
  |  Branch (503:17): [True: 244, False: 105k]
  ------------------
  504|    244|            {
  505|    244|                hbuf.resize(len + 1);
  506|    244|                pbuf = hbuf.data();
  507|    244|                bsize = hbuf.size();
  508|    244|                continue;
  509|    244|            }
  510|   105k|            pbuf[bsize - 1] = 0;
  511|   105k|            return String(pbuf, len);
  512|   105k|        }
  513|   105k|    }

_ZN4Ogre15ParamDictionaryC2Ev:
   36|      2|    ParamDictionary::ParamDictionary() {}
_ZN4Ogre15ParamDictionaryD2Ev:
   37|      4|    ParamDictionary::~ParamDictionary() {}
_ZN4Ogre15StringInterface21createParamDictionaryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   72|  4.96k|    {
   73|  4.96k|        OGRE_LOCK_MUTEX( msDictionaryMutex );
   74|       |
   75|  4.96k|        ParamDictionaryMap::iterator it = msDictionary.find(className);
   76|       |
   77|  4.96k|        if ( it == msDictionary.end() )
  ------------------
  |  Branch (77:14): [True: 2, False: 4.96k]
  ------------------
   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|  4.96k|        else
   84|  4.96k|        {
   85|  4.96k|            mParamDict = &it->second;
   86|  4.96k|            mParamDictName = className;
   87|  4.96k|            return false;
   88|  4.96k|        }
   89|  4.96k|    }

_ZN4Ogre7SubMeshC2Ev:
   33|   105k|        : vertexData(0)
   34|   105k|        , parent(0)
   35|   105k|        , useSharedVertices(true)
   36|   105k|        , operationType(RenderOperation::OT_TRIANGLE_LIST)
   37|   105k|        , mBoneAssignmentsOutOfDate(false)
   38|   105k|        , mVertexAnimationType(VAT_NONE)
   39|   105k|        , mVertexAnimationIncludesNormals(false)
   40|   105k|        , mBuildEdgesEnabled(true)
   41|   105k|    {
   42|       |        indexData = OGRE_NEW IndexData();
   43|   105k|    }
_ZN4Ogre7SubMeshD2Ev:
   46|   105k|    {
   47|   105k|        removeLodLevels();
   48|   105k|        OGRE_DELETE vertexData;
   49|       |        OGRE_DELETE indexData;
   50|   105k|    }
_ZN4Ogre7SubMesh17addBoneAssignmentERKNS_20VertexBoneAssignmentE:
   81|  1.35k|    {
   82|  1.35k|        OgreAssert(!useSharedVertices,
  ------------------
  |  Branch (82:9): [True: 1, False: 1.35k]
  ------------------
   83|  1.35k|                   "This SubMesh uses shared geometry, you must assign bones to the Mesh, not the SubMesh");
   84|  1.35k|        mBoneAssignments.emplace(vertBoneAssign.vertexIndex, vertBoneAssign);
   85|  1.35k|        mBoneAssignmentsOutOfDate = true;
   86|  1.35k|    }
_ZN4Ogre7SubMesh15removeLodLevelsEv:
  116|   105k|    {
  117|   105k|        LODFaceList::iterator lodi, lodend;
  118|   105k|        lodend = mLodFaceList.end();
  119|  1.10M|        for (lodi = mLodFaceList.begin(); lodi != lodend; ++lodi)
  ------------------
  |  Branch (119:43): [True: 999k, False: 105k]
  ------------------
  120|   999k|        {
  121|   999k|            OGRE_DELETE *lodi;
  122|   999k|        }
  123|       |
  124|   105k|        mLodFaceList.clear();
  125|       |
  126|   105k|    }

_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|   114k|    {
  173|   114k|        mMgr = mgr ? mgr : HardwareBufferManager::getSingletonPtr();
  ------------------
  |  Branch (173:16): [True: 0, False: 114k]
  ------------------
  174|   114k|        vertexBufferBinding = mMgr->createVertexBufferBinding();
  175|   114k|        vertexDeclaration = mMgr->createVertexDeclaration();
  176|   114k|        mDeleteDclBinding = true;
  177|   114k|        vertexCount = 0;
  178|   114k|        vertexStart = 0;
  179|   114k|        hwAnimDataItemsUsed = 0;
  180|       |
  181|   114k|    }
_ZN4Ogre10VertexDataD2Ev:
  196|   114k|    {
  197|   114k|        if (mDeleteDclBinding)
  ------------------
  |  Branch (197:13): [True: 114k, False: 0]
  ------------------
  198|   114k|        {
  199|   114k|            mMgr->destroyVertexBufferBinding(vertexBufferBinding);
  200|   114k|            mMgr->destroyVertexDeclaration(vertexDeclaration);
  201|   114k|        }
  202|   114k|    }
_ZN4Ogre10VertexData20convertVertexElementENS_21VertexElementSemanticENS_17VertexElementTypeEt:
  269|  56.1k|    {
  270|  56.1k|        auto elem = vertexDeclaration->findElementBySemantic(semantic, index);
  271|       |
  272|  56.1k|        if(!elem)
  ------------------
  |  Branch (272:12): [True: 53.5k, False: 2.58k]
  ------------------
  273|  53.5k|            return; // nothing to do
  274|       |
  275|  2.58k|        auto srcBaseType = VertexElement::getBaseType(elem->getType());
  276|  2.58k|        if (srcBaseType == VET_FLOAT1 && srcBaseType == VertexElement::getBaseType(dstType))
  ------------------
  |  Branch (276:13): [True: 377, False: 2.20k]
  |  Branch (276:42): [True: 377, False: 0]
  ------------------
  277|    377|            return; // silently ignore floatX > floatY conversions
  278|       |
  279|  2.20k|        auto srcType = elem->getType();
  280|  2.20k|        auto vbuf = vertexBufferBinding->getBuffer(elem->getSource());
  281|       |
  282|  2.20k|        uint32 newElemSize = VertexElement::getTypeSize(dstType);
  283|  2.20k|        size_t newVertexSize = vbuf->getVertexSize() - elem->getSize() + newElemSize;
  284|  2.20k|        auto newVBuf = vbuf->getManager()->createVertexBuffer(newVertexSize, vbuf->getNumVertices(), vbuf->getUsage(),
  285|  2.20k|                                                              vbuf->hasShadowBuffer());
  286|       |
  287|  2.20k|        {
  288|  2.20k|            HardwareBufferLockGuard dst(newVBuf, HardwareBuffer::HBL_DISCARD);
  289|  2.20k|            auto pDst = static_cast<uint8*>(dst.pData);
  290|       |
  291|  2.20k|            if(dstType == VET_INT_10_10_10_2_NORM)
  ------------------
  |  Branch (291:16): [True: 0, False: 2.20k]
  ------------------
  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|  2.20k|            else if(dstType == VET_FLOAT3)
  ------------------
  |  Branch (301:21): [True: 893, False: 1.31k]
  ------------------
  302|    893|            {
  303|    893|                OgreAssert(srcType == VET_INT_10_10_10_2_NORM, "unsupported conversion");
  ------------------
  |  Branch (303:17): [True: 8, False: 885]
  ------------------
  304|    885|                spliceElement(elem, vbuf, pDst, pDst, newElemSize, unpack_10_10_10_2<false>);
  305|    885|            }
  306|  1.31k|            else if(dstType == VET_FLOAT4)
  ------------------
  |  Branch (306:21): [True: 1.28k, False: 29]
  ------------------
  307|  1.28k|            {
  308|  1.28k|                OgreAssert(srcType == VET_INT_10_10_10_2_NORM, "unsupported conversion");
  ------------------
  |  Branch (308:17): [True: 11, False: 1.27k]
  ------------------
  309|  1.27k|                spliceElement(elem, vbuf, pDst, pDst, newElemSize, unpack_10_10_10_2<true>);
  310|  1.27k|            }
  311|     29|            else if(dstType == VET_HALF3)
  ------------------
  |  Branch (311:21): [True: 0, False: 29]
  ------------------
  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|     29|            else if(dstType == VET_HALF4 || dstType == VET_SHORT4 || dstType == VET_USHORT4)
  ------------------
  |  Branch (316:21): [True: 29, 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|     29|            else
  323|     29|            {
  324|     29|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "unsupported dstType");
  325|     29|            }
  326|  2.20k|        }
  327|       |
  328|       |        // Bind the new buffer
  329|  2.15k|        vertexBufferBinding->setBinding(elem->getSource(), newVBuf);
  330|  2.15k|        updateVertexDeclaration(vertexDeclaration, elem, dstType, elem->getSource());
  331|  2.15k|    }
_ZN4Ogre10VertexData19convertPackedColourENS_17VertexElementTypeES1_:
  645|   108k|    {
  646|   108k|        OgreAssert(destType == VET_UBYTE4_NORM, "Not supported");
  ------------------
  |  Branch (646:9): [True: 0, False: 108k]
  ------------------
  647|       |
  648|   108k|        const VertexBufferBinding::VertexBufferBindingMap& bindMap = 
  649|   108k|            vertexBufferBinding->getBindings();
  650|   108k|        for (auto& m : bindMap)
  ------------------
  |  Branch (650:22): [True: 7.20k, False: 108k]
  ------------------
  651|  7.20k|        {
  652|  7.20k|            const auto& elems =
  653|  7.20k|                vertexDeclaration->findElementsBySource(m.first);
  654|  7.20k|            bool conversionNeeded = false;
  655|  7.20k|            for (auto& e : elems)
  ------------------
  |  Branch (655:26): [True: 12.6k, False: 7.20k]
  ------------------
  656|  12.6k|            {
  657|  12.6k|                if (e.getType() == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (657:21): [True: 1.40k, False: 11.2k]
  ------------------
  658|  1.40k|                {
  659|  1.40k|                    conversionNeeded = true;
  660|  1.40k|                }
  661|  12.6k|            }
  662|       |
  663|  7.20k|            if (conversionNeeded)
  ------------------
  |  Branch (663:17): [True: 1.35k, False: 5.85k]
  ------------------
  664|  1.35k|            {
  665|  1.35k|                void* pBase = m.second->lock(HardwareBuffer::HBL_NORMAL);
  666|       |
  667|  9.42k|                for (size_t v = 0; v < m.second->getNumVertices(); ++v)
  ------------------
  |  Branch (667:36): [True: 8.07k, False: 1.35k]
  ------------------
  668|  8.07k|                {
  669|       |
  670|  8.07k|                    for (auto& e : elems)
  ------------------
  |  Branch (670:34): [True: 16.1k, False: 8.07k]
  ------------------
  671|  16.1k|                    {
  672|  16.1k|                        if (e.getType() == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (672:29): [True: 8.07k, False: 8.06k]
  ------------------
  673|  8.07k|                        {
  674|  8.07k|                            uint32* pRGBA;
  675|  8.07k|                            e.baseVertexPointerToElement(pBase, &pRGBA);
  676|  8.07k|                            swapPackedRB(pRGBA);
  677|  8.07k|                        }
  678|  16.1k|                    }
  679|  8.07k|                    pBase = static_cast<void*>(
  680|  8.07k|                        static_cast<char*>(pBase) + m.second->getVertexSize());
  681|  8.07k|                }
  682|  1.35k|                m.second->unlock();
  683|       |
  684|       |                // Modify the elements to reflect the changed type
  685|  1.35k|                const VertexDeclaration::VertexElementList& allelems = 
  686|  1.35k|                    vertexDeclaration->getElements();
  687|  1.35k|                unsigned short elemIndex = 0;
  688|  1.35k|                for (auto& e : allelems)
  ------------------
  |  Branch (688:30): [True: 5.26k, False: 1.35k]
  ------------------
  689|  5.26k|                {
  690|  5.26k|                    if (e.getType() == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (690:25): [True: 1.68k, False: 3.58k]
  ------------------
  691|  1.68k|                    {
  692|  1.68k|                        vertexDeclaration->modifyElement(elemIndex,
  693|  1.68k|                            e.getSource(), e.getOffset(), destType,
  694|  1.68k|                            e.getSemantic(), e.getIndex());
  695|  1.68k|                    }
  696|  5.26k|                    ++elemIndex;
  697|  5.26k|                }
  698|  1.35k|            }
  699|  7.20k|        } // each buffer
  700|   108k|    }
_ZN4Ogre9IndexDataC2Ev:
  770|   110k|    {
  771|   110k|        indexCount = 0;
  772|   110k|        indexStart = 0;
  773|       |        
  774|   110k|    }
_ZN4Ogre9IndexDataD2Ev:
  777|   110k|    {
  778|   110k|    }
OgreVertexIndexData.cpp:_ZN4OgreL13spliceElementEPKNS_13VertexElementERKNS_9SharedPtrINS_20HardwareVertexBufferEEEPhS8_jPFvS8_S8_iE:
  103|  2.15k|    {
  104|  2.15k|        auto vertexSize = srcBuf->getVertexSize();
  105|  2.15k|        auto numVerts = srcBuf->getNumVertices();
  106|       |
  107|  2.15k|        auto elemSize = elem->getSize();
  108|  2.15k|        int elemOffset = elem->getOffset();
  109|       |
  110|  2.15k|        auto postVertexOffset = elemOffset + elemSize;
  111|  2.15k|        auto postVertexSize = vertexSize - postVertexOffset;
  112|       |
  113|  2.15k|        auto elemDstSize = pDst == pElemDst ? newElemSize : 0;
  ------------------
  |  Branch (113:28): [True: 2.15k, False: 0]
  ------------------
  114|  2.15k|        size_t newVertexSize = vertexSize - elemSize + elemDstSize;
  115|  2.15k|        auto elemDstStep = pDst == pElemDst ? newVertexSize : newElemSize;
  ------------------
  |  Branch (115:28): [True: 2.15k, False: 0]
  ------------------
  116|       |
  117|  2.15k|        HardwareBufferLockGuard srcLock(srcBuf, HardwareBuffer::HBL_READ_ONLY);
  118|  2.15k|        uint8* pSrc = static_cast<uint8*>(srcLock.pData);
  119|       |
  120|  6.50k|        for (uint32 v = 0; v < numVerts; ++v)
  ------------------
  |  Branch (120:28): [True: 4.34k, False: 2.15k]
  ------------------
  121|  4.34k|        {
  122|       |            // copy and convert element from vertex
  123|  4.34k|            elemConvert(pElemDst, pSrc, elemOffset);
  124|  4.34k|            pElemDst += elemDstStep;
  125|       |
  126|       |            // copy over other data
  127|  4.34k|            if (elemOffset)
  ------------------
  |  Branch (127:17): [True: 518, False: 3.82k]
  ------------------
  128|    518|                memcpy(pDst, pSrc, elemOffset);
  129|  4.34k|            if (postVertexSize)
  ------------------
  |  Branch (129:17): [True: 3.86k, False: 482]
  ------------------
  130|  3.86k|                memcpy(pDst + elemOffset + elemDstSize, pSrc + postVertexOffset, postVertexSize);
  131|       |
  132|  4.34k|            pSrc += vertexSize;
  133|  4.34k|            pDst += newVertexSize;
  134|  4.34k|        }
  135|  2.15k|    }
OgreVertexIndexData.cpp:_ZN4OgreL23updateVertexDeclarationEPNS_17VertexDeclarationEPKNS_13VertexElementENS_17VertexElementTypeEt:
  138|  2.15k|    {
  139|  2.15k|        auto elemSize = elem->getSize();
  140|  2.15k|        auto oldElemOffset = elem->getOffset();
  141|  2.15k|        auto newElemOffset = oldElemOffset;
  142|       |
  143|  2.15k|        auto newElemSize = VertexElement::getTypeSize(newType);
  144|  2.15k|        auto oldSource = elem->getSource();
  145|       |
  146|  2.15k|        if(newSource != oldSource)
  ------------------
  |  Branch (146:12): [True: 0, False: 2.15k]
  ------------------
  147|      0|        {
  148|      0|            newElemOffset = 0;
  149|      0|            newElemSize = 0;
  150|      0|        }
  151|       |
  152|  2.15k|        uint16 idx = 0;
  153|  2.15k|        for (const auto& e : decl->getElements())
  ------------------
  |  Branch (153:28): [True: 5.73k, False: 2.15k]
  ------------------
  154|  5.73k|        {
  155|  5.73k|            if (&e == elem)
  ------------------
  |  Branch (155:17): [True: 2.15k, False: 3.57k]
  ------------------
  156|  2.15k|            {
  157|       |                // Modify element
  158|  2.15k|                decl->modifyElement(idx, newSource, newElemOffset, newType, elem->getSemantic(), elem->getIndex());
  159|  2.15k|            }
  160|  3.57k|            else if (e.getSource() == oldSource && e.getOffset() > oldElemOffset)
  ------------------
  |  Branch (160:22): [True: 2.15k, False: 1.41k]
  |  Branch (160:52): [True: 933, False: 1.22k]
  ------------------
  161|    933|            {
  162|       |                // shift elements after this one
  163|    933|                decl->modifyElement(idx, e.getSource(), e.getOffset() - elemSize + newElemSize, e.getType(),
  164|    933|                                    e.getSemantic(), e.getIndex());
  165|    933|            }
  166|  5.73k|            idx++;
  167|  5.73k|        }
  168|  2.15k|    }
OgreVertexIndexData.cpp:_ZN4OgreL12swapPackedRBEPj:
   36|  8.07k|    {
   37|  8.07k|        auto cptr = (uint8*)ptr;
   38|  8.07k|        std::swap(cptr[0], cptr[2]);
   39|  8.07k|    }
OgreVertexIndexData.cpp:_ZN4OgreL17unpack_10_10_10_2ILi0EEEvPhS1_i:
   61|  2.92k|    {
   62|  2.92k|        int_10_10_10_2* pPacked = (int_10_10_10_2*)(pSrc + elemOffset);
   63|  2.92k|        float* pFloat = (float*)(pDst + elemOffset);
   64|       |
   65|  2.92k|        pFloat[0] = float(pPacked->x) / INT10_MAX;
  ------------------
  |  |   32|  2.92k|#define INT10_MAX ((1 << 9) - 1)
  ------------------
   66|  2.92k|        pFloat[1] = float(pPacked->y) / INT10_MAX;
  ------------------
  |  |   32|  2.92k|#define INT10_MAX ((1 << 9) - 1)
  ------------------
   67|  2.92k|        pFloat[2] = float(pPacked->z) / INT10_MAX;
  ------------------
  |  |   32|  2.92k|#define INT10_MAX ((1 << 9) - 1)
  ------------------
   68|  2.92k|        if(INCLUDE_W)
  ------------------
  |  Branch (68:12): [Folded, False: 2.92k]
  ------------------
   69|      0|            pFloat[3] = pPacked->w;
   70|  2.92k|    }
OgreVertexIndexData.cpp:_ZN4OgreL17unpack_10_10_10_2ILi1EEEvPhS1_i:
   61|  1.42k|    {
   62|  1.42k|        int_10_10_10_2* pPacked = (int_10_10_10_2*)(pSrc + elemOffset);
   63|  1.42k|        float* pFloat = (float*)(pDst + elemOffset);
   64|       |
   65|  1.42k|        pFloat[0] = float(pPacked->x) / INT10_MAX;
  ------------------
  |  |   32|  1.42k|#define INT10_MAX ((1 << 9) - 1)
  ------------------
   66|  1.42k|        pFloat[1] = float(pPacked->y) / INT10_MAX;
  ------------------
  |  |   32|  1.42k|#define INT10_MAX ((1 << 9) - 1)
  ------------------
   67|  1.42k|        pFloat[2] = float(pPacked->z) / INT10_MAX;
  ------------------
  |  |   32|  1.42k|#define INT10_MAX ((1 << 9) - 1)
  ------------------
   68|  1.42k|        if(INCLUDE_W)
  ------------------
  |  Branch (68:12): [True: 1.42k, Folded]
  ------------------
   69|  1.42k|            pFloat[3] = pPacked->w;
   70|  1.42k|    }

LLVMFuzzerTestOneInput:
  167|  5.99k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  168|  5.99k|  if (size < 2)
  ------------------
  |  Branch (168:7): [True: 1, False: 5.99k]
  ------------------
  169|      1|    return 0;
  170|       |
  171|  5.99k|  global_init();
  172|       |
  173|  5.99k|  FuzzedDataProvider provider(data, size);
  174|  5.99k|  uint8_t target = provider.ConsumeIntegral<uint8_t>() % FUZZ_TARGET_COUNT;
  175|  5.99k|  auto remaining = provider.ConsumeRemainingBytes<uint8_t>();
  176|       |
  177|  5.99k|  if (remaining.empty())
  ------------------
  |  Branch (177:7): [True: 0, False: 5.99k]
  ------------------
  178|      0|    return 0;
  179|       |
  180|  5.99k|  switch (target) {
  ------------------
  |  Branch (180:11): [True: 5.99k, False: 0]
  ------------------
  181|  3.86k|  case FUZZ_MESH:
  ------------------
  |  Branch (181:3): [True: 3.86k, False: 2.12k]
  ------------------
  182|  3.86k|    fuzz_mesh(remaining.data(), remaining.size());
  183|  3.86k|    break;
  184|    998|  case FUZZ_SKELETON:
  ------------------
  |  Branch (184:3): [True: 998, False: 4.99k]
  ------------------
  185|    998|    fuzz_skeleton(remaining.data(), remaining.size());
  186|    998|    break;
  187|    781|  case FUZZ_CONFIG:
  ------------------
  |  Branch (187:3): [True: 781, False: 5.20k]
  ------------------
  188|    781|    fuzz_config(remaining.data(), remaining.size());
  189|    781|    break;
  190|    346|  case FUZZ_STREAM_SERIALISER:
  ------------------
  |  Branch (190:3): [True: 346, False: 5.64k]
  ------------------
  191|    346|    fuzz_stream_serialiser(remaining.data(), remaining.size());
  192|    346|    break;
  193|  5.99k|  }
  194|       |
  195|  5.99k|  return 0;
  196|  5.99k|}
ogre_deep_fuzz.cpp:_ZL11global_initv:
   57|  5.99k|static void global_init() {
   58|  5.99k|  if (g_initialized)
  ------------------
  |  Branch (58:7): [True: 5.98k, False: 1]
  ------------------
   59|  5.98k|    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|  3.86k|static void fuzz_mesh(const uint8_t *data, size_t size) {
   79|       |  // manual, so we can load it from memory without a file
   80|  3.86k|  auto mesh = Ogre::MeshManager::getSingleton().create("fuzz.mesh", "General", true);
   81|  3.86k|  mesh->load(); // ensure cleanup runs
   82|       |
   83|  3.86k|  Ogre::DataStreamPtr stream(
   84|  3.86k|      new Ogre::MemoryDataStream(const_cast<uint8_t *>(data), size, false, true));
   85|       |
   86|  3.86k|  Ogre::MeshSerializer serializer;
   87|  3.86k|  try {
   88|  3.86k|    serializer.importMesh(stream, mesh.get());
   89|  3.86k|  } catch (std::exception &) {
   90|  2.25k|  }
   91|       |
   92|  3.86k|  Ogre::MeshManager::getSingleton().remove(mesh);
   93|  3.86k|}
ogre_deep_fuzz.cpp:_ZL13fuzz_skeletonPKhm:
   95|    998|static void fuzz_skeleton(const uint8_t *data, size_t size) {
   96|       |  // manual, so we can load it from memory without a file
   97|    998|  auto skeleton = Ogre::SkeletonManager::getSingleton().create("fuzz.skeleton", "General", true);
   98|    998|  skeleton->prepare();   // ensure cleanup runs
   99|       |
  100|    998|  Ogre::DataStreamPtr stream(
  101|    998|      new Ogre::MemoryDataStream(const_cast<uint8_t *>(data), size, false, true));
  102|       |
  103|    998|  Ogre::SkeletonSerializer serializer;
  104|    998|  try {
  105|    998|    serializer.importSkeleton(stream, skeleton.get());
  106|    998|  } catch (std::exception &) {
  107|    463|  }
  108|       |
  109|    998|  Ogre::SkeletonManager::getSingleton().remove(skeleton);
  110|    998|}
ogre_deep_fuzz.cpp:_ZL11fuzz_configPKhm:
  112|    781|static void fuzz_config(const uint8_t *data, size_t size) {
  113|    781|  Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(
  114|    781|      "fuzz.cfg", const_cast<uint8_t *>(data), size, false, true));
  115|       |
  116|    781|  Ogre::ConfigFile cf;
  117|    781|  try {
  118|    781|    cf.load(stream);
  119|       |
  120|       |    /* Exercise iteration over parsed sections and settings */
  121|  4.89k|    for (auto &sec : cf.getSettingsBySection()) {
  ------------------
  |  Branch (121:20): [True: 4.89k, False: 781]
  ------------------
  122|  17.3k|      for (auto &kv : sec.second) {
  ------------------
  |  Branch (122:21): [True: 17.3k, False: 4.89k]
  ------------------
  123|  17.3k|        volatile const char *k = kv.first.c_str();
  124|  17.3k|        volatile const char *v = kv.second.c_str();
  125|  17.3k|        (void)k;
  126|  17.3k|        (void)v;
  127|  17.3k|      }
  128|  4.89k|    }
  129|    781|  } catch (Ogre::Exception &) {
  130|      0|  } catch (std::exception &) {
  131|      0|  }
  132|    781|}
ogre_deep_fuzz.cpp:_ZL22fuzz_stream_serialiserPKhm:
  134|    346|static void fuzz_stream_serialiser(const uint8_t *data, size_t size) {
  135|    346|  Ogre::DataStreamPtr stream(
  136|    346|      new Ogre::MemoryDataStream(const_cast<uint8_t *>(data), size, false, true));
  137|       |
  138|    346|  try {
  139|    346|    Ogre::StreamSerialiser serialiser(stream);
  140|       |
  141|       |    /* Try to read multiple chunks, exercising the chunk state machine */
  142|    932|    for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (142:21): [True: 930, False: 2]
  ------------------
  143|    930|      const Ogre::StreamSerialiser::Chunk *c = serialiser.readChunkBegin();
  144|    930|      if (!c)
  ------------------
  |  Branch (144:11): [True: 0, False: 930]
  ------------------
  145|      0|        break;
  146|       |
  147|       |      /* Try reading various data types from the chunk */
  148|    930|      Ogre::String str;
  149|    930|      try { serialiser.read(&str); } catch (...) {}
  150|       |
  151|    930|      Ogre::Real r;
  152|    586|      try { serialiser.read(&r); } catch (...) {}
  153|       |
  154|    586|      Ogre::Vector3 v3;
  155|    586|      try { serialiser.read(&v3); } catch (...) {}
  156|       |
  157|    586|      Ogre::Vector4 v4;
  158|    586|      try { serialiser.read(&v4); } catch (...) {}
  159|       |
  160|    586|      serialiser.readChunkEnd(c->id);
  161|    586|    }
  162|    346|  } catch (Ogre::Exception &) {
  163|    344|  } catch (std::exception &) {
  164|      0|  }
  165|    346|}

