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

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

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

_ZN4Ogre8KeyFrameD2Ev:
   62|  3.27k|        virtual ~KeyFrame() {}
_ZNK4Ogre8KeyFrame7getTimeEv:
   65|  24.3k|        Real getTime(void) const { return mTime; }
_ZN4Ogre19VertexMorphKeyFrameD2Ev:
  158|  1.00k|        ~VertexMorphKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrameD2Ev:
  187|  1.54k|        ~VertexPoseKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrame7PoseRefC2Etf:
  208|  2.40k|            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|  4.81k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_10DataStreamEEC2INS_16MemoryDataStreamEEEPT_:
   50|  7.37k|        explicit SharedPtr(Y* ptr) : shared_ptr<T>(ptr) {}
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_4MeshEEERKNS0_IT_EE:
   55|  4.81k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}
_ZNK4Ogre9SharedPtrINS_8SkeletonEEptEv:
   63|  1.22k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_8SkeletonEEERKNS0_IT_EE:
   55|  1.22k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmhb:
   39|  10.7k|        : HardwareBuffer(usage, useShadowBuffer),
   40|  10.7k|          mIsInstanceData(false),
   41|  10.7k|          mMgr(mgr),
   42|  10.7k|          mNumVertices(numVertices),
   43|  10.7k|          mVertexSize(vertexSize),
   44|  10.7k|          mInstanceDataStepRate(1)
   45|  10.7k|    {
   46|       |        // Calculate the size of the vertices
   47|  10.7k|        mSizeInBytes = mVertexSize * numVertices;
   48|       |
   49|       |        // Create a shadow buffer if required
   50|  10.7k|        if (useShadowBuffer)
  ------------------
  |  Branch (50:13): [True: 0, False: 10.7k]
  ------------------
   51|      0|        {
   52|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   53|      0|        }
   54|       |
   55|  10.7k|    }
_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmPNS_14HardwareBufferE:
   58|  10.7k|        : HardwareVertexBuffer(mgr, vertexSize, numVertices, delegate->getUsage(), false)
   59|  10.7k|    {
   60|  10.7k|        mDelegate.reset(delegate);
   61|  10.7k|    }
_ZN4Ogre20HardwareVertexBufferD2Ev:
   64|  10.7k|    {
   65|  10.7k|        if (mMgr)
  ------------------
  |  Branch (65:13): [True: 10.7k, False: 0]
  ------------------
   66|  10.7k|        {
   67|  10.7k|            mMgr->_notifyVertexBufferDestroyed(this);
   68|  10.7k|        }
   69|  10.7k|    }
_ZN4Ogre13VertexElementC2EtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  104|  31.5k|        : mOffset(offset), mSource(source), mIndex(index), mType(theType), mSemantic(semantic)
  105|  31.5k|    {
  106|  31.5k|    }
_ZNK4Ogre13VertexElement7getSizeEv:
  109|  45.0k|    {
  110|  45.0k|        return getTypeSize(mType);
  111|  45.0k|    }
_ZN4Ogre13VertexElement11getTypeSizeENS_17VertexElementTypeE:
  114|  48.1k|    {
  115|  48.1k|        switch(etype)
  ------------------
  |  Branch (115:16): [True: 47.3k, False: 735]
  ------------------
  116|  48.1k|        {
  117|    169|        case VET_FLOAT1:
  ------------------
  |  Branch (117:9): [True: 169, False: 47.9k]
  ------------------
  118|    169|            return sizeof(float);
  119|  3.86k|        case VET_FLOAT2:
  ------------------
  |  Branch (119:9): [True: 3.86k, False: 44.2k]
  ------------------
  120|  3.86k|            return sizeof(float)*2;
  121|  1.36k|        case VET_FLOAT3:
  ------------------
  |  Branch (121:9): [True: 1.36k, False: 46.7k]
  ------------------
  122|  1.36k|            return sizeof(float)*3;
  123|  1.76k|        case VET_FLOAT4:
  ------------------
  |  Branch (123:9): [True: 1.76k, False: 46.3k]
  ------------------
  124|  1.76k|            return sizeof(float)*4;
  125|     39|        case VET_DOUBLE1:
  ------------------
  |  Branch (125:9): [True: 39, False: 48.0k]
  ------------------
  126|     39|            return sizeof(double);
  127|      6|        case VET_DOUBLE2:
  ------------------
  |  Branch (127:9): [True: 6, False: 48.1k]
  ------------------
  128|      6|            return sizeof(double)*2;
  129|    448|        case VET_DOUBLE3:
  ------------------
  |  Branch (129:9): [True: 448, False: 47.6k]
  ------------------
  130|    448|            return sizeof(double)*3;
  131|     36|        case VET_DOUBLE4:
  ------------------
  |  Branch (131:9): [True: 36, False: 48.0k]
  ------------------
  132|     36|            return sizeof(double)*4;
  133|     84|        case VET_SHORT1:
  ------------------
  |  Branch (133:9): [True: 84, False: 48.0k]
  ------------------
  134|    106|        case VET_USHORT1:
  ------------------
  |  Branch (134:9): [True: 22, False: 48.0k]
  ------------------
  135|    139|        case VET_HALF1:
  ------------------
  |  Branch (135:9): [True: 33, False: 48.0k]
  ------------------
  136|    139|            return sizeof( short );
  137|     72|        case VET_SHORT2:
  ------------------
  |  Branch (137:9): [True: 72, False: 48.0k]
  ------------------
  138|     91|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (138:9): [True: 19, False: 48.0k]
  ------------------
  139|    133|        case VET_USHORT2:
  ------------------
  |  Branch (139:9): [True: 42, False: 48.0k]
  ------------------
  140|    195|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (140:9): [True: 62, False: 48.0k]
  ------------------
  141|    315|        case VET_HALF2:
  ------------------
  |  Branch (141:9): [True: 120, False: 47.9k]
  ------------------
  142|    315|            return sizeof( short ) * 2;
  143|     18|        case VET_SHORT3:
  ------------------
  |  Branch (143:9): [True: 18, False: 48.0k]
  ------------------
  144|     18|        case VET_USHORT3:
  ------------------
  |  Branch (144:9): [True: 0, False: 48.1k]
  ------------------
  145|    104|        case VET_HALF3:
  ------------------
  |  Branch (145:9): [True: 86, False: 48.0k]
  ------------------
  146|    104|            return sizeof( short ) * 3;
  147|     47|        case VET_SHORT4:
  ------------------
  |  Branch (147:9): [True: 47, False: 48.0k]
  ------------------
  148|     84|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (148:9): [True: 37, False: 48.0k]
  ------------------
  149|    123|        case VET_USHORT4:
  ------------------
  |  Branch (149:9): [True: 39, False: 48.0k]
  ------------------
  150|  2.98k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (150:9): [True: 2.86k, False: 45.2k]
  ------------------
  151|  4.87k|        case VET_HALF4:
  ------------------
  |  Branch (151:9): [True: 1.88k, False: 46.2k]
  ------------------
  152|  4.87k|            return sizeof( short ) * 4;
  153|     39|        case VET_INT1:
  ------------------
  |  Branch (153:9): [True: 39, False: 48.0k]
  ------------------
  154|    125|        case VET_UINT1:
  ------------------
  |  Branch (154:9): [True: 86, False: 48.0k]
  ------------------
  155|    125|            return sizeof( int );
  156|     21|        case VET_INT2:
  ------------------
  |  Branch (156:9): [True: 21, False: 48.0k]
  ------------------
  157|     46|        case VET_UINT2:
  ------------------
  |  Branch (157:9): [True: 25, False: 48.0k]
  ------------------
  158|     46|            return sizeof( int ) * 2;
  159|    443|        case VET_INT3:
  ------------------
  |  Branch (159:9): [True: 443, False: 47.6k]
  ------------------
  160|    455|        case VET_UINT3:
  ------------------
  |  Branch (160:9): [True: 12, False: 48.0k]
  ------------------
  161|    455|            return sizeof( int ) * 3;
  162|     34|        case VET_INT4:
  ------------------
  |  Branch (162:9): [True: 34, False: 48.0k]
  ------------------
  163|     34|        case VET_UINT4:
  ------------------
  |  Branch (163:9): [True: 0, False: 48.1k]
  ------------------
  164|     34|            return sizeof( int ) * 4;
  165|  5.51k|        case VET_BYTE4:
  ------------------
  |  Branch (165:9): [True: 5.51k, False: 42.5k]
  ------------------
  166|  9.50k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (166:9): [True: 3.99k, False: 44.1k]
  ------------------
  167|  10.3k|        case VET_UBYTE4:
  ------------------
  |  Branch (167:9): [True: 889, False: 47.2k]
  ------------------
  168|  10.4k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (168:9): [True: 91, False: 48.0k]
  ------------------
  169|  15.7k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (169:9): [True: 5.22k, False: 42.8k]
  ------------------
  170|  15.7k|            return sizeof(char)*4;
  171|  17.8k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (171:9): [True: 17.8k, False: 30.2k]
  ------------------
  172|  17.8k|            return 4;
  173|  48.1k|        }
  174|    735|        return 0;
  175|  48.1k|    }
_ZN4Ogre13VertexElement12getTypeCountENS_17VertexElementTypeE:
  178|  44.5k|    {
  179|  44.5k|        switch (etype)
  ------------------
  |  Branch (179:17): [True: 44.5k, False: 0]
  ------------------
  180|  44.5k|        {
  181|    359|        case VET_FLOAT1:
  ------------------
  |  Branch (181:9): [True: 359, False: 44.1k]
  ------------------
  182|    446|        case VET_SHORT1:
  ------------------
  |  Branch (182:9): [True: 87, False: 44.4k]
  ------------------
  183|    615|        case VET_USHORT1:
  ------------------
  |  Branch (183:9): [True: 169, False: 44.3k]
  ------------------
  184|    879|        case VET_UINT1:
  ------------------
  |  Branch (184:9): [True: 264, False: 44.2k]
  ------------------
  185|  1.09k|        case VET_INT1:
  ------------------
  |  Branch (185:9): [True: 217, False: 44.2k]
  ------------------
  186|  1.21k|        case VET_DOUBLE1:
  ------------------
  |  Branch (186:9): [True: 114, False: 44.3k]
  ------------------
  187|  1.58k|        case VET_HALF1:
  ------------------
  |  Branch (187:9): [True: 370, False: 44.1k]
  ------------------
  188|  1.58k|            return 1;
  189|  1.28k|        case VET_FLOAT2:
  ------------------
  |  Branch (189:9): [True: 1.28k, False: 43.2k]
  ------------------
  190|  1.48k|        case VET_SHORT2:
  ------------------
  |  Branch (190:9): [True: 199, False: 44.3k]
  ------------------
  191|  1.55k|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (191:9): [True: 70, False: 44.4k]
  ------------------
  192|  1.62k|        case VET_USHORT2:
  ------------------
  |  Branch (192:9): [True: 71, False: 44.4k]
  ------------------
  193|  1.69k|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (193:9): [True: 64, False: 44.4k]
  ------------------
  194|  1.70k|        case VET_UINT2:
  ------------------
  |  Branch (194:9): [True: 17, False: 44.4k]
  ------------------
  195|  1.72k|        case VET_INT2:
  ------------------
  |  Branch (195:9): [True: 13, False: 44.4k]
  ------------------
  196|  1.72k|        case VET_DOUBLE2:
  ------------------
  |  Branch (196:9): [True: 4, False: 44.4k]
  ------------------
  197|  1.91k|        case VET_HALF2:
  ------------------
  |  Branch (197:9): [True: 190, False: 44.3k]
  ------------------
  198|  1.91k|            return 2;
  199|     11|        case VET_FLOAT3:
  ------------------
  |  Branch (199:9): [True: 11, False: 44.4k]
  ------------------
  200|     32|        case VET_SHORT3:
  ------------------
  |  Branch (200:9): [True: 21, False: 44.4k]
  ------------------
  201|     32|        case VET_USHORT3:
  ------------------
  |  Branch (201:9): [True: 0, False: 44.5k]
  ------------------
  202|     39|        case VET_UINT3:
  ------------------
  |  Branch (202:9): [True: 7, False: 44.4k]
  ------------------
  203|     60|        case VET_INT3:
  ------------------
  |  Branch (203:9): [True: 21, False: 44.4k]
  ------------------
  204|    501|        case VET_DOUBLE3:
  ------------------
  |  Branch (204:9): [True: 441, False: 44.0k]
  ------------------
  205|    578|        case VET_HALF3:
  ------------------
  |  Branch (205:9): [True: 77, False: 44.4k]
  ------------------
  206|    578|            return 3;
  207|     12|        case VET_FLOAT4:
  ------------------
  |  Branch (207:9): [True: 12, False: 44.4k]
  ------------------
  208|     65|        case VET_SHORT4:
  ------------------
  |  Branch (208:9): [True: 53, False: 44.4k]
  ------------------
  209|     95|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (209:9): [True: 30, False: 44.4k]
  ------------------
  210|    168|        case VET_USHORT4:
  ------------------
  |  Branch (210:9): [True: 73, False: 44.4k]
  ------------------
  211|  1.12k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (211:9): [True: 955, False: 43.5k]
  ------------------
  212|  1.12k|        case VET_UINT4:
  ------------------
  |  Branch (212:9): [True: 0, False: 44.5k]
  ------------------
  213|  1.15k|        case VET_INT4:
  ------------------
  |  Branch (213:9): [True: 33, False: 44.4k]
  ------------------
  214|  1.19k|        case VET_DOUBLE4:
  ------------------
  |  Branch (214:9): [True: 34, False: 44.4k]
  ------------------
  215|  2.00k|        case VET_BYTE4:
  ------------------
  |  Branch (215:9): [True: 818, False: 43.6k]
  ------------------
  216|  2.06k|        case VET_UBYTE4:
  ------------------
  |  Branch (216:9): [True: 61, False: 44.4k]
  ------------------
  217|  10.8k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (217:9): [True: 8.73k, False: 35.7k]
  ------------------
  218|  11.0k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (218:9): [True: 220, False: 44.2k]
  ------------------
  219|  20.6k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (219:9): [True: 9.61k, False: 34.8k]
  ------------------
  220|  39.6k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (220:9): [True: 18.9k, False: 25.5k]
  ------------------
  221|  40.4k|        case VET_HALF4:
  ------------------
  |  Branch (221:9): [True: 819, False: 43.6k]
  ------------------
  222|  40.4k|            return 4;
  223|  44.5k|        }
  224|  44.5k|        OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid type", 
  225|  44.5k|            "VertexElement::getTypeCount");
  226|  44.5k|    }
_ZN4Ogre13VertexElement11getBaseTypeENS_17VertexElementTypeE:
  296|  46.4k|    {
  297|  46.4k|        switch (multiType)
  ------------------
  |  Branch (297:17): [True: 46.2k, False: 205]
  ------------------
  298|  46.4k|        {
  299|    359|            case VET_FLOAT1:
  ------------------
  |  Branch (299:13): [True: 359, False: 46.1k]
  ------------------
  300|  1.64k|            case VET_FLOAT2:
  ------------------
  |  Branch (300:13): [True: 1.28k, False: 45.1k]
  ------------------
  301|  1.76k|            case VET_FLOAT3:
  ------------------
  |  Branch (301:13): [True: 121, False: 46.3k]
  ------------------
  302|  1.87k|            case VET_FLOAT4:
  ------------------
  |  Branch (302:13): [True: 109, False: 46.3k]
  ------------------
  303|  1.87k|                return VET_FLOAT1;
  304|    370|            case VET_HALF1:
  ------------------
  |  Branch (304:13): [True: 370, False: 46.1k]
  ------------------
  305|    560|            case VET_HALF2:
  ------------------
  |  Branch (305:13): [True: 190, False: 46.2k]
  ------------------
  306|    637|            case VET_HALF3:
  ------------------
  |  Branch (306:13): [True: 77, False: 46.3k]
  ------------------
  307|  1.45k|            case VET_HALF4:
  ------------------
  |  Branch (307:13): [True: 820, False: 45.6k]
  ------------------
  308|  1.45k|                return VET_HALF1;
  309|    114|            case VET_DOUBLE1:
  ------------------
  |  Branch (309:13): [True: 114, False: 46.3k]
  ------------------
  310|    119|            case VET_DOUBLE2:
  ------------------
  |  Branch (310:13): [True: 5, False: 46.4k]
  ------------------
  311|    560|            case VET_DOUBLE3:
  ------------------
  |  Branch (311:13): [True: 441, False: 46.0k]
  ------------------
  312|    594|            case VET_DOUBLE4:
  ------------------
  |  Branch (312:13): [True: 34, False: 46.4k]
  ------------------
  313|    594|                return VET_DOUBLE1;
  314|    218|            case VET_INT1:
  ------------------
  |  Branch (314:13): [True: 218, False: 46.2k]
  ------------------
  315|    231|            case VET_INT2:
  ------------------
  |  Branch (315:13): [True: 13, False: 46.4k]
  ------------------
  316|    252|            case VET_INT3:
  ------------------
  |  Branch (316:13): [True: 21, False: 46.4k]
  ------------------
  317|    286|            case VET_INT4:
  ------------------
  |  Branch (317:13): [True: 34, False: 46.4k]
  ------------------
  318|    286|                return VET_INT1;
  319|    266|            case VET_UINT1:
  ------------------
  |  Branch (319:13): [True: 266, False: 46.2k]
  ------------------
  320|    284|            case VET_UINT2:
  ------------------
  |  Branch (320:13): [True: 18, False: 46.4k]
  ------------------
  321|    295|            case VET_UINT3:
  ------------------
  |  Branch (321:13): [True: 11, False: 46.4k]
  ------------------
  322|    295|            case VET_UINT4:
  ------------------
  |  Branch (322:13): [True: 0, False: 46.4k]
  ------------------
  323|    295|                return VET_UINT1;
  324|     89|            case VET_SHORT1:
  ------------------
  |  Branch (324:13): [True: 89, False: 46.3k]
  ------------------
  325|    290|            case VET_SHORT2:
  ------------------
  |  Branch (325:13): [True: 201, False: 46.2k]
  ------------------
  326|    312|            case VET_SHORT3:
  ------------------
  |  Branch (326:13): [True: 22, False: 46.4k]
  ------------------
  327|    366|            case VET_SHORT4:
  ------------------
  |  Branch (327:13): [True: 54, False: 46.4k]
  ------------------
  328|    366|                return VET_SHORT1;
  329|    172|            case VET_USHORT1:
  ------------------
  |  Branch (329:13): [True: 172, False: 46.3k]
  ------------------
  330|    243|            case VET_USHORT2:
  ------------------
  |  Branch (330:13): [True: 71, False: 46.4k]
  ------------------
  331|    243|            case VET_USHORT3:
  ------------------
  |  Branch (331:13): [True: 0, False: 46.4k]
  ------------------
  332|    316|            case VET_USHORT4:
  ------------------
  |  Branch (332:13): [True: 73, False: 46.4k]
  ------------------
  333|    316|                return VET_USHORT1;
  334|     70|            case VET_SHORT2_NORM:
  ------------------
  |  Branch (334:13): [True: 70, False: 46.4k]
  ------------------
  335|    103|            case VET_SHORT4_NORM:
  ------------------
  |  Branch (335:13): [True: 33, False: 46.4k]
  ------------------
  336|    103|                return VET_SHORT2_NORM;
  337|     66|            case VET_USHORT2_NORM:
  ------------------
  |  Branch (337:13): [True: 66, False: 46.4k]
  ------------------
  338|  1.02k|            case VET_USHORT4_NORM:
  ------------------
  |  Branch (338:13): [True: 955, False: 45.5k]
  ------------------
  339|  1.02k|                return VET_USHORT2_NORM;
  340|    818|            case VET_BYTE4:
  ------------------
  |  Branch (340:13): [True: 818, False: 45.6k]
  ------------------
  341|    818|                return VET_BYTE4;
  342|  8.73k|            case VET_BYTE4_NORM:
  ------------------
  |  Branch (342:13): [True: 8.73k, False: 37.7k]
  ------------------
  343|  8.73k|                return VET_BYTE4_NORM;
  344|     63|            case VET_UBYTE4:
  ------------------
  |  Branch (344:13): [True: 63, False: 46.4k]
  ------------------
  345|     63|                return VET_UBYTE4;
  346|    229|            case VET_UBYTE4_NORM:
  ------------------
  |  Branch (346:13): [True: 229, False: 46.2k]
  ------------------
  347|  9.84k|            case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (347:13): [True: 9.61k, False: 36.8k]
  ------------------
  348|  9.84k|                return VET_UBYTE4_NORM;
  349|  20.4k|            case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (349:13): [True: 20.4k, False: 25.9k]
  ------------------
  350|  20.4k|                return VET_INT_10_10_10_2_NORM;
  351|  46.4k|        };
  352|       |        // To keep compiler happy
  353|    205|        return VET_FLOAT1;
  354|  46.4k|    }
_ZN4Ogre17VertexDeclarationC2Ev:
  357|   107k|    {
  358|   107k|    }
_ZN4Ogre17VertexDeclarationD2Ev:
  361|   107k|    {
  362|   107k|    }
_ZNK4Ogre17VertexDeclaration11getElementsEv:
  365|  3.06k|    {
  366|  3.06k|        return mElementList;
  367|  3.06k|    }
_ZN4Ogre17VertexDeclaration10addElementEtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  372|  27.3k|    {
  373|  27.3k|        mElementList.push_back(VertexElement(source, offset, theType, semantic, index));
  374|  27.3k|        notifyChanged();
  375|  27.3k|        return mElementList.back();
  376|  27.3k|    }
_ZN4Ogre17VertexDeclaration13modifyElementEttmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  444|  4.26k|    {
  445|       |        assert(elem_index < mElementList.size() && "Index out of bounds");
  446|  4.26k|        VertexElementList::iterator i = mElementList.begin();
  447|  4.26k|        std::advance(i, elem_index);
  448|  4.26k|        (*i) = VertexElement(source, offset, theType, semantic, index);
  449|  4.26k|        notifyChanged();
  450|  4.26k|    }
_ZNK4Ogre17VertexDeclaration21findElementBySemanticENS_21VertexElementSemanticEt:
  454|  22.1k|    {
  455|  22.1k|        for (auto& e : mElementList)
  ------------------
  |  Branch (455:22): [True: 11.5k, False: 20.3k]
  ------------------
  456|  11.5k|        {
  457|  11.5k|            if (e.getSemantic() == sem && e.getIndex() == index)
  ------------------
  |  Branch (457:17): [True: 2.37k, False: 9.21k]
  |  Branch (457:43): [True: 1.76k, False: 611]
  ------------------
  458|  1.76k|            {
  459|  1.76k|                return &e;
  460|  1.76k|            }
  461|  11.5k|        }
  462|       |
  463|  20.3k|        return NULL;
  464|  22.1k|    }
_ZNK4Ogre17VertexDeclaration20findElementsBySourceEt:
  468|  14.7k|    {
  469|  14.7k|        VertexElementList retList;
  470|  14.7k|        for (auto& e : mElementList)
  ------------------
  |  Branch (470:22): [True: 39.7k, False: 14.7k]
  ------------------
  471|  39.7k|        {
  472|  39.7k|            if (e.getSource() == source)
  ------------------
  |  Branch (472:17): [True: 24.5k, False: 15.1k]
  ------------------
  473|  24.5k|            {
  474|  24.5k|                retList.push_back(e);
  475|  24.5k|            }
  476|  39.7k|        }
  477|  14.7k|        return retList;
  478|  14.7k|    }
_ZNK4Ogre17VertexDeclaration13getVertexSizeEt:
  482|  9.34k|    {
  483|  9.34k|        size_t sz = 0;
  484|  9.34k|        for (auto& e : mElementList)
  ------------------
  |  Branch (484:22): [True: 23.6k, False: 9.34k]
  ------------------
  485|  23.6k|        {
  486|  23.6k|            if (e.getSource() == source)
  ------------------
  |  Branch (486:17): [True: 14.8k, False: 8.86k]
  ------------------
  487|  14.8k|            {
  488|  14.8k|                sz += e.getSize();
  489|       |
  490|  14.8k|            }
  491|  23.6k|        }
  492|  9.34k|        return sz;
  493|  9.34k|    }
_ZN4Ogre19VertexBufferBindingC2Ev:
  676|   107k|    VertexBufferBinding::VertexBufferBinding() : mHighIndex(0)
  677|   107k|    {
  678|   107k|    }
_ZN4Ogre19VertexBufferBindingD2Ev:
  681|   107k|    {
  682|   107k|        unsetAllBindings();
  683|   107k|    }
_ZN4Ogre19VertexBufferBinding10setBindingEtRKNS_9SharedPtrINS_20HardwareVertexBufferEEE:
  686|  9.06k|    {
  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|  9.06k|        mBindingMap[index] = buffer;
  690|  9.06k|        mHighIndex = std::max(mHighIndex, (unsigned short)(index+1));
  691|  9.06k|    }
_ZN4Ogre19VertexBufferBinding16unsetAllBindingsEv:
  706|   107k|    {
  707|   107k|        mBindingMap.clear();
  708|   107k|        mHighIndex = 0;
  709|   107k|    }
_ZNK4Ogre19VertexBufferBinding11getBindingsEv:
  713|   102k|    {
  714|   102k|        return mBindingMap;
  715|   102k|    }
_ZNK4Ogre19VertexBufferBinding9getBufferEt:
  718|  1.56k|    {
  719|  1.56k|        VertexBufferBindingMap::const_iterator i = mBindingMap.find(index);
  720|  1.56k|        if (i == mBindingMap.end())
  ------------------
  |  Branch (720:13): [True: 22, False: 1.54k]
  ------------------
  721|     22|        {
  722|     22|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "No buffer is bound to that index.",
  723|     22|                "VertexBufferBinding::getBuffer");
  724|     22|        }
  725|  1.54k|        return i->second;
  726|  1.56k|    }
_ZNK4Ogre19VertexBufferBinding13isBufferBoundEt:
  729|  37.4k|    {
  730|  37.4k|        return mBindingMap.find(index) != mBindingMap.end();
  731|  37.4k|    }

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

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

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

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

_ZN4Ogre10LogManager12getSingletonEv:
   39|   170k|    {  
   40|       |        assert( msSingleton );  return ( *msSingleton );  
   41|   170k|    }
_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|   113k|    {
  126|   113k|        OGRE_LOCK_AUTO_MUTEX;
  127|   113k|        if (mDefaultLog)
  ------------------
  |  Branch (127:13): [True: 113k, False: 0]
  ------------------
  128|   113k|        {
  129|   113k|            mDefaultLog->logMessage(message, lml, maskDebug);
  130|   113k|        }
  131|   113k|    }
_ZN4Ogre10LogManager8logErrorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  134|  23.2k|    {
  135|  23.2k|        stream(LML_CRITICAL, maskDebug) << "Error: " << message;
  136|  23.2k|    }
_ZN4Ogre10LogManager10logWarningERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  139|    578|    {
  140|    578|        stream(LML_WARNING, maskDebug) << "Warning: " << message;
  141|    578|    }
_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|  56.2k|    {
  165|  56.2k|            OGRE_LOCK_AUTO_MUTEX;
  166|  56.2k|        OgreAssert(mDefaultLog, "Default log not found");
  ------------------
  |  Branch (166:9): [True: 0, False: 56.2k]
  ------------------
  167|  56.2k|        return mDefaultLog->stream(lml, maskDebug);
  168|  56.2k|    }

_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|   113k|    {
   45|       |        assert( msSingleton );  return ( *msSingleton );
   46|   113k|    }
_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|   113k|    {
   96|   113k|        return static_pointer_cast<Material>(getResourceByName(name, groupName));
   97|   113k|    }
_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|  5.26k|    {
  763|  5.26k|        const Vector3& max = aabb.getMaximum();
  764|  5.26k|        const Vector3& min = aabb.getMinimum();
  765|       |
  766|  5.26k|        Vector3 magnitude = max;
  767|  5.26k|        magnitude.makeCeil(-max);
  768|  5.26k|        magnitude.makeCeil(min);
  769|  5.26k|        magnitude.makeCeil(-min);
  770|       |
  771|  5.26k|        return magnitude.length();
  772|  5.26k|    }

_ZN4Ogre4MeshC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   45|  4.81k|        : Resource(creator, name, handle, group, isManual, loader),
   46|  4.81k|        mBoundRadius(0.0f),
   47|  4.81k|        mBoneBoundingRadius(0.0f),
   48|  4.81k|        mBoneAssignmentsOutOfDate(false),
   49|  4.81k|        mHasManualLodLevel(false),
   50|  4.81k|        mLodStrategy(LodStrategyManager::getSingleton().getDefaultStrategy()),
   51|  4.81k|        mBufferManager(0),
   52|  4.81k|        mVertexBufferUsage(HBU_GPU_ONLY),
   53|  4.81k|        mIndexBufferUsage(HBU_GPU_ONLY),
   54|  4.81k|        mVertexBufferShadowBuffer(false),
   55|  4.81k|        mIndexBufferShadowBuffer(false),
   56|  4.81k|        mPreparedForShadowVolumes(false),
   57|  4.81k|        mEdgeListsBuilt(false),
   58|  4.81k|        mAutoBuildEdgeLists(false), // will be set to true by serializers of 1.20 and below
   59|  4.81k|        mSharedVertexDataAnimationType(VAT_NONE),
   60|  4.81k|        mSharedVertexDataAnimationIncludesNormals(false),
   61|  4.81k|        mAnimationTypesDirty(true),
   62|  4.81k|        mPosesIncludeNormals(false),
   63|  4.81k|        sharedVertexData(0)
   64|  4.81k|    {
   65|       |        // Init first (manual) lod
   66|  4.81k|        MeshLodUsage lod;
   67|  4.81k|        lod.userValue = 0; // User value not used for base LOD level
   68|  4.81k|        lod.value = getLodStrategy()->getBaseValue();
   69|  4.81k|        mMeshLodUsageList.push_back(lod);
   70|  4.81k|    }
_ZN4Ogre4MeshD2Ev:
   73|  4.81k|    {
   74|  4.81k|        if (!HardwareBufferManager::getSingletonPtr()) // LogManager might be also gone already
  ------------------
  |  Branch (74:13): [True: 0, False: 4.81k]
  ------------------
   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|  4.81k|        unload();
   83|  4.81k|    }
_ZN4Ogre4Mesh24getHardwareBufferManagerEv:
   86|  96.6k|    {
   87|  96.6k|        return mBufferManager ? mBufferManager : HardwareBufferManager::getSingletonPtr();
  ------------------
  |  Branch (87:16): [True: 0, False: 96.6k]
  ------------------
   88|  96.6k|    }
_ZN4Ogre4Mesh13createSubMeshEv:
   91|   113k|    {
   92|   113k|        SubMesh* sub = OGRE_NEW SubMesh();
   93|   113k|        sub->parent = this;
   94|       |
   95|   113k|        mSubMeshList.push_back(sub);
   96|       |
   97|   113k|        if (isLoaded())
  ------------------
  |  Branch (97:13): [True: 113k, False: 0]
  ------------------
   98|   113k|            _dirtyState();
   99|       |
  100|   113k|        return sub;
  101|   113k|    }
_ZN4Ogre4Mesh11nameSubMeshERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEt:
  155|  15.3k|    {
  156|  15.3k|        mSubMeshNameMap[name] = index ;
  157|  15.3k|    }
_ZN4Ogre4Mesh12postLoadImplEv:
  174|  4.81k|    {
  175|       |        // Prepare for shadow volumes?
  176|  4.81k|        if (MeshManager::getSingleton().getPrepareAllMeshesForShadowVolumes())
  ------------------
  |  Branch (176:13): [True: 0, False: 4.81k]
  ------------------
  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|  4.81k|#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|  4.81k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (193:22): [True: 4.81k, False: 4.81k]
  ------------------
  194|  4.81k|            m.value = mLodStrategy->transformUserValue(m.userValue);
  195|       |        // Rewrite first value
  196|  4.81k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
  197|  4.81k|#endif
  198|  4.81k|    }
_ZN4Ogre4Mesh10unloadImplEv:
  242|  4.81k|    {
  243|       |        // Teardown submeshes
  244|  4.81k|        for (auto & i : mSubMeshList)
  ------------------
  |  Branch (244:23): [True: 113k, False: 4.81k]
  ------------------
  245|   113k|        {
  246|   113k|            OGRE_DELETE i;
  247|   113k|        }
  248|  4.81k|        if (sharedVertexData)
  ------------------
  |  Branch (248:13): [True: 1.09k, False: 3.71k]
  ------------------
  249|  1.09k|        {
  250|  1.09k|            resetVertexData();
  251|  1.09k|        }
  252|       |        // Clear SubMesh lists
  253|  4.81k|        mSubMeshList.clear();
  254|  4.81k|        mSubMeshNameMap.clear();
  255|       |
  256|  4.81k|        freeEdgeList();
  257|  4.81k|#if !OGRE_NO_MESHLOD
  258|       |        // Removes all LOD data
  259|  4.81k|        removeLodLevels();
  260|  4.81k|#endif
  261|  4.81k|        mPreparedForShadowVolumes = false;
  262|       |
  263|       |        // remove all poses & animations
  264|  4.81k|        removeAllAnimations();
  265|  4.81k|        removeAllPoses();
  266|       |
  267|       |        // Clear bone assignments
  268|  4.81k|        mBoneAssignments.clear();
  269|  4.81k|        mBoneAssignmentsOutOfDate = false;
  270|       |
  271|       |        // Removes reference to skeleton
  272|  4.81k|        mSkeleton.reset();
  273|  4.81k|    }
_ZN4Ogre4Mesh10_setBoundsERKNS_14AxisAlignedBoxEb:
  389|  5.26k|    {
  390|  5.26k|        mAABB = bounds;
  391|  5.26k|        mBoundRadius = Math::boundingRadiusFromAABB(mAABB);
  392|       |
  393|  5.26k|        if( mAABB.isFinite() )
  ------------------
  |  Branch (393:13): [True: 5.26k, False: 0]
  ------------------
  394|  5.26k|        {
  395|  5.26k|            Vector3 max = mAABB.getMaximum();
  396|  5.26k|            Vector3 min = mAABB.getMinimum();
  397|       |
  398|  5.26k|            if (pad)
  ------------------
  |  Branch (398:17): [True: 0, False: 5.26k]
  ------------------
  399|      0|            {
  400|       |                // Pad out the AABB a little, helps with most bounds tests
  401|      0|                Vector3 scaler = (max - min) * MeshManager::getSingleton().getBoundsPaddingFactor();
  402|      0|                mAABB.setExtents(min  - scaler, max + scaler);
  403|       |                // Pad out the sphere a little too
  404|      0|                mBoundRadius = mBoundRadius + (mBoundRadius * MeshManager::getSingleton().getBoundsPaddingFactor());
  405|      0|            }
  406|  5.26k|        }
  407|  5.26k|    }
_ZN4Ogre4Mesh24_setBoundingSphereRadiusEf:
  410|  5.26k|    {
  411|  5.26k|        mBoundRadius = radius;
  412|  5.26k|    }
_ZN4Ogre4Mesh15setSkeletonNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  481|  21.4k|    {
  482|  21.4k|        if (skelName != getSkeletonName())
  ------------------
  |  Branch (482:13): [True: 21.0k, False: 387]
  ------------------
  483|  21.0k|        {
  484|  21.0k|            if (skelName.empty())
  ------------------
  |  Branch (484:17): [True: 0, False: 21.0k]
  ------------------
  485|      0|            {
  486|       |                // No skeleton
  487|      0|                mSkeleton.reset();
  488|      0|            }
  489|  21.0k|            else
  490|  21.0k|            {
  491|       |                // Load skeleton
  492|  21.0k|                try {
  493|  21.0k|                    mSkeleton = static_pointer_cast<Skeleton>(SkeletonManager::getSingleton().load(skelName, mGroup));
  494|  21.0k|                }
  495|  21.0k|                catch (...)
  496|  21.0k|                {
  497|  21.0k|                    mSkeleton.reset();
  498|       |                    // Log this error
  499|  21.0k|                    String msg = "Unable to load skeleton '";
  500|  21.0k|                    msg += skelName + "' for Mesh '" + mName + "'. This Mesh will not be animated.";
  501|  21.0k|                    LogManager::getSingleton().logError(msg);
  502|       |
  503|  21.0k|                }
  504|       |
  505|       |
  506|  21.0k|            }
  507|  21.0k|            if (isLoaded())
  ------------------
  |  Branch (507:17): [True: 21.0k, False: 0]
  ------------------
  508|  21.0k|                _dirtyState();
  509|  21.0k|        }
  510|  21.4k|    }
_ZN4Ogre4Mesh17addBoneAssignmentERKNS_20VertexBoneAssignmentE:
  513|  2.01k|    {
  514|  2.01k|        mBoneAssignments.emplace(vertBoneAssign.vertexIndex, vertBoneAssign);
  515|  2.01k|        mBoneAssignmentsOutOfDate = true;
  516|  2.01k|    }
_ZNK4Ogre4Mesh15getSkeletonNameEv:
 1079|  21.4k|    {
 1080|  21.4k|        return mSkeleton ? mSkeleton->getName() : BLANKSTRING;
  ------------------
  |  Branch (1080:16): [True: 0, False: 21.4k]
  ------------------
 1081|  21.4k|    }
_ZN4Ogre4Mesh11_setLodInfoEt:
 1145|  5.02k|    {
 1146|  5.02k|        assert(!mEdgeListsBuilt && "Can't modify LOD after edge lists built");
 1147|       |
 1148|       |        // Basic prerequisites
 1149|  5.02k|        OgreAssert(numLevels > 0,  "Must be at least one level (full detail level must exist)");
  ------------------
  |  Branch (1149:9): [True: 0, False: 5.02k]
  ------------------
 1150|       |
 1151|  5.02k|        mMeshLodUsageList.resize(numLevels);
 1152|       |        // Resize submesh face data lists too
 1153|  5.02k|        for (auto & i : mSubMeshList)
  ------------------
  |  Branch (1153:23): [True: 2.61k, False: 5.02k]
  ------------------
 1154|  2.61k|        {
 1155|  2.61k|            i->mLodFaceList.resize(numLevels - 1);
 1156|  2.61k|        }
 1157|  5.02k|    }
_ZN4Ogre4Mesh15removeLodLevelsEv:
 1210|  4.81k|    {
 1211|  4.81k|#if !OGRE_NO_MESHLOD
 1212|       |        // Remove data from SubMeshes
 1213|  4.81k|        for (auto *isub : mSubMeshList)
  ------------------
  |  Branch (1213:25): [True: 0, False: 4.81k]
  ------------------
 1214|      0|        {
 1215|      0|            isub->removeLodLevels();
 1216|      0|        }
 1217|       |
 1218|  4.81k|        bool edgeListWasBuilt = isEdgeListBuilt();
 1219|  4.81k|        freeEdgeList();
 1220|       |
 1221|       |        // Reinitialise
 1222|  4.81k|        mMeshLodUsageList.resize(1);
 1223|  4.81k|        mMeshLodUsageList[0].edgeData = NULL;
 1224|       |
 1225|  4.81k|        if(edgeListWasBuilt)
  ------------------
  |  Branch (1225:12): [True: 0, False: 4.81k]
  ------------------
 1226|      0|            buildEdgeList();
 1227|  4.81k|#endif
 1228|  4.81k|    }
_ZN4Ogre4Mesh12freeEdgeListEv:
 1713|  9.62k|    {
 1714|  9.62k|        if (!mEdgeListsBuilt)
  ------------------
  |  Branch (1714:13): [True: 9.14k, False: 482]
  ------------------
 1715|  9.14k|            return;
 1716|    482|#if !OGRE_NO_MESHLOD
 1717|       |        // Loop over LODs
 1718|    482|        unsigned short index = 0;
 1719|    482|        for (auto& usage : mMeshLodUsageList)
  ------------------
  |  Branch (1719:26): [True: 3.68k, False: 482]
  ------------------
 1720|  3.68k|        {
 1721|  3.68k|            if (usage.manualName.empty() || index == 0)
  ------------------
  |  Branch (1721:17): [True: 3.57k, False: 105]
  |  Branch (1721:45): [True: 0, False: 105]
  ------------------
 1722|  3.57k|            {
 1723|       |                // Only delete if we own this data
 1724|       |                // Manual LODs > 0 own their own
 1725|  3.57k|                OGRE_DELETE usage.edgeData;
 1726|  3.57k|            }
 1727|  3.68k|            usage.edgeData = NULL;
 1728|  3.68k|            ++index;
 1729|  3.68k|        }
 1730|       |#else
 1731|       |        OGRE_DELETE mMeshLodUsageList[0].edgeData;
 1732|       |        mMeshLodUsageList[0].edgeData = NULL;
 1733|       |#endif
 1734|    482|        mEdgeListsBuilt = false;
 1735|    482|    }
_ZNK4Ogre4Mesh13calculateSizeEv:
 2012|  4.81k|    {
 2013|       |        // calculate GPU size
 2014|  4.81k|        size_t ret = 0;
 2015|  4.81k|        unsigned short i;
 2016|       |        // Shared vertices
 2017|  4.81k|        if (sharedVertexData)
  ------------------
  |  Branch (2017:13): [True: 0, False: 4.81k]
  ------------------
 2018|      0|        {
 2019|      0|            for (i = 0;
 2020|      0|                i < sharedVertexData->vertexBufferBinding->getBufferCount();
  ------------------
  |  Branch (2020:17): [True: 0, False: 0]
  ------------------
 2021|      0|                ++i)
 2022|      0|            {
 2023|      0|                ret += sharedVertexData->vertexBufferBinding
 2024|      0|                    ->getBuffer(i)->getSizeInBytes();
 2025|      0|            }
 2026|      0|        }
 2027|       |
 2028|  4.81k|        for (auto *s : mSubMeshList)
  ------------------
  |  Branch (2028:22): [True: 0, False: 4.81k]
  ------------------
 2029|      0|        {
 2030|       |            // Dedicated vertices
 2031|      0|            if (!s->useSharedVertices)
  ------------------
  |  Branch (2031:17): [True: 0, False: 0]
  ------------------
 2032|      0|            {
 2033|      0|                for (i = 0;
 2034|      0|                    i < s->vertexData->vertexBufferBinding->getBufferCount();
  ------------------
  |  Branch (2034:21): [True: 0, False: 0]
  ------------------
 2035|      0|                    ++i)
 2036|      0|                {
 2037|      0|                    ret += s->vertexData->vertexBufferBinding
 2038|      0|                        ->getBuffer(i)->getSizeInBytes();
 2039|      0|                }
 2040|      0|            }
 2041|      0|            if (s->indexData->indexBuffer)
  ------------------
  |  Branch (2041:17): [True: 0, False: 0]
  ------------------
 2042|      0|            {
 2043|       |                // Index data
 2044|      0|                ret += s->indexData->indexBuffer->getSizeInBytes();
 2045|      0|            }
 2046|       |
 2047|      0|        }
 2048|  4.81k|        return ret;
 2049|  4.81k|    }
_ZN4Ogre4Mesh15createAnimationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
 2147|  1.15k|    {
 2148|       |        // Check name not used
 2149|  1.15k|        if (mAnimationsList.find(name) != mAnimationsList.end())
  ------------------
  |  Branch (2149:13): [True: 2, False: 1.15k]
  ------------------
 2150|      2|        {
 2151|      2|            OGRE_EXCEPT(
 2152|      2|                Exception::ERR_DUPLICATE_ITEM,
 2153|      2|                "An animation with the name " + name + " already exists",
 2154|      2|                "Mesh::createAnimation");
 2155|      2|        }
 2156|       |
 2157|  1.15k|        Animation* ret = OGRE_NEW Animation(name, length);
 2158|  1.15k|        ret->_notifyContainer(this);
 2159|       |
 2160|       |        // Add to list
 2161|  1.15k|        mAnimationsList[name] = ret;
 2162|       |
 2163|       |        // Mark animation types dirty
 2164|  1.15k|        mAnimationTypesDirty = true;
 2165|       |
 2166|  1.15k|        return ret;
 2167|       |
 2168|  1.15k|    }
_ZN4Ogre4Mesh19removeAllAnimationsEv:
 2238|  4.81k|    {
 2239|  4.81k|        for (auto& a : mAnimationsList)
  ------------------
  |  Branch (2239:22): [True: 1.15k, False: 4.81k]
  ------------------
 2240|  1.15k|        {
 2241|       |            OGRE_DELETE a.second;
 2242|  1.15k|        }
 2243|  4.81k|        mAnimationsList.clear();
 2244|  4.81k|        mAnimationTypesDirty = true;
 2245|  4.81k|    }
_ZN4Ogre4Mesh26getVertexDataByTrackHandleEt:
 2248|    408|    {
 2249|    408|        if (handle == 0)
  ------------------
  |  Branch (2249:13): [True: 377, False: 31]
  ------------------
 2250|    377|        {
 2251|    377|            return sharedVertexData;
 2252|    377|        }
 2253|     31|        else
 2254|     31|        {
 2255|     31|            return getSubMesh(handle-1)->vertexData;
 2256|     31|        }
 2257|    408|    }
_ZN4Ogre4Mesh10createPoseEtRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2260|  47.7k|    {
 2261|       |        Pose* retPose = OGRE_NEW Pose(target, name);
 2262|  47.7k|        mPoseList.push_back(retPose);
 2263|  47.7k|        return retPose;
 2264|  47.7k|    }
_ZN4Ogre4Mesh14removeAllPosesEv:
 2310|  4.81k|    {
 2311|  4.81k|        for (auto & i : mPoseList)
  ------------------
  |  Branch (2311:23): [True: 47.7k, False: 4.81k]
  ------------------
 2312|  47.7k|        {
 2313|       |            OGRE_DELETE i;
 2314|  47.7k|        }
 2315|  4.81k|        mPoseList.clear();
 2316|  4.81k|    }
_ZNK4Ogre4Mesh14getLodStrategyEv:
 2334|  4.81k|    {
 2335|  4.81k|        return mLodStrategy;
 2336|  4.81k|    }
_ZN4Ogre4Mesh14setLodStrategyEPNS_11LodStrategyE:
 2340|  6.20k|    {
 2341|  6.20k|        mLodStrategy = lodStrategy;
 2342|       |
 2343|  6.20k|        assert(mMeshLodUsageList.size());
 2344|       |
 2345|       |        // Re-transform user LOD values (starting at index 1, no need to transform base value)
 2346|  6.20k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (2346:22): [True: 6.24k, False: 6.20k]
  ------------------
 2347|  6.24k|            m.value = mLodStrategy->transformUserValue(m.userValue);
 2348|       |
 2349|       |        // Rewrite first value
 2350|  6.20k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
 2351|  6.20k|    }
_ZN4Ogre4Mesh21_convertVertexElementENS_21VertexElementSemanticENS_17VertexElementTypeE:
 2355|  3.49k|    {
 2356|  3.49k|        if (sharedVertexData)
  ------------------
  |  Branch (2356:13): [True: 632, False: 2.86k]
  ------------------
 2357|    632|            sharedVertexData->convertVertexElement(semantic, dstType);
 2358|       |
 2359|  3.49k|        for (auto s : getSubMeshes())
  ------------------
  |  Branch (2359:21): [True: 25.1k, False: 3.49k]
  ------------------
 2360|  25.1k|            if (s->vertexData)
  ------------------
  |  Branch (2360:17): [True: 21.5k, False: 3.67k]
  ------------------
 2361|  21.5k|                s->vertexData->convertVertexElement(semantic, dstType);
 2362|  3.49k|    }

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

_ZN4Ogre14MeshSerializerC2Ev:
   47|  4.81k|        :mListener(0)
   48|  4.81k|    {
   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|  4.81k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   57|  4.81k|            MESH_VERSION_1_10, "[MeshSerializer_v1.100]", 
   58|  4.81k|            OGRE_NEW MeshSerializerImpl()));
   59|       |
   60|  4.81k|        mVersionData.push_back(OGRE_NEW MeshVersionData(
   61|  4.81k|            MESH_VERSION_1_8, "[MeshSerializer_v1.8]", 
   62|  4.81k|            OGRE_NEW MeshSerializerImpl_v1_8()));
   63|       |
   64|  4.81k|        if(!mSupportLegacyFormats)
  ------------------
  |  Branch (64:12): [True: 4.81k, False: 0]
  ------------------
   65|  4.81k|            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|  4.81k|    {
   90|       |        // delete map
   91|  4.81k|        for (auto & i : mVersionData)
  ------------------
  |  Branch (91:23): [True: 9.62k, False: 4.81k]
  ------------------
   92|  9.62k|        {
   93|  9.62k|            OGRE_DELETE i;
   94|  9.62k|        }
   95|  4.81k|        mVersionData.clear();
   96|       |
   97|  4.81k|    }
_ZN4Ogre14MeshSerializer10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  141|  4.81k|    {
  142|  4.81k|        determineEndianness(stream);
  143|       |
  144|       |        // Read header and determine the version
  145|  4.81k|        unsigned short headerID;
  146|       |        
  147|       |        // Read header ID
  148|  4.81k|        readShorts(stream, &headerID, 1);
  149|       |        
  150|  4.81k|        if (headerID != HEADER_CHUNK_ID)
  ------------------
  |  Branch (150:13): [True: 0, False: 4.81k]
  ------------------
  151|      0|        {
  152|      0|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "File header not found",
  153|      0|                "MeshSerializer::importMesh");
  154|      0|        }
  155|       |        // Read version
  156|  4.81k|        String ver = readString(stream);
  157|       |        // Jump back to start
  158|  4.81k|        stream->seek(0);
  159|       |
  160|       |        // Find the implementation to use
  161|  4.81k|        MeshSerializerImpl* impl = 0;
  162|  4.81k|        for (auto & i : mVersionData)
  ------------------
  |  Branch (162:23): [True: 6.88k, False: 100]
  ------------------
  163|  6.88k|        {
  164|  6.88k|            if (i->versionString == ver)
  ------------------
  |  Branch (164:17): [True: 4.71k, False: 2.17k]
  ------------------
  165|  4.71k|            {
  166|  4.71k|                impl = i->impl.get();
  167|  4.71k|                break;
  168|  4.71k|            }
  169|  6.88k|        }           
  170|  4.81k|        if (!impl)
  ------------------
  |  Branch (170:13): [True: 74, False: 4.73k]
  ------------------
  171|  4.81k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Cannot find serializer implementation for "
  172|  4.73k|                        "mesh version " + ver, "MeshSerializer::importMesh");
  173|       |        
  174|       |        // Call implementation
  175|  4.73k|        impl->importMesh(stream, pDest, mListener);
  176|       |        // Warn on old version of mesh
  177|  4.73k|        if (ver != mVersionData[0]->versionString)
  ------------------
  |  Branch (177:13): [True: 578, False: 4.16k]
  ------------------
  178|    578|        {
  179|    578|            LogManager::getSingleton().logWarning(pDest->getName() + " uses an old format " + ver +
  180|    578|                                                  "; upgrade with the OgreMeshUpgrader tool");
  181|    578|        }
  182|       |
  183|  4.73k|        if(mListener)
  ------------------
  |  Branch (183:12): [True: 0, False: 4.73k]
  ------------------
  184|      0|            mListener->processMeshCompleted(pDest);
  185|       |
  186|  4.73k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (186:19): [True: 0, False: 4.73k]
  ------------------
  187|  4.73k|        if (!rs || !rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_INT_10_10_10_2))
  ------------------
  |  Branch (187:13): [True: 4.73k, False: 0]
  |  Branch (187:20): [True: 0, False: 0]
  ------------------
  188|  1.75k|        {
  189|       |            // unpacks to floats, if packed
  190|  1.75k|            pDest->_convertVertexElement(VES_NORMAL, VET_FLOAT3);
  191|  1.75k|            pDest->_convertVertexElement(VES_TANGENT, VET_FLOAT4);
  192|  1.75k|        }
  193|  4.73k|    }
_ZN4Ogre15MeshVersionDataC2ENS_11MeshVersionERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPNS_18MeshSerializerImplE:
   41|  9.62k|        : version(_ver), versionString(_string), impl(_impl) {}

_ZN4Ogre18MeshSerializerImplC2Ev:
   63|  9.62k|    {
   64|       |        // Version number
   65|  9.62k|        mVersion = "[MeshSerializer_v1.100]";
   66|  9.62k|        exportedLodCount = 0;
   67|  9.62k|    }
_ZN4Ogre18MeshSerializerImplD2Ev:
   70|  9.62k|    {
   71|  9.62k|    }
_ZN4Ogre18MeshSerializerImpl10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  110|  4.71k|    {
  111|       |        // Determine endianness (must be the first thing we do!)
  112|  4.71k|        determineEndianness(stream);
  113|       |
  114|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  115|       |        enableValidation();
  116|       |#endif
  117|       |        // Check header
  118|  4.71k|        readFileHeader(stream);
  119|  4.71k|        pushInnerChunk(stream);
  120|  4.71k|        unsigned short streamID = readChunk(stream);
  121|       |
  122|  43.5k|        while(!stream->eof())
  ------------------
  |  Branch (122:15): [True: 41.4k, False: 2.14k]
  ------------------
  123|  41.4k|        {
  124|  41.4k|            switch (streamID)
  ------------------
  |  Branch (124:21): [True: 38.3k, False: 3.05k]
  ------------------
  125|  41.4k|            {
  126|  38.3k|            case M_MESH:
  ------------------
  |  Branch (126:13): [True: 38.3k, False: 3.05k]
  ------------------
  127|  38.3k|                readMesh(stream, pMesh, listener);
  128|  38.3k|                break;
  129|  41.4k|            }
  130|       |
  131|  38.8k|            streamID = readChunk(stream);
  132|  38.8k|        }
  133|  2.14k|        popInnerChunk(stream);
  134|  2.14k|    }
_ZN4Ogre18MeshSerializerImpl12readGeometryERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  601|   107k|    {
  602|       |
  603|   107k|        dest->vertexStart = 0;
  604|       |
  605|   107k|        unsigned int vertexCount = 0;
  606|   107k|        readInts(stream, &vertexCount, 1);
  607|   107k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vertexCount, 1))
  ------------------
  |  Branch (607:13): [True: 1.80k, False: 105k]
  ------------------
  608|   107k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex count exceeds remaining chunk data");
  609|   105k|        dest->vertexCount = vertexCount;
  610|       |        // Find optional geometry streams
  611|   105k|        if (!stream->eof())
  ------------------
  |  Branch (611:13): [True: 105k, False: 20]
  ------------------
  612|   105k|        {
  613|   105k|            pushInnerChunk(stream);
  614|   105k|            unsigned short streamID = readChunk(stream);
  615|   136k|            while(!stream->eof() &&
  ------------------
  |  Branch (615:19): [True: 135k, False: 771]
  ------------------
  616|   135k|                (streamID == M_GEOMETRY_VERTEX_DECLARATION ||
  ------------------
  |  Branch (616:18): [True: 23.4k, False: 111k]
  ------------------
  617|   111k|                 streamID == M_GEOMETRY_VERTEX_BUFFER ))
  ------------------
  |  Branch (617:18): [True: 9.95k, False: 101k]
  ------------------
  618|  33.3k|            {
  619|  33.3k|                switch (streamID)
  ------------------
  |  Branch (619:25): [True: 33.3k, False: 0]
  ------------------
  620|  33.3k|                {
  621|  23.4k|                case M_GEOMETRY_VERTEX_DECLARATION:
  ------------------
  |  Branch (621:17): [True: 23.4k, False: 9.95k]
  ------------------
  622|  23.4k|                    readGeometryVertexDeclaration(stream, pMesh, dest);
  623|  23.4k|                    break;
  624|  9.95k|                case M_GEOMETRY_VERTEX_BUFFER:
  ------------------
  |  Branch (624:17): [True: 9.95k, False: 23.4k]
  ------------------
  625|  9.95k|                    readGeometryVertexBuffer(stream, pMesh, dest);
  626|  9.95k|                    break;
  627|  33.3k|                }
  628|       |                // Get next stream
  629|  30.5k|                if (!stream->eof())
  ------------------
  |  Branch (629:21): [True: 30.5k, False: 48]
  ------------------
  630|  30.5k|                {
  631|  30.5k|                    streamID = readChunk(stream);
  632|  30.5k|                }
  633|  30.5k|            }
  634|   102k|            if (!stream->eof())
  ------------------
  |  Branch (634:17): [True: 101k, False: 771]
  ------------------
  635|   101k|            {
  636|       |                // Backpedal back to start of non-submesh stream
  637|   101k|                backpedalChunkHeader(stream);
  638|   101k|            }
  639|   102k|            popInnerChunk(stream);
  640|   102k|        }
  641|       |
  642|       |        // Perform any necessary colour conversions from ARGB to ABGR (UBYTE4)
  643|   102k|        dest->convertPackedColour(_DETAIL_SWAP_RB, VET_UBYTE4_NORM);
  644|       |
  645|   102k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (645:19): [True: 0, False: 102k]
  ------------------
  646|   102k|        if(!rs || rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_16X3))
  ------------------
  |  Branch (646:12): [True: 102k, False: 0]
  |  Branch (646:19): [True: 0, False: 0]
  ------------------
  647|   102k|            return;
  648|       |
  649|    670|        for(auto& elem : dest->vertexDeclaration->getElements())
  ------------------
  |  Branch (649:24): [True: 0, False: 670]
  ------------------
  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|    670|    }
_ZN4Ogre18MeshSerializerImpl29readGeometryVertexDeclarationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  661|  23.4k|    {
  662|       |        // Find optional geometry streams
  663|  23.4k|        if (!stream->eof())
  ------------------
  |  Branch (663:13): [True: 23.4k, False: 0]
  ------------------
  664|  23.4k|        {
  665|  23.4k|            pushInnerChunk(stream);
  666|  23.4k|            unsigned short streamID = readChunk(stream);
  667|  50.7k|            while(!stream->eof() &&
  ------------------
  |  Branch (667:19): [True: 50.5k, False: 212]
  ------------------
  668|  50.5k|                (streamID == M_GEOMETRY_VERTEX_ELEMENT ))
  ------------------
  |  Branch (668:17): [True: 27.5k, False: 22.9k]
  ------------------
  669|  27.5k|            {
  670|  27.5k|                switch (streamID)
  ------------------
  |  Branch (670:25): [True: 27.5k, False: 0]
  ------------------
  671|  27.5k|                {
  672|  27.5k|                case M_GEOMETRY_VERTEX_ELEMENT:
  ------------------
  |  Branch (672:17): [True: 27.5k, False: 0]
  ------------------
  673|  27.5k|                    readGeometryVertexElement(stream, pMesh, dest);
  674|  27.5k|                    break;
  675|  27.5k|                }
  676|       |                // Get next stream
  677|  27.3k|                if (!stream->eof())
  ------------------
  |  Branch (677:21): [True: 27.3k, False: 21]
  ------------------
  678|  27.3k|                {
  679|  27.3k|                    streamID = readChunk(stream);
  680|  27.3k|                }
  681|  27.3k|            }
  682|  23.1k|            if (!stream->eof())
  ------------------
  |  Branch (682:17): [True: 22.9k, False: 212]
  ------------------
  683|  22.9k|            {
  684|       |                // Backpedal back to start of non-submesh stream
  685|  22.9k|                backpedalChunkHeader(stream);
  686|  22.9k|            }
  687|  23.1k|            popInnerChunk(stream);
  688|  23.1k|        }
  689|       |
  690|  23.4k|    }
_ZN4Ogre18MeshSerializerImpl25readGeometryVertexElementERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  694|  27.5k|    {
  695|  27.5k|        unsigned short source, offset, index, tmp;
  696|  27.5k|        VertexElementType vType;
  697|  27.5k|        VertexElementSemantic vSemantic;
  698|       |        // unsigned short source;   // buffer bind source
  699|  27.5k|        readShorts(stream, &source, 1);
  700|       |        // unsigned short type;     // VertexElementType
  701|  27.5k|        readShorts(stream, &tmp, 1);
  702|  27.5k|        if(tmp == 4 || tmp == 11)
  ------------------
  |  Branch (702:12): [True: 283, False: 27.2k]
  |  Branch (702:24): [True: 1.17k, False: 26.0k]
  ------------------
  703|  1.46k|            vType = VET_UBYTE4_NORM;
  704|  26.0k|        else
  705|  26.0k|            vType = static_cast<VertexElementType>(tmp);
  706|       |        // unsigned short semantic; // VertexElementSemantic
  707|  27.5k|        readShorts(stream, &tmp, 1);
  708|  27.5k|        vSemantic = static_cast<VertexElementSemantic>(tmp);
  709|       |        // unsigned short offset;   // start offset in buffer in bytes
  710|  27.5k|        readShorts(stream, &offset, 1);
  711|       |        // unsigned short index;    // index of the semantic
  712|  27.5k|        readShorts(stream, &index, 1);
  713|       |
  714|  27.5k|        if (dest->vertexBufferBinding->isBufferBound(source))
  ------------------
  |  Branch (714:13): [True: 208, False: 27.3k]
  ------------------
  715|  27.5k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Cannot add vertex element after reading buffer");
  716|       |
  717|  27.3k|        dest->vertexDeclaration->addElement(source, offset, vType, vSemantic, index);
  718|       |
  719|  27.3k|        if (vType == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (719:13): [True: 5.18k, False: 22.1k]
  ------------------
  720|  5.18k|        {
  721|  5.18k|            LogManager::getSingleton().stream(LML_WARNING)
  722|  5.18k|                << "Warning: VET_COLOUR_ARGB element type is deprecated and incurs conversion on load. "
  723|  5.18k|                << "Use OgreMeshUpgrader on '" << pMesh->getName() << "' as soon as possible.";
  724|  5.18k|        }
  725|       |
  726|  27.3k|    }
_ZN4Ogre18MeshSerializerImpl24readGeometryVertexBufferERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  730|  9.95k|    {
  731|  9.95k|        unsigned short bindIndex, vertexSize;
  732|       |        // unsigned short bindIndex;    // Index to bind this buffer to
  733|  9.95k|        readShorts(stream, &bindIndex, 1);
  734|       |        // unsigned short vertexSize;   // Per-vertex size, must agree with declaration at this index
  735|  9.95k|        readShorts(stream, &vertexSize, 1);
  736|  9.95k|        if (dest->vertexBufferBinding->isBufferBound(bindIndex))
  ------------------
  |  Branch (736:13): [True: 385, False: 9.56k]
  ------------------
  737|  9.95k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate vertex buffer binding");
  738|  9.56k|        pushInnerChunk(stream);
  739|  9.56k|        {
  740|       |        // Check for vertex data header
  741|  9.56k|        unsigned short headerID;
  742|  9.56k|        headerID = readChunk(stream);
  743|  9.56k|        if (headerID != M_GEOMETRY_VERTEX_BUFFER_DATA)
  ------------------
  |  Branch (743:13): [True: 215, False: 9.35k]
  ------------------
  744|    215|        {
  745|    215|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Can't find vertex buffer data area",
  746|    215|                "MeshSerializerImpl::readGeometryVertexBuffer");
  747|    215|        }
  748|  9.35k|        size_t declaredVertexSize = dest->vertexDeclaration->getVertexSize(bindIndex);
  749|  9.35k|        if (declaredVertexSize == 0)
  ------------------
  |  Branch (749:13): [True: 563, False: 8.79k]
  ------------------
  750|    563|        {
  751|    563|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Missing vertex declaration for buffer bind index");
  752|    563|        }
  753|       |        // Check that vertex size agrees
  754|  8.79k|        if (declaredVertexSize != vertexSize)
  ------------------
  |  Branch (754:13): [True: 234, False: 8.55k]
  ------------------
  755|    234|        {
  756|    234|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer vertex size does not agree with vertex declaration");
  757|    234|        }
  758|       |
  759|       |        // Create / populate vertex buffer
  760|  8.55k|        size_t vbufBytes = dest->vertexCount * (size_t)vertexSize;
  761|  8.55k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vbufBytes, 1))
  ------------------
  |  Branch (761:13): [True: 345, False: 8.21k]
  ------------------
  762|  8.55k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex buffer size exceeds remaining chunk data");
  763|  8.21k|        HardwareVertexBufferSharedPtr vbuf;
  764|  8.21k|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
  765|  8.21k|            vertexSize,
  766|  8.21k|            dest->vertexCount,
  767|  8.21k|            pMesh->mVertexBufferUsage,
  768|  8.21k|            pMesh->mVertexBufferShadowBuffer);
  769|  8.21k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
  770|  8.21k|        stream->read(vbufLock.pData, vbufBytes);
  771|       |
  772|  8.21k|        auto elems = dest->vertexDeclaration->findElementsBySource(bindIndex);
  773|       |        // validate vertex element declarations
  774|  8.21k|        for (auto& elem : elems)
  ------------------
  |  Branch (774:25): [True: 12.9k, False: 7.54k]
  ------------------
  775|  12.9k|        {
  776|  12.9k|            if (elem.getSize() == 0)
  ------------------
  |  Branch (776:17): [True: 266, False: 12.6k]
  ------------------
  777|  12.9k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid vertex element type");
  778|  12.6k|            if (elem.getOffset() + elem.getSize() > vertexSize)
  ------------------
  |  Branch (778:17): [True: 397, False: 12.2k]
  ------------------
  779|  12.6k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  780|  12.6k|                                "Vertex element offset + size exceeds vertex buffer stride");
  781|  12.6k|        }
  782|       |
  783|       |        // endian conversion for OSX
  784|  7.54k|        flipFromLittleEndian(vbufLock.pData, dest->vertexCount, vertexSize, elems);
  785|       |
  786|       |        // Set binding
  787|  7.54k|        dest->vertexBufferBinding->setBinding(bindIndex, vbuf);
  788|  7.54k|        }
  789|      0|        popInnerChunk(stream);
  790|       |
  791|  7.54k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshNameTableERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  794|  6.98k|    {
  795|       |        // The map for
  796|  6.98k|        std::map<unsigned short, String> subMeshNames;
  797|  6.98k|        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|  6.98k|        if (!stream->eof())
  ------------------
  |  Branch (806:13): [True: 6.98k, False: 0]
  ------------------
  807|  6.98k|        {
  808|  6.98k|            pushInnerChunk(stream);
  809|  6.98k|            streamID = readChunk(stream);
  810|  23.7k|            while(!stream->eof() && (streamID == M_SUBMESH_NAME_TABLE_ELEMENT ))
  ------------------
  |  Branch (810:19): [True: 23.3k, False: 362]
  |  Branch (810:37): [True: 16.7k, False: 6.62k]
  ------------------
  811|  16.7k|            {
  812|       |                // Read in the index of the submesh.
  813|  16.7k|                readShorts(stream, &subMeshIndex, 1);
  814|       |                // Read in the String and map it to its index.
  815|  16.7k|                subMeshNames[subMeshIndex] = readString(stream);
  816|       |
  817|       |                // If we're not end of file get the next stream ID
  818|  16.7k|                if (!stream->eof())
  ------------------
  |  Branch (818:21): [True: 16.4k, False: 240]
  ------------------
  819|  16.4k|                    streamID = readChunk(stream);
  820|  16.7k|            }
  821|  6.98k|            if (!stream->eof())
  ------------------
  |  Branch (821:17): [True: 6.62k, False: 362]
  ------------------
  822|  6.62k|            {
  823|       |                // Backpedal back to start of stream
  824|  6.62k|                backpedalChunkHeader(stream);
  825|  6.62k|            }
  826|  6.98k|            popInnerChunk(stream);
  827|  6.98k|        }
  828|       |
  829|       |        // Set all the submeshes names
  830|       |        // ?
  831|       |        // Loop through and save out the index and names.
  832|  6.98k|        for (auto& sn : subMeshNames)
  ------------------
  |  Branch (832:23): [True: 15.3k, False: 6.98k]
  ------------------
  833|  15.3k|        {
  834|       |            // Name this submesh to the stored name.
  835|  15.3k|            pMesh->nameSubMesh(sn.second, sn.first);
  836|  15.3k|        }
  837|  6.98k|    }
_ZN4Ogre18MeshSerializerImpl8readMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  840|  38.3k|    {
  841|       |        // Never automatically build edge lists for this version
  842|       |        // expect them in the file or not at all
  843|  38.3k|        pMesh->mAutoBuildEdgeLists = false;
  844|       |
  845|       |        // bool skeletallyAnimated
  846|  38.3k|        bool skeletallyAnimated;
  847|  38.3k|        readBools(stream, &skeletallyAnimated, 1);
  848|       |
  849|       |        // Find all substreams
  850|  38.3k|        if (!stream->eof())
  ------------------
  |  Branch (850:13): [True: 38.3k, False: 5]
  ------------------
  851|  38.3k|        {
  852|  38.3k|            pushInnerChunk(stream);
  853|  38.3k|            unsigned short streamID = readChunk(stream);
  854|   232k|            while(!stream->eof() &&
  ------------------
  |  Branch (854:19): [True: 229k, False: 2.37k]
  ------------------
  855|   229k|                (streamID == M_GEOMETRY ||
  ------------------
  |  Branch (855:18): [True: 26.5k, False: 203k]
  ------------------
  856|   203k|                 streamID == M_SUBMESH ||
  ------------------
  |  Branch (856:18): [True: 113k, False: 89.2k]
  ------------------
  857|  89.2k|                 streamID == M_MESH_SKELETON_LINK ||
  ------------------
  |  Branch (857:18): [True: 21.4k, False: 67.7k]
  ------------------
  858|  67.7k|                 streamID == M_MESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (858:18): [True: 2.01k, False: 65.7k]
  ------------------
  859|  65.7k|                 streamID == M_MESH_LOD_LEVEL ||
  ------------------
  |  Branch (859:18): [True: 8.97k, False: 56.7k]
  ------------------
  860|  56.7k|                 streamID == M_MESH_BOUNDS ||
  ------------------
  |  Branch (860:18): [True: 5.26k, False: 51.5k]
  ------------------
  861|  51.5k|                 streamID == M_SUBMESH_NAME_TABLE ||
  ------------------
  |  Branch (861:18): [True: 6.98k, False: 44.5k]
  ------------------
  862|  44.5k|                 streamID == M_EDGE_LISTS ||
  ------------------
  |  Branch (862:18): [True: 937, False: 43.6k]
  ------------------
  863|  43.6k|                 streamID == M_POSES ||
  ------------------
  |  Branch (863:18): [True: 1.41k, False: 42.1k]
  ------------------
  864|  42.1k|                 streamID == M_ANIMATIONS ||
  ------------------
  |  Branch (864:18): [True: 5.05k, False: 37.1k]
  ------------------
  865|  37.1k|                 streamID == M_TABLE_EXTREMES))
  ------------------
  |  Branch (865:18): [True: 3.01k, False: 34.1k]
  ------------------
  866|   195k|            {
  867|   195k|                switch(streamID)
  ------------------
  |  Branch (867:24): [True: 195k, False: 0]
  ------------------
  868|   195k|                {
  869|  26.5k|                case M_GEOMETRY:
  ------------------
  |  Branch (869:17): [True: 26.5k, False: 169k]
  ------------------
  870|  26.5k|                    pMesh->createVertexData();
  871|  26.5k|                    try {
  872|  26.5k|                        readGeometry(stream, pMesh, pMesh->sharedVertexData);
  873|  26.5k|                    }
  874|  26.5k|                    catch (Exception&)
  875|  26.5k|                    {
  876|       |                        // duff geometry data entry with 0 vertices
  877|  5.19k|                        pMesh->resetVertexData();
  878|       |                        // Skip this stream (pointer will have been returned to just after header)
  879|  5.19k|                        stream->skip(mCurrentstreamLen - MSTREAM_OVERHEAD_SIZE);
  880|  5.19k|                    }
  881|  26.5k|                    break;
  882|   113k|                case M_SUBMESH:
  ------------------
  |  Branch (882:17): [True: 113k, False: 81.6k]
  ------------------
  883|   113k|                    readSubMesh(stream, pMesh, listener);
  884|   113k|                    break;
  885|  21.4k|                case M_MESH_SKELETON_LINK:
  ------------------
  |  Branch (885:17): [True: 21.4k, False: 174k]
  ------------------
  886|  21.4k|                    readSkeletonLink(stream, pMesh, listener);
  887|  21.4k|                    break;
  888|  2.01k|                case M_MESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (888:17): [True: 2.01k, False: 193k]
  ------------------
  889|  2.01k|                    readMeshBoneAssignment(stream, pMesh);
  890|  2.01k|                    break;
  891|  8.97k|                case M_MESH_LOD_LEVEL:
  ------------------
  |  Branch (891:17): [True: 8.97k, False: 186k]
  ------------------
  892|  8.97k|                    readMeshLodLevel(stream, pMesh);
  893|  8.97k|                    break;
  894|  5.26k|                case M_MESH_BOUNDS:
  ------------------
  |  Branch (894:17): [True: 5.26k, False: 190k]
  ------------------
  895|  5.26k|                    readBoundsInfo(stream, pMesh);
  896|  5.26k|                    break;
  897|  6.98k|                case M_SUBMESH_NAME_TABLE:
  ------------------
  |  Branch (897:17): [True: 6.98k, False: 188k]
  ------------------
  898|  6.98k|                    readSubMeshNameTable(stream, pMesh);
  899|  6.98k|                    break;
  900|    937|                case M_EDGE_LISTS:
  ------------------
  |  Branch (900:17): [True: 937, False: 194k]
  ------------------
  901|    937|                    readEdgeList(stream, pMesh);
  902|    937|                    break;
  903|  1.41k|                case M_POSES:
  ------------------
  |  Branch (903:17): [True: 1.41k, False: 194k]
  ------------------
  904|  1.41k|                    readPoses(stream, pMesh);
  905|  1.41k|                    break;
  906|  5.05k|                case M_ANIMATIONS:
  ------------------
  |  Branch (906:17): [True: 5.05k, False: 190k]
  ------------------
  907|  5.05k|                    readAnimations(stream, pMesh);
  908|  5.05k|                    break;
  909|  3.01k|                case M_TABLE_EXTREMES:
  ------------------
  |  Branch (909:17): [True: 3.01k, False: 192k]
  ------------------
  910|  3.01k|                    readExtremes(stream, pMesh);
  911|  3.01k|                    break;
  912|   195k|                }
  913|       |
  914|   193k|                if (!stream->eof())
  ------------------
  |  Branch (914:21): [True: 192k, False: 1.55k]
  ------------------
  915|   192k|                {
  916|   192k|                    streamID = readChunk(stream);
  917|   192k|                }
  918|       |
  919|   193k|            }
  920|  36.4k|            if (!stream->eof())
  ------------------
  |  Branch (920:17): [True: 34.1k, False: 2.37k]
  ------------------
  921|  34.1k|            {
  922|       |                // Backpedal back to start of stream
  923|  34.1k|                backpedalChunkHeader(stream);
  924|  34.1k|            }
  925|  36.4k|            popInnerChunk(stream);
  926|  36.4k|        }
  927|       |
  928|  38.3k|    }
_ZN4Ogre18MeshSerializerImpl11readSubMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  931|   113k|    {
  932|   113k|        unsigned short streamID;
  933|       |
  934|   113k|        SubMesh* sm = pMesh->createSubMesh();
  935|       |
  936|       |        // char* materialName
  937|   113k|        String materialName = readString(stream);
  938|   113k|        if(listener)
  ------------------
  |  Branch (938:12): [True: 0, False: 113k]
  ------------------
  939|      0|            listener->processMaterialName(pMesh, &materialName);
  940|   113k|        if (auto material = MaterialManager::getSingleton().getByName(materialName, pMesh->getGroup()))
  ------------------
  |  Branch (940:18): [True: 0, False: 113k]
  ------------------
  941|      0|        {
  942|      0|            sm->setMaterial(material);
  943|      0|        }
  944|   113k|        else
  945|   113k|        {
  946|   113k|            logMaterialNotFound(materialName, pMesh->getGroup(), "SubMesh of", pMesh->getName(), LML_WARNING);
  947|   113k|        }
  948|       |
  949|       |        // bool useSharedVertices
  950|   113k|        readBools(stream,&sm->useSharedVertices, 1);
  951|       |
  952|   113k|        sm->indexData->indexStart = 0;
  953|   113k|        unsigned int indexCount = 0;
  954|   113k|        readInts(stream, &indexCount, 1);
  955|   113k|        sm->indexData->indexCount = indexCount;
  956|       |
  957|   113k|        HardwareIndexBufferSharedPtr ibuf;
  958|       |        // bool indexes32Bit
  959|   113k|        bool idx32bit;
  960|   113k|        readBools(stream, &idx32bit, 1);
  961|   113k|        if (indexCount > 0)
  ------------------
  |  Branch (961:13): [True: 86.7k, False: 27.1k]
  ------------------
  962|  86.7k|        {
  963|  86.7k|            if (!checkChunkRemainingSize(mCurrentstreamLen, indexCount, idx32bit ? sizeof(unsigned int) : sizeof(unsigned short)))
  ------------------
  |  Branch (963:17): [True: 135, False: 86.6k]
  |  Branch (963:73): [True: 3.88k, False: 82.8k]
  ------------------
  964|  86.7k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Index buffer size exceeds chunk size");
  965|  86.6k|            if (idx32bit)
  ------------------
  |  Branch (965:17): [True: 3.81k, False: 82.8k]
  ------------------
  966|  3.81k|            {
  967|  3.81k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  968|  3.81k|                        HardwareIndexBuffer::IT_32BIT,
  969|  3.81k|                        sm->indexData->indexCount,
  970|  3.81k|                        pMesh->mIndexBufferUsage,
  971|  3.81k|                        pMesh->mIndexBufferShadowBuffer);
  972|  3.81k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  973|  3.81k|                readInts(stream, static_cast<unsigned int*>(ibufLock.pData), sm->indexData->indexCount);
  974|       |
  975|  3.81k|            }
  976|  82.8k|            else // 16-bit
  977|  82.8k|            {
  978|  82.8k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  979|  82.8k|                        HardwareIndexBuffer::IT_16BIT,
  980|  82.8k|                        sm->indexData->indexCount,
  981|  82.8k|                        pMesh->mIndexBufferUsage,
  982|  82.8k|                        pMesh->mIndexBufferShadowBuffer);
  983|  82.8k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  984|  82.8k|                readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), sm->indexData->indexCount);
  985|  82.8k|            }
  986|  86.6k|        }
  987|   113k|        sm->indexData->indexBuffer = ibuf;
  988|       |
  989|   113k|        pushInnerChunk(stream);
  990|   113k|        {
  991|       |        // M_GEOMETRY stream (Optional: present only if useSharedVertices = false)
  992|   113k|        if (!sm->useSharedVertices)
  ------------------
  |  Branch (992:13): [True: 80.8k, False: 32.9k]
  ------------------
  993|  80.8k|        {
  994|  80.8k|            streamID = readChunk(stream);
  995|  80.8k|            if (streamID != M_GEOMETRY)
  ------------------
  |  Branch (995:17): [True: 46, False: 80.8k]
  ------------------
  996|     46|            {
  997|     46|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Missing geometry data in mesh file",
  998|     46|                    "MeshSerializerImpl::readSubMesh");
  999|     46|            }
 1000|  80.8k|            sm->createVertexData();
 1001|  80.8k|            readGeometry(stream, pMesh, sm->vertexData);
 1002|  80.8k|        }
 1003|       |
 1004|       |
 1005|       |        // Find all bone assignments, submesh operation, and texture aliases (if present)
 1006|   113k|        if (!stream->eof())
  ------------------
  |  Branch (1006:13): [True: 113k, False: 322]
  ------------------
 1007|   113k|        {
 1008|   113k|            streamID = readChunk(stream);
 1009|   113k|            bool seenTexAlias = false;
 1010|   119k|            while(!stream->eof() &&
  ------------------
  |  Branch (1010:19): [True: 118k, False: 173]
  ------------------
 1011|   118k|                (streamID == M_SUBMESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (1011:18): [True: 2.27k, False: 116k]
  ------------------
 1012|   116k|                 streamID == M_SUBMESH_OPERATION ||
  ------------------
  |  Branch (1012:18): [True: 198, False: 116k]
  ------------------
 1013|   116k|                 streamID == M_SUBMESH_TEXTURE_ALIAS))
  ------------------
  |  Branch (1013:18): [True: 3.07k, False: 113k]
  ------------------
 1014|  5.55k|            {
 1015|  5.55k|                switch(streamID)
  ------------------
  |  Branch (1015:24): [True: 5.55k, False: 0]
  ------------------
 1016|  5.55k|                {
 1017|    198|                case M_SUBMESH_OPERATION:
  ------------------
  |  Branch (1017:17): [True: 198, False: 5.35k]
  ------------------
 1018|    198|                    readSubMeshOperation(stream, pMesh, sm);
 1019|    198|                    break;
 1020|  2.27k|                case M_SUBMESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (1020:17): [True: 2.27k, False: 3.27k]
  ------------------
 1021|  2.27k|                    readSubMeshBoneAssignment(stream, pMesh, sm);
 1022|  2.27k|                    break;
 1023|  3.07k|                case M_SUBMESH_TEXTURE_ALIAS:
  ------------------
  |  Branch (1023:17): [True: 3.07k, False: 2.47k]
  ------------------
 1024|  3.07k|                    seenTexAlias = true;
 1025|  3.07k|                    String aliasName = readString(stream);
 1026|  3.07k|                    String textureName = readString(stream);
 1027|  3.07k|                    break;
 1028|  5.55k|                }
 1029|       |
 1030|  5.55k|                if (!stream->eof())
  ------------------
  |  Branch (1030:21): [True: 5.52k, False: 24]
  ------------------
 1031|  5.52k|                {
 1032|  5.52k|                    streamID = readChunk(stream);
 1033|  5.52k|                }
 1034|       |
 1035|  5.55k|            }
 1036|       |
 1037|   113k|            if (seenTexAlias)
  ------------------
  |  Branch (1037:17): [True: 2.22k, False: 111k]
  ------------------
 1038|  2.22k|                LogManager::getSingleton().logError("texture aliases for SubMeshes are unsupported - " +
 1039|  2.22k|                                                      stream->getName());
 1040|       |
 1041|   113k|            if (!stream->eof())
  ------------------
  |  Branch (1041:17): [True: 113k, False: 173]
  ------------------
 1042|   113k|            {
 1043|       |                // Backpedal back to start of stream
 1044|   113k|                    backpedalChunkHeader(stream);
 1045|   113k|                }
 1046|   113k|            }
 1047|   113k|        }
 1048|   113k|        popInnerChunk(stream);
 1049|       |
 1050|   113k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshOperationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1054|    198|    {
 1055|       |        // unsigned short operationType
 1056|    198|        unsigned short opType;
 1057|    198|        readShorts(stream, &opType, 1);
 1058|    198|        sm->operationType = static_cast<RenderOperation::OperationType>(opType);
 1059|    198|    }
_ZN4Ogre18MeshSerializerImpl16readSkeletonLinkERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 1070|  21.4k|    {
 1071|  21.4k|        String skelName = readString(stream);
 1072|       |
 1073|  21.4k|        if(listener)
  ------------------
  |  Branch (1073:12): [True: 0, False: 21.4k]
  ------------------
 1074|      0|            listener->processSkeletonName(pMesh, &skelName);
 1075|       |
 1076|  21.4k|        pMesh->setSkeletonName(skelName);
 1077|  21.4k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1120|  2.01k|    {
 1121|  2.01k|        VertexBoneAssignment assign;
 1122|       |
 1123|       |        // unsigned int vertexIndex;
 1124|  2.01k|        readInts(stream, &(assign.vertexIndex),1);
 1125|       |        // unsigned short boneIndex;
 1126|  2.01k|        readShorts(stream, &(assign.boneIndex),1);
 1127|       |        // float weight;
 1128|  2.01k|        readFloats(stream, &(assign.weight), 1);
 1129|       |
 1130|  2.01k|        pMesh->addBoneAssignment(assign);
 1131|       |
 1132|  2.01k|    }
_ZN4Ogre18MeshSerializerImpl25readSubMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1136|  2.27k|    {
 1137|  2.27k|        VertexBoneAssignment assign;
 1138|       |
 1139|       |        // unsigned int vertexIndex;
 1140|  2.27k|        readInts(stream, &(assign.vertexIndex),1);
 1141|       |        // unsigned short boneIndex;
 1142|  2.27k|        readShorts(stream, &(assign.boneIndex),1);
 1143|       |        // float weight;
 1144|  2.27k|        readFloats(stream, &(assign.weight), 1);
 1145|       |
 1146|  2.27k|        sub->addBoneAssignment(assign);
 1147|       |
 1148|  2.27k|    }
_ZN4Ogre18MeshSerializerImpl14readBoundsInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1342|  5.26k|    {
 1343|  5.26k|        Vector3 min, max;
 1344|  5.26k|        readFloats(stream, min.ptr(), 3);
 1345|  5.26k|        readFloats(stream, max.ptr(), 3);
 1346|  5.26k|        AxisAlignedBox box(min, max);
 1347|  5.26k|        pMesh->_setBounds(box, false);
 1348|       |
 1349|  5.26k|        float radius;
 1350|  5.26k|        readFloats(stream, &radius, 1);
 1351|  5.26k|        pMesh->_setBoundingSphereRadius(radius);
 1352|  5.26k|    }
_ZN4Ogre18MeshSerializerImpl16readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1362|  5.11k|    {
 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|  5.11k|        String strategyName = readString(stream);
 1428|  5.11k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 1429|       |
 1430|       |        // Check that valid strategy name was given, otherwise use default
 1431|  5.11k|        if (strategy == 0)
  ------------------
  |  Branch (1431:13): [True: 4.40k, False: 710]
  ------------------
 1432|  4.40k|            strategy = LodStrategyManager::getSingleton().getDefaultStrategy();
 1433|       |
 1434|  5.11k|        pMesh->setLodStrategy(strategy);
 1435|       |
 1436|       |        // unsigned short numLevels;
 1437|  5.11k|        uint16 numLods;
 1438|  5.11k|        readShorts(stream, &numLods, 1);
 1439|  5.11k|        numLods = std::max<ushort>(numLods, 1);
 1440|       |
 1441|  5.11k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (1441:13): [True: 87, False: 5.02k]
  ------------------
 1442|  5.11k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 1443|       |
 1444|  5.02k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (1444:12): [True: 5, False: 5.02k]
  ------------------
 1445|  5.02k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 1446|       |
 1447|  5.02k|        pMesh->_setLodInfo(numLods);
 1448|  5.02k|        pushInnerChunk(stream);
 1449|       |        // lodID=0 is the original mesh. We need to skip it.
 1450|  5.39k|        for(int lodID = 1; lodID < pMesh->getNumLodLevels(); lodID++){
  ------------------
  |  Branch (1450:28): [True: 659, False: 4.73k]
  ------------------
 1451|       |            // Read depth
 1452|    659|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[lodID];
 1453|    659|            unsigned short streamID = readChunk(stream);
 1454|    659|            readFloats(stream, &(usage.userValue), 1);
 1455|    659|            switch(streamID){
 1456|    309|            case M_MESH_LOD_MANUAL:
  ------------------
  |  Branch (1456:13): [True: 309, False: 350]
  ------------------
 1457|    309|                readMeshLodUsageManual(stream, pMesh, lodID, usage);
 1458|    309|                break;
 1459|    209|            case M_MESH_LOD_GENERATED:
  ------------------
  |  Branch (1459:13): [True: 209, False: 450]
  ------------------
 1460|    209|                readMeshLodUsageGenerated(stream, pMesh, lodID, usage);
 1461|    209|                break;
 1462|     67|            default:
  ------------------
  |  Branch (1462:13): [True: 67, False: 592]
  ------------------
 1463|     67|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1464|    659|                "Invalid Lod Usage type in " + pMesh->getName(),
 1465|    659|                    "MeshSerializerImpl::readMeshLodInfo");
 1466|    659|            }
 1467|    369|            usage.manualMesh.reset(); // will trigger load later with manual Lod
 1468|    369|            usage.edgeData = NULL;
 1469|    369|        }
 1470|  4.73k|        popInnerChunk(stream);
 1471|  4.73k|#endif
 1472|  4.73k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1476|    309|    {
 1477|    309|        pMesh->mHasManualLodLevel = true;
 1478|    309|        usage.manualName = readString(stream);
 1479|       |        
 1480|       |        // Generate for mixed
 1481|    309|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1481:22): [True: 1.43k, False: 309]
  ------------------
 1482|  1.43k|        {
 1483|       |            s->mLodFaceList[lodNum-1] = OGRE_NEW IndexData();
 1484|  1.43k|        }
 1485|    309|    }
_ZN4Ogre18MeshSerializerImpl25readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1488|    209|    {
 1489|    209|        usage.manualName = "";
 1490|       |
 1491|       |        // Get one set of detail per SubMesh
 1492|    209|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1492:22): [True: 895, False: 60]
  ------------------
 1493|    895|        {
 1494|    895|            s->mLodFaceList[lodNum - 1] = OGRE_NEW IndexData();
 1495|    895|            IndexData* indexData = s->mLodFaceList[lodNum - 1];
 1496|       |
 1497|    895|            unsigned int numIndexes;
 1498|    895|            readInts(stream, &numIndexes, 1);
 1499|    895|            indexData->indexCount = static_cast<size_t>(numIndexes);
 1500|       |
 1501|    895|            unsigned int offset;
 1502|    895|            readInts(stream, &offset, 1);
 1503|    895|            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|    895|            unsigned int bufferIndex;
 1508|    895|            readInts(stream, &bufferIndex, 1);
 1509|    895|            if(bufferIndex != (unsigned int)-1) {
  ------------------
  |  Branch (1509:16): [True: 94, False: 801]
  ------------------
 1510|     94|                if (bufferIndex - 1 >= (unsigned int)lodNum - 1)
  ------------------
  |  Branch (1510:21): [True: 90, False: 4]
  ------------------
 1511|     94|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid LOD buffer index in mesh LOD data");
 1512|       |                // copy buffer pointer
 1513|      4|                indexData->indexBuffer = s->mLodFaceList.at(bufferIndex - 1)->indexBuffer;
 1514|      4|                if (!indexData->indexBuffer)
  ------------------
  |  Branch (1514:21): [True: 0, False: 4]
  ------------------
 1515|      4|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Referenced LOD index buffer is null");
 1516|    801|            } else {
 1517|       |                // generate buffers
 1518|       |
 1519|       |                // bool indexes32Bit
 1520|    801|                bool idx32Bit;
 1521|    801|                readBools(stream, &idx32Bit, 1);
 1522|       |                
 1523|    801|                unsigned int buffIndexCount;
 1524|    801|                readInts(stream, &buffIndexCount, 1);
 1525|       |
 1526|    801|                if (!checkChunkRemainingSize(mCurrentstreamLen, buffIndexCount, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (1526:21): [True: 59, False: 742]
  |  Branch (1526:81): [True: 354, False: 447]
  ------------------
 1527|    801|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 1528|       |
 1529|    742|                indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 1530|    742|                    idx32Bit ? HardwareIndexBuffer::IT_32BIT : HardwareIndexBuffer::IT_16BIT,
  ------------------
  |  Branch (1530:21): [True: 298, False: 444]
  ------------------
 1531|    742|                    buffIndexCount, pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 1532|    742|                HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 1533|       |
 1534|    742|                if (idx32Bit)
  ------------------
  |  Branch (1534:21): [True: 298, False: 444]
  ------------------
 1535|    298|                {
 1536|    298|                    readInts(stream, (uint32*)ibufLock.pData, buffIndexCount);
 1537|    298|                }
 1538|    444|                else
 1539|    444|                {
 1540|    444|                    readShorts(stream, (uint16*)ibufLock.pData, buffIndexCount);
 1541|    444|                }
 1542|    742|            }
 1543|    895|        }
 1544|    209|    }
_ZN4Ogre18MeshSerializerImpl20flipFromLittleEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1549|  7.53k|    {
 1550|  7.53k|        if (mFlipEndian)
  ------------------
  |  Branch (1550:13): [True: 7.53k, False: 0]
  ------------------
 1551|  7.53k|        {
 1552|  7.53k|            flipEndian(pData, vertexCount, vertexSize, elems);
 1553|  7.53k|        }
 1554|  7.53k|    }
_ZN4Ogre18MeshSerializerImpl10flipEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1567|  7.53k|    {
 1568|  7.53k|        void *pBase = pData;
 1569|  32.4k|        for (size_t v = 0; v < vertexCount; ++v)
  ------------------
  |  Branch (1569:28): [True: 24.8k, False: 7.53k]
  ------------------
 1570|  24.8k|        {
 1571|  24.8k|            for (auto& e : elems)
  ------------------
  |  Branch (1571:26): [True: 44.5k, False: 24.8k]
  ------------------
 1572|  44.5k|            {
 1573|  44.5k|                void *pElem;
 1574|       |                // re-base pointer to the element
 1575|  44.5k|                e.baseVertexPointerToElement(pBase, &pElem);
 1576|       |                // Flip the endian based on the type
 1577|  44.5k|                size_t typeSize = 0;
 1578|  44.5k|                switch (VertexElement::getBaseType(e.getType()))
 1579|  44.5k|                {
 1580|  1.66k|                    case VET_FLOAT1:
  ------------------
  |  Branch (1580:21): [True: 1.66k, False: 42.8k]
  ------------------
 1581|  1.66k|                        typeSize = sizeof(float);
 1582|  1.66k|                        break;
 1583|    593|                    case VET_DOUBLE1:
  ------------------
  |  Branch (1583:21): [True: 593, False: 43.9k]
  ------------------
 1584|    593|                        typeSize = sizeof(double);
 1585|    593|                        break;
 1586|    360|                    case VET_SHORT1:
  ------------------
  |  Branch (1586:21): [True: 360, False: 44.1k]
  ------------------
 1587|    360|                        typeSize = sizeof(short);
 1588|    360|                        break;
 1589|    313|                    case VET_USHORT1:
  ------------------
  |  Branch (1589:21): [True: 313, False: 44.1k]
  ------------------
 1590|    313|                        typeSize = sizeof(unsigned short);
 1591|    313|                        break;
 1592|    284|                    case VET_INT1:
  ------------------
  |  Branch (1592:21): [True: 284, False: 44.2k]
  ------------------
 1593|    284|                        typeSize = sizeof(int);
 1594|    284|                        break;
 1595|    288|                    case VET_UINT1:
  ------------------
  |  Branch (1595:21): [True: 288, False: 44.2k]
  ------------------
 1596|    288|                        typeSize = sizeof(unsigned int);
 1597|    288|                        break;
 1598|  9.83k|                    case VET_UBYTE4_NORM:
  ------------------
  |  Branch (1598:21): [True: 9.83k, False: 34.6k]
  ------------------
 1599|  9.89k|                    case VET_UBYTE4:
  ------------------
  |  Branch (1599:21): [True: 61, False: 44.4k]
  ------------------
 1600|  9.89k|                        typeSize = 0; // NO FLIPPING
 1601|  9.89k|                        break;
 1602|  31.0k|                    default:
  ------------------
  |  Branch (1602:21): [True: 31.0k, False: 13.4k]
  ------------------
 1603|  31.0k|                        assert(false); // Should never happen
 1604|  44.5k|                };
 1605|  44.5k|				Bitwise::bswapChunks(pElem, typeSize,
 1606|  44.5k|                    VertexElement::getTypeCount(e.getType()));
 1607|  44.5k|            }
 1608|       |
 1609|  24.8k|            pBase = static_cast<void*>(
 1610|  24.8k|                static_cast<unsigned char*>(pBase) + vertexSize);
 1611|  24.8k|        }
 1612|  7.53k|    }
_ZN4Ogre18MeshSerializerImpl12readEdgeListERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1797|    937|    {
 1798|    937|        pMesh->mEdgeListsBuilt = true; // set this early, so any partial data is freed
 1799|       |
 1800|    937|        if (!stream->eof())
  ------------------
  |  Branch (1800:13): [True: 937, False: 0]
  ------------------
 1801|    937|        {
 1802|    937|            pushInnerChunk(stream);
 1803|    937|            unsigned short streamID = readChunk(stream);
 1804|  1.75k|            while(!stream->eof() &&
  ------------------
  |  Branch (1804:19): [True: 1.36k, False: 394]
  ------------------
 1805|  1.36k|                streamID == M_EDGE_LIST_LOD)
  ------------------
  |  Branch (1805:17): [True: 836, False: 528]
  ------------------
 1806|    836|            {
 1807|       |                // Process single LOD
 1808|       |
 1809|       |                // unsigned short lodIndex
 1810|    836|                unsigned short lodIndex;
 1811|    836|                readShorts(stream, &lodIndex, 1);
 1812|       |
 1813|       |                // bool isManual            // If manual, no edge data here, loaded from manual mesh
 1814|    836|                bool isManual;
 1815|    836|                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|    836|                if (!isManual) {
  ------------------
  |  Branch (1824:21): [True: 393, False: 443]
  ------------------
 1825|    393|#endif
 1826|    393|                    MeshLodUsage& usage = pMesh->mMeshLodUsageList.at(lodIndex);
 1827|    393|                    if(!usage.manualName.empty())
  ------------------
  |  Branch (1827:24): [True: 14, False: 379]
  ------------------
 1828|    393|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD is marked as non-manual, but has a manual mesh name");
 1829|       |
 1830|    379|                    if (usage.edgeData)
  ------------------
  |  Branch (1830:25): [True: 1, False: 378]
  ------------------
 1831|    379|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate edge data for LOD");
 1832|       |
 1833|    378|                    auto edgeData = std::make_unique<EdgeData>(); // in case of exception, will be deleted automatically
 1834|       |
 1835|       |                    // Read detail information of the edge list
 1836|    378|                    readEdgeListLodInfo(stream, edgeData.get());
 1837|       |
 1838|       |                    // Postprocessing edge groups
 1839|    378|                    for (auto& edgeGroup : edgeData->edgeGroups)
  ------------------
  |  Branch (1839:42): [True: 225, False: 378]
  ------------------
 1840|    225|                    {
 1841|       |                        // Populate edgeGroup.vertexData pointers
 1842|       |                        // If there is shared vertex data, vertexSet 0 is that,
 1843|       |                        // otherwise 0 is first dedicated
 1844|    225|                        if (pMesh->sharedVertexData)
  ------------------
  |  Branch (1844:29): [True: 129, False: 96]
  ------------------
 1845|    129|                        {
 1846|    129|                            if (edgeGroup.vertexSet == 0)
  ------------------
  |  Branch (1846:33): [True: 59, False: 70]
  ------------------
 1847|     59|                            {
 1848|     59|                                edgeGroup.vertexData = pMesh->sharedVertexData;
 1849|     59|                            }
 1850|     70|                            else
 1851|     70|                            {
 1852|     70|                                edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet - 1)->vertexData;
 1853|     70|                            }
 1854|    129|                        }
 1855|     96|                        else
 1856|     96|                        {
 1857|     96|                            edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet)->vertexData;
 1858|     96|                        }
 1859|    225|                    }
 1860|       |
 1861|    378|                    usage.edgeData = edgeData.release();
 1862|    378|                }
 1863|       |
 1864|    821|                if (!stream->eof())
  ------------------
  |  Branch (1864:21): [True: 476, False: 345]
  ------------------
 1865|    476|                {
 1866|    476|                    streamID = readChunk(stream);
 1867|    476|                }
 1868|       |
 1869|    821|            }
 1870|    922|            if (!stream->eof())
  ------------------
  |  Branch (1870:17): [True: 528, False: 394]
  ------------------
 1871|    528|            {
 1872|       |                // Backpedal back to start of stream
 1873|    528|                backpedalChunkHeader(stream);
 1874|    528|            }
 1875|    922|            popInnerChunk(stream);
 1876|    922|        }
 1877|    937|    }
_ZN4Ogre18MeshSerializerImpl19readEdgeListLodInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_8EdgeDataE:
 1881|    366|    {
 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|    366|        readBools(stream, &edgeData->isClosed, 1);
 1917|       |        // unsigned long numTriangles
 1918|    366|        uint32 numTriangles;
 1919|    366|        readInts(stream, &numTriangles, 1);
 1920|    366|        if(!checkChunkRemainingSize(mCurrentstreamLen, numTriangles, sizeof(EdgeData::Triangle) + sizeof(Vector4f)))
  ------------------
  |  Branch (1920:12): [True: 60, False: 306]
  ------------------
 1921|    366|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list triangle data exceeds chunk size");
 1922|       |
 1923|       |        // Allocate correct amount of memory
 1924|    306|        edgeData->triangles.resize(numTriangles);
 1925|    306|        edgeData->triangleFaceNormals.resize(numTriangles);
 1926|    306|        edgeData->triangleLightFacings.resize(numTriangles);
 1927|       |        // unsigned long numEdgeGroups
 1928|    306|        uint32 numEdgeGroups;
 1929|    306|        readInts(stream, &numEdgeGroups, 1);
 1930|    306|        if(!checkChunkRemainingSize(mCurrentstreamLen, numEdgeGroups, sizeof(uint32) * 4))
  ------------------
  |  Branch (1930:12): [True: 58, False: 248]
  ------------------
 1931|    306|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list group data exceeds chunk size");
 1932|       |
 1933|       |        // Allocate correct amount of memory
 1934|    248|        edgeData->edgeGroups.resize(numEdgeGroups);
 1935|       |        // Triangle* triangleList
 1936|    248|        uint32 tmp[3];
 1937|  2.63k|        for (size_t t = 0; t < numTriangles; ++t)
  ------------------
  |  Branch (1937:28): [True: 2.39k, False: 248]
  ------------------
 1938|  2.39k|        {
 1939|  2.39k|            EdgeData::Triangle& tri = edgeData->triangles[t];
 1940|       |            // unsigned long indexSet
 1941|  2.39k|            readInts(stream, tmp, 1);
 1942|  2.39k|            tri.indexSet = tmp[0];
 1943|       |            // unsigned long vertexSet
 1944|  2.39k|            readInts(stream, tmp, 1);
 1945|  2.39k|            tri.vertexSet = tmp[0];
 1946|       |            // unsigned long vertIndex[3]
 1947|  2.39k|            readInts(stream, tmp, 3);
 1948|       |
 1949|  2.39k|            tri.vertIndex[0] = tmp[0];
 1950|  2.39k|            tri.vertIndex[1] = tmp[1];
 1951|  2.39k|            tri.vertIndex[2] = tmp[2];
 1952|       |            // unsigned long sharedVertIndex[3]
 1953|  2.39k|            readInts(stream, tmp, 3);
 1954|  2.39k|            tri.sharedVertIndex[0] = tmp[0];
 1955|  2.39k|            tri.sharedVertIndex[1] = tmp[1];
 1956|  2.39k|            tri.sharedVertIndex[2] = tmp[2];
 1957|       |            // float normal[4]
 1958|  2.39k|            readFloats(stream, &(edgeData->triangleFaceNormals[t].x), 4);
 1959|       |
 1960|  2.39k|        }
 1961|    248|        pushInnerChunk(stream);
 1962|    655|        for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
  ------------------
  |  Branch (1962:29): [True: 501, False: 154]
  ------------------
 1963|    501|        {
 1964|    501|            unsigned short streamID = readChunk(stream);
 1965|    501|            if (streamID != M_EDGE_GROUP)
  ------------------
  |  Branch (1965:17): [True: 28, False: 473]
  ------------------
 1966|     28|            {
 1967|     28|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1968|     28|                    "Missing M_EDGE_GROUP stream",
 1969|     28|                    "MeshSerializerImpl::readEdgeListLodInfo");
 1970|     28|            }
 1971|    473|            EdgeData::EdgeGroup& edgeGroup = edgeData->edgeGroups[eg];
 1972|       |
 1973|       |            // unsigned long vertexSet
 1974|    473|            readInts(stream, tmp, 1);
 1975|    473|            edgeGroup.vertexSet = tmp[0];
 1976|       |            // unsigned long triStart
 1977|    473|            readInts(stream, tmp, 1);
 1978|    473|            edgeGroup.triStart = tmp[0];
 1979|       |            // unsigned long triCount
 1980|    473|            readInts(stream, tmp, 1);
 1981|    473|            edgeGroup.triCount = tmp[0];
 1982|       |            // unsigned long numEdges
 1983|    473|            uint32 numEdges;
 1984|    473|            readInts(stream, &numEdges, 1);
 1985|    473|            if(!checkChunkRemainingSize(mCurrentstreamLen, numEdges, sizeof(uint32) * 6 + sizeof(bool)))
  ------------------
  |  Branch (1985:16): [True: 66, False: 407]
  ------------------
 1986|    473|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list edge data exceeds chunk size");
 1987|       |
 1988|    407|            edgeGroup.edges.resize(numEdges);
 1989|       |            // Edge* edgeList
 1990|  1.89k|            for (uint32 e = 0; e < numEdges; ++e)
  ------------------
  |  Branch (1990:32): [True: 1.48k, False: 407]
  ------------------
 1991|  1.48k|            {
 1992|  1.48k|                EdgeData::Edge& edge = edgeGroup.edges[e];
 1993|       |                // unsigned long  triIndex[2]
 1994|  1.48k|                readInts(stream, tmp, 2);
 1995|  1.48k|                edge.triIndex[0] = tmp[0];
 1996|  1.48k|                edge.triIndex[1] = tmp[1];
 1997|       |                // unsigned long  vertIndex[2]
 1998|  1.48k|                readInts(stream, tmp, 2);
 1999|  1.48k|                edge.vertIndex[0] = tmp[0];
 2000|  1.48k|                edge.vertIndex[1] = tmp[1];
 2001|       |                // unsigned long  sharedVertIndex[2]
 2002|  1.48k|                readInts(stream, tmp, 2);
 2003|  1.48k|                edge.sharedVertIndex[0] = tmp[0];
 2004|  1.48k|                edge.sharedVertIndex[1] = tmp[1];
 2005|       |                // bool degenerate
 2006|  1.48k|                readBools(stream, &(edge.degenerate), 1);
 2007|  1.48k|            }
 2008|    407|        }
 2009|    154|        popInnerChunk(stream);
 2010|    154|    }
_ZN4Ogre18MeshSerializerImpl9readPosesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2325|  1.41k|    {
 2326|       |        // Find all substreams
 2327|  1.41k|        if (!stream->eof())
  ------------------
  |  Branch (2327:13): [True: 1.41k, False: 0]
  ------------------
 2328|  1.41k|        {
 2329|  1.41k|            pushInnerChunk(stream);
 2330|  1.41k|            unsigned short streamID = readChunk(stream);
 2331|  49.0k|            while(!stream->eof() &&
  ------------------
  |  Branch (2331:19): [True: 48.8k, False: 106]
  ------------------
 2332|  48.8k|                (streamID == M_POSE))
  ------------------
  |  Branch (2332:17): [True: 47.7k, False: 1.10k]
  ------------------
 2333|  47.7k|            {
 2334|  47.7k|                switch(streamID)
  ------------------
  |  Branch (2334:24): [True: 47.7k, False: 0]
  ------------------
 2335|  47.7k|                {
 2336|  47.7k|                case M_POSE:
  ------------------
  |  Branch (2336:17): [True: 47.7k, False: 0]
  ------------------
 2337|  47.7k|                    readPose(stream, pMesh);
 2338|  47.7k|                    break;
 2339|       |
 2340|  47.7k|                }
 2341|       |
 2342|  47.5k|                if (!stream->eof())
  ------------------
  |  Branch (2342:21): [True: 47.4k, False: 94]
  ------------------
 2343|  47.4k|                {
 2344|  47.4k|                    streamID = readChunk(stream);
 2345|  47.4k|                }
 2346|       |
 2347|  47.5k|            }
 2348|  1.20k|            if (!stream->eof())
  ------------------
  |  Branch (2348:17): [True: 1.10k, False: 106]
  ------------------
 2349|  1.10k|            {
 2350|       |                // Backpedal back to start of stream
 2351|  1.10k|                backpedalChunkHeader(stream);
 2352|  1.10k|            }
 2353|  1.20k|            popInnerChunk(stream);
 2354|  1.20k|        }
 2355|  1.41k|    }
_ZN4Ogre18MeshSerializerImpl8readPoseERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2358|  47.7k|    {
 2359|       |        // char* name (may be blank)
 2360|  47.7k|        String name = readString(stream);
 2361|       |        // unsigned short target
 2362|  47.7k|        unsigned short target;
 2363|  47.7k|        readShorts(stream, &target, 1);
 2364|       |
 2365|       |        // bool includesNormals
 2366|  47.7k|        bool includesNormals;
 2367|  47.7k|        readBools(stream, &includesNormals, 1);
 2368|       |        
 2369|  47.7k|        Pose* pose = pMesh->createPose(target, name);
 2370|       |
 2371|       |        // Find all substreams
 2372|  47.7k|        if (!stream->eof())
  ------------------
  |  Branch (2372:13): [True: 47.7k, False: 19]
  ------------------
 2373|  47.7k|        {
 2374|  47.7k|            pushInnerChunk(stream);
 2375|  47.7k|            unsigned short streamID = readChunk(stream);
 2376|  55.1k|            while(!stream->eof() &&
  ------------------
  |  Branch (2376:19): [True: 54.8k, False: 278]
  ------------------
 2377|  54.8k|                (streamID == M_POSE_VERTEX))
  ------------------
  |  Branch (2377:17): [True: 7.32k, False: 47.4k]
  ------------------
 2378|  7.32k|            {
 2379|  7.32k|                switch(streamID)
  ------------------
  |  Branch (2379:24): [True: 7.32k, False: 0]
  ------------------
 2380|  7.32k|                {
 2381|  7.32k|                case M_POSE_VERTEX:
  ------------------
  |  Branch (2381:17): [True: 7.32k, False: 0]
  ------------------
 2382|       |                    // create vertex offset
 2383|  7.32k|                    uint32 vertIndex;
 2384|  7.32k|                    Vector3f offset, normal;
 2385|       |                    // unsigned long vertexIndex
 2386|  7.32k|                    readInts(stream, &vertIndex, 1);
 2387|       |                    // float xoffset, yoffset, zoffset
 2388|  7.32k|                    readFloats(stream, offset.ptr(), 3);
 2389|       |                    
 2390|  7.32k|                    if (includesNormals)
  ------------------
  |  Branch (2390:25): [True: 3.57k, False: 3.74k]
  ------------------
 2391|  3.57k|                    {
 2392|  3.57k|                        readFloats(stream, normal.ptr(), 3);
 2393|  3.57k|                        pose->addVertex(vertIndex, offset, normal);                     
 2394|  3.57k|                    }
 2395|  3.74k|                    else 
 2396|  3.74k|                    {
 2397|  3.74k|                        pose->addVertex(vertIndex, offset);
 2398|  3.74k|                    }
 2399|       |
 2400|       |
 2401|  7.32k|                    break;
 2402|       |
 2403|  7.32k|                }
 2404|       |
 2405|  7.32k|                if (!stream->eof())
  ------------------
  |  Branch (2405:21): [True: 7.27k, False: 53]
  ------------------
 2406|  7.27k|                {
 2407|  7.27k|                    streamID = readChunk(stream);
 2408|  7.27k|                }
 2409|       |
 2410|  7.32k|            }
 2411|  47.7k|            if (!stream->eof())
  ------------------
  |  Branch (2411:17): [True: 47.4k, False: 278]
  ------------------
 2412|  47.4k|            {
 2413|       |                // Backpedal back to start of stream
 2414|  47.4k|                backpedalChunkHeader(stream);
 2415|  47.4k|            }
 2416|  47.7k|            popInnerChunk(stream);
 2417|  47.7k|        }
 2418|  47.7k|    }
_ZN4Ogre18MeshSerializerImpl14readAnimationsERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2421|  5.05k|    {
 2422|       |        // Find all substreams
 2423|  5.05k|        if (!stream->eof())
  ------------------
  |  Branch (2423:13): [True: 5.05k, False: 0]
  ------------------
 2424|  5.05k|        {
 2425|  5.05k|            pushInnerChunk(stream);
 2426|  5.05k|            unsigned short streamID = readChunk(stream);
 2427|  6.04k|            while(!stream->eof() &&
  ------------------
  |  Branch (2427:19): [True: 5.97k, False: 65]
  ------------------
 2428|  5.97k|                (streamID == M_ANIMATION))
  ------------------
  |  Branch (2428:17): [True: 1.15k, False: 4.82k]
  ------------------
 2429|  1.15k|            {
 2430|  1.15k|                switch(streamID)
  ------------------
  |  Branch (2430:24): [True: 1.15k, False: 0]
  ------------------
 2431|  1.15k|                {
 2432|  1.15k|                case M_ANIMATION:
  ------------------
  |  Branch (2432:17): [True: 1.15k, False: 0]
  ------------------
 2433|  1.15k|                    readAnimation(stream, pMesh);
 2434|  1.15k|                    break;
 2435|       |
 2436|  1.15k|                }
 2437|       |
 2438|    991|                if (!stream->eof())
  ------------------
  |  Branch (2438:21): [True: 932, False: 59]
  ------------------
 2439|    932|                {
 2440|    932|                    streamID = readChunk(stream);
 2441|    932|                }
 2442|       |
 2443|    991|            }
 2444|  4.88k|            if (!stream->eof())
  ------------------
  |  Branch (2444:17): [True: 4.82k, False: 65]
  ------------------
 2445|  4.82k|            {
 2446|       |                // Backpedal back to start of stream
 2447|  4.82k|                backpedalChunkHeader(stream);
 2448|  4.82k|            }
 2449|  4.88k|            popInnerChunk(stream);
 2450|  4.88k|        }
 2451|  5.05k|    }
_ZN4Ogre18MeshSerializerImpl13readAnimationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2454|  1.15k|    {
 2455|       |        // char* name
 2456|  1.15k|        String name = readString(stream);
 2457|       |        // float length
 2458|  1.15k|        float len;
 2459|  1.15k|        readFloats(stream, &len, 1);
 2460|       |
 2461|  1.15k|        Animation* anim = pMesh->createAnimation(name, len);
 2462|       |
 2463|       |        // tracks
 2464|  1.15k|        if (!stream->eof())
  ------------------
  |  Branch (2464:13): [True: 1.12k, False: 32]
  ------------------
 2465|  1.12k|        {
 2466|  1.12k|            pushInnerChunk(stream);
 2467|  1.12k|            unsigned short streamID = readChunk(stream);
 2468|       |            
 2469|       |            // Optional base info is possible
 2470|  1.12k|            if (streamID == M_ANIMATION_BASEINFO)
  ------------------
  |  Branch (2470:17): [True: 199, False: 924]
  ------------------
 2471|    199|            {
 2472|       |                // char baseAnimationName
 2473|    199|                String baseAnimName = readString(stream);
 2474|       |                // float baseKeyFrameTime
 2475|    199|                float baseKeyTime;
 2476|    199|                readFloats(stream, &baseKeyTime, 1);
 2477|       |                
 2478|    199|                anim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
 2479|       |                
 2480|    199|                if (!stream->eof())
  ------------------
  |  Branch (2480:21): [True: 194, False: 5]
  ------------------
 2481|    194|                {
 2482|       |                    // Get next stream
 2483|    194|                    streamID = readChunk(stream);
 2484|    194|                }
 2485|    199|            }
 2486|       |            
 2487|  1.39k|            while(!stream->eof() &&
  ------------------
  |  Branch (2487:19): [True: 1.34k, False: 50]
  ------------------
 2488|  1.34k|                streamID == M_ANIMATION_TRACK)
  ------------------
  |  Branch (2488:17): [True: 412, False: 932]
  ------------------
 2489|    412|            {
 2490|    412|                switch(streamID)
  ------------------
  |  Branch (2490:24): [True: 412, False: 0]
  ------------------
 2491|    412|                {
 2492|    412|                case M_ANIMATION_TRACK:
  ------------------
  |  Branch (2492:17): [True: 412, False: 0]
  ------------------
 2493|    412|                    readAnimationTrack(stream, anim, pMesh);
 2494|    412|                    break;
 2495|    412|                };
 2496|    271|                if (!stream->eof())
  ------------------
  |  Branch (2496:21): [True: 261, False: 10]
  ------------------
 2497|    261|                {
 2498|    261|                    streamID = readChunk(stream);
 2499|    261|                }
 2500|       |
 2501|    271|            }
 2502|    982|            if (!stream->eof())
  ------------------
  |  Branch (2502:17): [True: 932, False: 50]
  ------------------
 2503|    932|            {
 2504|       |                // Backpedal back to start of stream
 2505|    932|                backpedalChunkHeader(stream);
 2506|    932|            }
 2507|    982|            popInnerChunk(stream);
 2508|    982|        }
 2509|  1.15k|    }
_ZN4Ogre18MeshSerializerImpl18readAnimationTrackERKNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_4MeshE:
 2513|    412|    {
 2514|       |        // ushort type
 2515|    412|        uint16 inAnimType;
 2516|    412|        readShorts(stream, &inAnimType, 1);
 2517|    412|        VertexAnimationType animType = (VertexAnimationType)inAnimType;
 2518|       |
 2519|       |        // unsigned short target
 2520|    412|        uint16 target;
 2521|    412|        readShorts(stream, &target, 1);
 2522|       |
 2523|    412|        if (target > pMesh->getNumSubMeshes())
  ------------------
  |  Branch (2523:13): [True: 4, False: 408]
  ------------------
 2524|    412|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid target for vertex animation track");
 2525|       |
 2526|    408|        VertexData* vdata = pMesh->getVertexDataByTrackHandle(target);
 2527|    408|        if (!vdata)
  ------------------
  |  Branch (2527:13): [True: 3, False: 405]
  ------------------
 2528|    408|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track references target with no vertex data");
 2529|    405|        VertexAnimationTrack* track = anim->createVertexTrack(target, vdata, animType);
 2530|       |
 2531|       |        // keyframes
 2532|    405|        if (!stream->eof())
  ------------------
  |  Branch (2532:13): [True: 397, False: 8]
  ------------------
 2533|    397|        {
 2534|    397|            pushInnerChunk(stream);
 2535|    397|            unsigned short streamID = readChunk(stream);
 2536|  2.88k|            while(!stream->eof() &&
  ------------------
  |  Branch (2536:19): [True: 2.82k, False: 60]
  ------------------
 2537|  2.82k|                (streamID == M_ANIMATION_MORPH_KEYFRAME ||
  ------------------
  |  Branch (2537:18): [True: 1.01k, False: 1.81k]
  ------------------
 2538|  1.81k|                 streamID == M_ANIMATION_POSE_KEYFRAME))
  ------------------
  |  Branch (2538:18): [True: 1.55k, False: 261]
  ------------------
 2539|  2.56k|            {
 2540|  2.56k|                switch(streamID)
  ------------------
  |  Branch (2540:24): [True: 2.56k, False: 0]
  ------------------
 2541|  2.56k|                {
 2542|  1.01k|                case M_ANIMATION_MORPH_KEYFRAME:
  ------------------
  |  Branch (2542:17): [True: 1.01k, False: 1.55k]
  ------------------
 2543|  1.01k|                    readMorphKeyFrame(stream, pMesh, track);
 2544|  1.01k|                    break;
 2545|  1.55k|                case M_ANIMATION_POSE_KEYFRAME:
  ------------------
  |  Branch (2545:17): [True: 1.55k, False: 1.01k]
  ------------------
 2546|  1.55k|                    readPoseKeyFrame(stream, track);
 2547|  1.55k|                    break;
 2548|  2.56k|                };
 2549|  2.48k|                if (!stream->eof())
  ------------------
  |  Branch (2549:21): [True: 2.48k, False: 7]
  ------------------
 2550|  2.48k|                {
 2551|  2.48k|                    streamID = readChunk(stream);
 2552|  2.48k|                }
 2553|       |
 2554|  2.48k|            }
 2555|    321|            if (!stream->eof())
  ------------------
  |  Branch (2555:17): [True: 261, False: 60]
  ------------------
 2556|    261|            {
 2557|       |                // Backpedal back to start of stream
 2558|    261|                backpedalChunkHeader(stream);
 2559|    261|            }
 2560|    321|            popInnerChunk(stream);
 2561|    321|        }
 2562|       |
 2563|    405|    }
_ZN4Ogre18MeshSerializerImpl17readMorphKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_20VertexAnimationTrackE:
 2566|  1.01k|    {
 2567|       |        // float time
 2568|  1.01k|        float timePos;
 2569|  1.01k|        readFloats(stream, &timePos, 1);
 2570|       |        
 2571|       |        // bool includesNormals
 2572|  1.01k|        bool includesNormals;
 2573|  1.01k|        readBools(stream, &includesNormals, 1);
 2574|       |
 2575|  1.01k|        VertexMorphKeyFrame* kf = track->createVertexMorphKeyFrame(timePos);
 2576|       |
 2577|       |        // Create buffer, allow read and use shadow buffer
 2578|  1.01k|        size_t vertexCount = track->getAssociatedVertexData()->vertexCount;
 2579|  1.01k|        size_t vertexSize = sizeof(float) * (includesNormals ? 6 : 3);
  ------------------
  |  Branch (2579:46): [True: 500, False: 513]
  ------------------
 2580|  1.01k|        HardwareVertexBufferSharedPtr vbuf =
 2581|  1.01k|            pMesh->getHardwareBufferManager()->createVertexBuffer(
 2582|  1.01k|                vertexSize, vertexCount,
 2583|  1.01k|                HardwareBuffer::HBU_STATIC, true);
 2584|       |        // float x,y,z          // repeat by number of vertices in original geometry
 2585|  1.01k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 2586|  1.01k|        readFloats(stream, static_cast<float*>(vbufLock.pData), vertexCount * (includesNormals ? 6 : 3));
  ------------------
  |  Branch (2586:80): [True: 500, False: 513]
  ------------------
 2587|  1.01k|        kf->setVertexBuffer(vbuf);
 2588|       |
 2589|  1.01k|    }
_ZN4Ogre18MeshSerializerImpl16readPoseKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_20VertexAnimationTrackE:
 2592|  1.55k|    {
 2593|       |        // float time
 2594|  1.55k|        float timePos;
 2595|  1.55k|        readFloats(stream, &timePos, 1);
 2596|       |
 2597|       |        // Create keyframe
 2598|  1.55k|        VertexPoseKeyFrame* kf = track->createVertexPoseKeyFrame(timePos);
 2599|       |
 2600|  1.55k|        if (!stream->eof())
  ------------------
  |  Branch (2600:13): [True: 1.54k, False: 9]
  ------------------
 2601|  1.54k|        {
 2602|  1.54k|            pushInnerChunk(stream);
 2603|  1.54k|            unsigned short streamID = readChunk(stream);
 2604|  3.95k|            while(!stream->eof() &&
  ------------------
  |  Branch (2604:19): [True: 3.89k, False: 60]
  ------------------
 2605|  3.89k|                streamID == M_ANIMATION_POSE_REF)
  ------------------
  |  Branch (2605:17): [True: 2.40k, False: 1.48k]
  ------------------
 2606|  2.40k|            {
 2607|  2.40k|                switch(streamID)
  ------------------
  |  Branch (2607:24): [True: 2.40k, False: 0]
  ------------------
 2608|  2.40k|                {
 2609|  2.40k|                case M_ANIMATION_POSE_REF:
  ------------------
  |  Branch (2609:17): [True: 2.40k, False: 0]
  ------------------
 2610|  2.40k|                    uint16 poseIndex;
 2611|  2.40k|                    float influence;
 2612|       |                    // unsigned short poseIndex
 2613|  2.40k|                    readShorts(stream, &poseIndex, 1);
 2614|       |                    // float influence
 2615|  2.40k|                    readFloats(stream, &influence, 1);
 2616|       |
 2617|  2.40k|                    kf->addPoseReference(poseIndex, influence);
 2618|       |
 2619|  2.40k|                    break;
 2620|  2.40k|                };
 2621|  2.40k|                if (!stream->eof())
  ------------------
  |  Branch (2621:21): [True: 2.40k, False: 0]
  ------------------
 2622|  2.40k|                {
 2623|  2.40k|                    streamID = readChunk(stream);
 2624|  2.40k|                }
 2625|  2.40k|            }
 2626|  1.54k|            if (!stream->eof())
  ------------------
  |  Branch (2626:17): [True: 1.48k, False: 60]
  ------------------
 2627|  1.48k|            {
 2628|       |                // Backpedal back to start of stream
 2629|  1.48k|                backpedalChunkHeader(stream);
 2630|  1.48k|            }
 2631|  1.54k|            popInnerChunk(stream);
 2632|  1.54k|        }
 2633|  1.55k|    }
_ZN4Ogre18MeshSerializerImpl12readExtremesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2636|  3.01k|    {
 2637|  3.01k|        unsigned short idx;
 2638|  3.01k|        readShorts(stream, &idx, 1);
 2639|       |        
 2640|  3.01k|        SubMesh *sm = pMesh->getSubMeshes().at(idx);
 2641|       |
 2642|  3.01k|        const size_t minChunkSize = MSTREAM_OVERHEAD_SIZE + sizeof(unsigned short);
 2643|  3.01k|        if (mCurrentstreamLen <= minChunkSize)
  ------------------
  |  Branch (2643:13): [True: 2, False: 3.01k]
  ------------------
 2644|  3.01k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Extremes chunk too small");
 2645|       |
 2646|  3.01k|        size_t n_floats = (mCurrentstreamLen - minChunkSize) / sizeof(float);
 2647|       |
 2648|  3.01k|        if (n_floats == 0 || n_floats % 3 != 0)
  ------------------
  |  Branch (2648:13): [True: 20, False: 2.99k]
  |  Branch (2648:30): [True: 7, False: 2.98k]
  ------------------
 2649|  3.01k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid extremes data size");
 2650|       |        
 2651|  3.00k|        sm->extremityPoints.resize(n_floats / 3);
 2652|       |
 2653|  3.00k|        readFloats(stream, sm->extremityPoints.front().ptr(), n_floats);
 2654|  3.00k|    }
_ZN4Ogre23MeshSerializerImpl_v1_8C2Ev:
 2668|  4.81k|    {
 2669|       |        // Version number
 2670|  4.81k|        mVersion = "[MeshSerializer_v1.8]";
 2671|  4.81k|    }
_ZN4Ogre23MeshSerializerImpl_v1_825readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2898|    121|    {
 2899|    121|        usage.manualName = "";
 2900|    121|        usage.manualMesh.reset();
 2901|    121|        pushInnerChunk(stream);
 2902|    121|        {
 2903|       |            // Get one set of detail per SubMesh
 2904|    121|            for (auto *sm : pMesh->getSubMeshes())
  ------------------
  |  Branch (2904:27): [True: 118, False: 58]
  ------------------
 2905|    118|            {
 2906|    118|                unsigned long streamID = readChunk(stream);
 2907|    118|                if (streamID != M_MESH_LOD_GENERATED)
  ------------------
  |  Branch (2907:21): [True: 15, False: 103]
  ------------------
 2908|     15|                {
 2909|     15|                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2910|     15|                        "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 2911|     15|                        "MeshSerializerImpl::readMeshLodUsageGenerated");
 2912|     15|                }
 2913|       |
 2914|    103|                IndexData* indexData = OGRE_NEW IndexData();
 2915|    103|                sm->mLodFaceList[lodNum - 1] = indexData;
 2916|    103|                unsigned int numIndexes;
 2917|    103|                readInts(stream, &numIndexes, 1);
 2918|    103|                bool idx32Bit;
 2919|    103|                readBools(stream, &idx32Bit, 1);
 2920|       |
 2921|    103|                if (!checkChunkRemainingSize(mCurrentstreamLen, numIndexes, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (2921:21): [True: 48, False: 55]
  |  Branch (2921:77): [True: 50, False: 53]
  ------------------
 2922|    103|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 2923|       |
 2924|     55|                indexData->indexCount = numIndexes;
 2925|       |
 2926|     55|                if (idx32Bit)
  ------------------
  |  Branch (2926:21): [True: 15, False: 40]
  ------------------
 2927|     15|                {
 2928|     15|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2929|     15|                        HardwareIndexBuffer::IT_32BIT, indexData->indexCount,
 2930|     15|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2931|     15|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2932|     15|                    readInts(stream, static_cast<unsigned int*>(ibufLock.pData), indexData->indexCount);
 2933|     15|                }
 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|     55|            }
 2943|    121|        }
 2944|     58|        popInnerChunk(stream);
 2945|     58|    }
_ZN4Ogre23MeshSerializerImpl_v1_822readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2949|     45|    {
 2950|     45|        pushInnerChunk(stream);
 2951|     45|        unsigned long streamID;
 2952|       |        // Read detail stream
 2953|     45|        streamID = readChunk(stream);
 2954|     45|        if (streamID != M_MESH_LOD_MANUAL)
  ------------------
  |  Branch (2954:13): [True: 13, False: 32]
  ------------------
 2955|     13|        {
 2956|     13|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2957|     13|                "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 2958|     13|                "MeshSerializerImpl::readMeshLodUsageManual");
 2959|     13|        }
 2960|       |
 2961|     32|        usage.manualName = readString(stream);
 2962|     32|        usage.manualMesh.reset(); // will trigger load later
 2963|     32|        popInnerChunk(stream);
 2964|     32|    }
_ZN4Ogre23MeshSerializerImpl_v1_816readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2968|  3.86k|    {
 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|  3.86k|        unsigned short streamID, i;
 3041|       |
 3042|       |        // Read the strategy to be used for this mesh
 3043|  3.86k|        String strategyName = readString(stream);
 3044|  3.86k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 3045|       |        
 3046|  3.86k|        if (strategy)
  ------------------
  |  Branch (3046:13): [True: 1.09k, False: 2.77k]
  ------------------
 3047|  1.09k|            pMesh->setLodStrategy(strategy);
 3048|       |
 3049|       |        // unsigned short numLevels;
 3050|  3.86k|        uint16 numLods;
 3051|  3.86k|        readShorts(stream, &numLods, 1);
 3052|  3.86k|        numLods = std::max<ushort>(numLods, 1);
 3053|       |
 3054|  3.86k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (3054:13): [True: 56, False: 3.80k]
  ------------------
 3055|  3.86k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 3056|       |
 3057|  3.80k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (3057:12): [True: 4, False: 3.80k]
  ------------------
 3058|  3.80k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 3059|       |
 3060|  3.80k|        pMesh->mMeshLodUsageList.resize(numLods);
 3061|       |
 3062|  3.80k|        bool manual; // true for manual alternate meshes, false for generated
 3063|  3.80k|        readBools(stream, &manual, 1);
 3064|  3.80k|        pMesh->mHasManualLodLevel = manual;
 3065|       |
 3066|       |        // Preallocate submesh lod face data if not manual
 3067|  3.80k|        if (!pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3067:13): [True: 2.18k, False: 1.61k]
  ------------------
 3068|  2.18k|        {
 3069|  2.18k|            unsigned short numsubs = pMesh->getNumSubMeshes();
 3070|  95.0k|            for (i = 0; i < numsubs; ++i)
  ------------------
  |  Branch (3070:25): [True: 92.8k, False: 2.18k]
  ------------------
 3071|  92.8k|            {
 3072|  92.8k|                SubMesh* sm = pMesh->getSubMesh(i);
 3073|  92.8k|                assert(sm->mLodFaceList.empty());
 3074|  92.8k|                sm->mLodFaceList.resize(numLods - 1);
 3075|  92.8k|            }
 3076|  2.18k|        }
 3077|       |
 3078|  3.80k|        pushInnerChunk(stream);
 3079|       |        // Loop from 1 rather than 0 (full detail index is not in file)
 3080|  4.01k|        for (i = 1; i < numLods; ++i)
  ------------------
  |  Branch (3080:21): [True: 226, False: 3.78k]
  ------------------
 3081|    226|        {
 3082|    226|            streamID = readChunk(stream);
 3083|    226|            if (streamID != M_MESH_LOD_USAGE)
  ------------------
  |  Branch (3083:17): [True: 18, False: 208]
  ------------------
 3084|     18|            {
 3085|     18|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3086|     18|                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3087|     18|                    "MeshSerializerImpl::readMeshLodInfo");
 3088|     18|            }
 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: 45, False: 163]
  ------------------
 3094|     45|            {
 3095|     45|                readMeshLodUsageManual(stream, pMesh, i, usage);
 3096|     45|            }
 3097|    163|            else //(!pMesh->hasManualLodLevel())
 3098|    163|            {
 3099|    163|                readMeshLodUsageGenerated(stream, pMesh, i, usage);
 3100|    163|            }
 3101|    208|            usage.edgeData = NULL;
 3102|    208|        }
 3103|  3.78k|        popInnerChunk(stream);
 3104|  3.78k|#endif
 3105|  3.78k|    }
OgreMeshSerializerImpl.cpp:_ZN4OgreL23checkChunkRemainingSizeEmmm:
   51|   213k|    {
   52|   213k|        if (itemCount == 0)
  ------------------
  |  Branch (52:13): [True: 23.6k, False: 189k]
  ------------------
   53|  23.6k|            return true;
   54|       |
   55|   189k|        if (chunkSize <= MSTREAM_OVERHEAD_SIZE || itemSize == 0)
  ------------------
  |  Branch (55:13): [True: 889, False: 189k]
  |  Branch (55:51): [True: 0, False: 189k]
  ------------------
   56|    889|            return false;
   57|       |
   58|   189k|        size_t remaining = chunkSize - MSTREAM_OVERHEAD_SIZE;
   59|   189k|        return remaining / itemSize >= itemCount;
   60|   189k|    }

_ZN4Ogre4NodeC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   35|    791|        :mParent(0),
   36|    791|        mName(name),
   37|    791|        mNeedParentUpdate(false),
   38|    791|        mNeedChildUpdate(false),
   39|    791|        mParentNotified(false),
   40|    791|        mQueuedForUpdate(false),
   41|    791|        mInheritOrientation(true),
   42|    791|        mInheritScale(true),
   43|    791|        mCachedTransformOutOfDate(true),
   44|    791|        mOrientation(Quaternion::IDENTITY),
   45|    791|        mPosition(Vector3::ZERO),
   46|    791|        mScale(Vector3::UNIT_SCALE),
   47|    791|        mDerivedOrientation(Quaternion::IDENTITY),
   48|    791|        mDerivedPosition(Vector3::ZERO),
   49|    791|        mDerivedScale(Vector3::UNIT_SCALE),
   50|    791|        mInitialPosition(Vector3::ZERO),
   51|    791|        mInitialOrientation(Quaternion::IDENTITY),
   52|    791|        mInitialScale(Vector3::UNIT_SCALE),
   53|    791|        mListener(0)
   54|    791|    {
   55|    791|        needUpdate();
   56|    791|    }
_ZN4Ogre4NodeD2Ev:
   60|    791|    {
   61|       |        // Call listener (note, only called if there's something to do)
   62|    791|        if (mListener)
  ------------------
  |  Branch (62:13): [True: 0, False: 791]
  ------------------
   63|      0|        {
   64|      0|            mListener->nodeDestroyed(this);
   65|      0|        }
   66|       |
   67|    791|        removeAllChildren();
   68|    791|        if(mParent)
  ------------------
  |  Branch (68:12): [True: 5, False: 786]
  ------------------
   69|      5|            mParent->removeChild(this);
   70|       |
   71|    791|        if (mQueuedForUpdate)
  ------------------
  |  Branch (71:13): [True: 0, False: 791]
  ------------------
   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|    791|    }
_ZN4Ogre4Node9setParentEPS0_:
   89|     20|    {
   90|     20|        bool different = (parent != mParent);
   91|       |
   92|     20|        mParent = parent;
   93|       |        // Request update from parent
   94|     20|        mParentNotified = false ;
   95|     20|        needUpdate();
   96|       |
   97|       |        // Call listener (note, only called if there's something to do)
   98|     20|        if (mListener && different)
  ------------------
  |  Branch (98:13): [True: 0, False: 20]
  |  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|     20|    }
_ZNK4Ogre4Node17_updateFromParentEv:
  196|    622|    {
  197|    622|        updateFromParentImpl();
  198|       |
  199|       |        // Call listener (note, this method only called if there's something to do)
  200|    622|        if (mListener)
  ------------------
  |  Branch (200:13): [True: 0, False: 622]
  ------------------
  201|      0|        {
  202|      0|            mListener->nodeUpdated(this);
  203|      0|        }
  204|    622|    }
_ZNK4Ogre4Node20updateFromParentImplEv:
  207|    622|    {
  208|    622|        mCachedTransformOutOfDate = true;
  209|       |
  210|    622|        if (mParent)
  ------------------
  |  Branch (210:13): [True: 2, False: 620]
  ------------------
  211|      2|        {
  212|       |#if OGRE_NODE_INHERIT_TRANSFORM
  213|       |            // Decompose full transform to position, orientation and scale, shear is lost here.
  214|       |            _getFullTransform().decomposition(mDerivedPosition, mDerivedScale, mDerivedOrientation);
  215|       |#else
  216|       |            // Update orientation
  217|      2|            const Quaternion& parentOrientation = mParent->_getDerivedOrientation();
  218|      2|            if (mInheritOrientation)
  ------------------
  |  Branch (218:17): [True: 2, False: 0]
  ------------------
  219|      2|            {
  220|       |                // Combine orientation with that of parent
  221|      2|                mDerivedOrientation = parentOrientation * mOrientation;
  222|      2|            }
  223|      0|            else
  224|      0|            {
  225|       |                // No inheritance
  226|      0|                mDerivedOrientation = mOrientation;
  227|      0|            }
  228|       |
  229|       |            // Update scale
  230|      2|            const Vector3& parentScale = mParent->_getDerivedScale();
  231|      2|            if (mInheritScale)
  ------------------
  |  Branch (231:17): [True: 2, False: 0]
  ------------------
  232|      2|            {
  233|       |                // Scale own position by parent scale, NB just combine
  234|       |                // as equivalent axes, no shearing
  235|      2|                mDerivedScale = parentScale * mScale;
  236|      2|            }
  237|      0|            else
  238|      0|            {
  239|       |                // No inheritance
  240|      0|                mDerivedScale = mScale;
  241|      0|            }
  242|       |
  243|       |            // Change position vector based on parent's orientation & scale
  244|      2|            mDerivedPosition = parentOrientation * (parentScale * mPosition);
  245|       |
  246|       |            // Add altered position vector to parents
  247|      2|            mDerivedPosition += mParent->_getDerivedPosition();
  248|      2|#endif
  249|      2|        }
  250|    620|        else
  251|    620|        {
  252|       |            // Root node, no parent
  253|    620|            mDerivedOrientation = mOrientation;
  254|    620|            mDerivedPosition = mPosition;
  255|    620|            mDerivedScale = mScale;
  256|    620|        }
  257|       |
  258|    622|        mNeedParentUpdate = false;
  259|       |
  260|    622|    }
_ZN4Ogre4Node8addChildEPS0_:
  284|     13|    {
  285|     13|        if (child->mParent)
  ------------------
  |  Branch (285:13): [True: 3, False: 10]
  ------------------
  286|      3|        {
  287|      3|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
  288|      3|                        "Node '" + child->getName() + "' already is a child of '" + child->mParent->getName() + "'");
  289|      3|        }
  290|       |
  291|     10|        mChildren.push_back(child);
  292|     10|        child->setParent(this);
  293|       |
  294|     10|    }
_ZN4Ogre4Node11removeChildEPS0_:
  324|      5|    {
  325|      5|        if (child)
  ------------------
  |  Branch (325:13): [True: 5, False: 0]
  ------------------
  326|      5|        {
  327|      5|            ChildNodeMap::iterator i = std::find(mChildren.begin(), mChildren.end(), child);
  328|      5|            if(i != mChildren.end() && *i == child)
  ------------------
  |  Branch (328:16): [True: 5, False: 0]
  |  Branch (328:16): [True: 5, False: 0]
  |  Branch (328:40): [True: 5, False: 0]
  ------------------
  329|      5|            {
  330|       |                // cancel any pending update
  331|      5|                cancelUpdate(child);
  332|       |
  333|      5|                std::swap(*i, mChildren.back());
  334|      5|                mChildren.pop_back();
  335|       |                child->setParent(NULL);
  336|      5|            }
  337|      5|        }
  338|      5|        return child;
  339|      5|    }
_ZN4Ogre4Node14setOrientationERKNS_10QuaternionE:
  343|    791|    {
  344|    791|#ifndef OGRE_FAST_MATH
  345|    791|        OgreAssertDbg(!q.isNaN(), "Invalid orientation supplied as parameter");
  346|    791|#endif
  347|    791|        mOrientation = q;
  348|    791|        mOrientation.normalise();
  349|    791|        needUpdate();
  350|    791|    }
_ZN4Ogre4Node11setPositionERKNS_6VectorILi3EfEE:
  365|    791|    {
  366|    791|#ifndef OGRE_FAST_MATH
  367|       |        assert(!pos.isNaN() && "Invalid vector supplied as parameter");
  368|    791|#endif
  369|    791|        mPosition = pos;
  370|    791|        needUpdate();
  371|    791|    }
_ZNK4Ogre4Node22_getDerivedOrientationEv:
  452|    624|    {
  453|    624|        if (mNeedParentUpdate)
  ------------------
  |  Branch (453:13): [True: 1, False: 623]
  ------------------
  454|      1|        {
  455|      1|            _updateFromParent();
  456|      1|        }
  457|    624|        return mDerivedOrientation;
  458|    624|    }
_ZNK4Ogre4Node19_getDerivedPositionEv:
  461|    624|    {
  462|    624|        if (mNeedParentUpdate)
  ------------------
  |  Branch (462:13): [True: 621, False: 3]
  ------------------
  463|    621|        {
  464|    621|            _updateFromParent();
  465|    621|        }
  466|    624|        return mDerivedPosition;
  467|    624|    }
_ZNK4Ogre4Node16_getDerivedScaleEv:
  470|    624|    {
  471|    624|        if (mNeedParentUpdate)
  ------------------
  |  Branch (471:13): [True: 0, False: 624]
  ------------------
  472|      0|        {
  473|      0|            _updateFromParent();
  474|      0|        }
  475|    624|        return mDerivedScale;
  476|    624|    }
_ZN4Ogre4Node17removeAllChildrenEv:
  546|    791|    {
  547|    791|        for (auto *c : mChildren)
  ------------------
  |  Branch (547:22): [True: 5, False: 791]
  ------------------
  548|      5|        {
  549|      5|            c->setParent(0);
  550|      5|        }
  551|    791|        mChildren.clear();
  552|    791|        mChildrenToUpdate.clear();
  553|    791|    }
_ZN4Ogre4Node8setScaleERKNS_6VectorILi3EfEE:
  563|     42|    {
  564|     42|#ifndef OGRE_FAST_MATH
  565|       |        assert(!inScale.isNaN() && "Invalid vector supplied as parameter");
  566|     42|#endif
  567|     42|        mScale = inScale;
  568|     42|        needUpdate();
  569|     42|    }
_ZN4Ogre4Node15setInitialStateEv:
  600|    622|    {
  601|    622|        mInitialPosition = mPosition;
  602|    622|        mInitialOrientation = mOrientation;
  603|    622|        mInitialScale = mScale;
  604|    622|    }
_ZN4Ogre4Node10needUpdateEb:
  680|  2.43k|    {
  681|       |
  682|  2.43k|        mNeedParentUpdate = true;
  683|  2.43k|        mNeedChildUpdate = true;
  684|  2.43k|        mCachedTransformOutOfDate = true;
  685|       |
  686|       |        // Make sure we're not root and parent hasn't been notified before
  687|  2.43k|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (687:13): [True: 10, False: 2.42k]
  |  Branch (687:25): [True: 10, False: 0]
  |  Branch (687:45): [True: 0, False: 0]
  ------------------
  688|     10|        {
  689|     10|            mParent->requestUpdate(this, forceParentUpdate);
  690|     10|            mParentNotified = true ;
  691|     10|        }
  692|       |
  693|       |        // all children will be updated
  694|  2.43k|        mChildrenToUpdate.clear();
  695|  2.43k|    }
_ZN4Ogre4Node13requestUpdateEPS0_b:
  698|     10|    {
  699|       |        // If we're already going to update everything this doesn't matter
  700|     10|        if (mNeedChildUpdate)
  ------------------
  |  Branch (700:13): [True: 10, False: 0]
  ------------------
  701|     10|        {
  702|     10|            return;
  703|     10|        }
  704|       |
  705|      0|        mChildrenToUpdate.insert(child);
  706|       |        // Request selective update of me, if we didn't do it before
  707|      0|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  |  Branch (707:25): [True: 0, False: 0]
  |  Branch (707:45): [True: 0, False: 0]
  ------------------
  708|      0|        {
  709|      0|            mParent->requestUpdate(this, forceParentUpdate);
  710|      0|            mParentNotified = true ;
  711|      0|        }
  712|       |
  713|      0|    }
_ZN4Ogre4Node12cancelUpdateEPS0_:
  716|      5|    {
  717|      5|        mChildrenToUpdate.erase(child);
  718|       |
  719|       |        // Propagate this up if we're done
  720|      5|        if (mChildrenToUpdate.empty() && mParent && !mNeedChildUpdate)
  ------------------
  |  Branch (720:13): [True: 5, False: 0]
  |  Branch (720:42): [True: 0, False: 5]
  |  Branch (720:53): [True: 0, False: 0]
  ------------------
  721|      0|        {
  722|      0|            mParent->cancelUpdate(this);
  723|      0|            mParentNotified = false ;
  724|      0|        }
  725|      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: 2, False: 0]
  ------------------
 1049|      2|        {
 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|      2|            if (!(PlatformInformation::getCpuFeatures() &
  ------------------
  |  Branch (1054:17): [True: 0, False: 2]
  ------------------
 1055|      2|                (PlatformInformation::CPU_FEATURE_SSE2 | PlatformInformation::CPU_FEATURE_SSE3)))
 1056|      0|            {
 1057|      0|                mPreferGeneralVersionForSharedBuffers = true;
 1058|      0|            }
 1059|      2|        }
 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|    296|    {
   42|       |        // Use the maximum possible value as base
   43|    296|        return std::numeric_limits<Real>::max();
   44|    296|    }
_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|      4|    {
  662|      4|        static const uint sFeatures = _detectCpuFeatures();
  663|      4|        return sFeatures;
  664|      4|    }
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|     70|                for (uint i=0x80000000; i<=nExIds; ++i)
  ------------------
  |  Branch (458:41): [True: 68, False: 2]
  ------------------
  459|     68|                {
  460|     68|                    _performCpuid(i, result);
  461|       |
  462|       |                    // Interpret CPU brand string and cache information.
  463|     68|                    if  (i == 0x80000002)
  ------------------
  |  Branch (463:26): [True: 2, False: 66]
  ------------------
  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|     66|                    else if  (i == 0x80000003)
  ------------------
  |  Branch (470:31): [True: 2, False: 64]
  ------------------
  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|     64|                    else if  (i == 0x80000004)
  ------------------
  |  Branch (477:31): [True: 2, False: 62]
  ------------------
  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|     68|                }
  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|     82|    {
  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|     82|        __asm__
  163|     82|        (
  164|     82|            "cpuid": "=a" (result._eax), "=b" (result._ebx), "=c" (result._ecx), "=d" (result._edx) : "a" (query)
  165|     82|        );
  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|     82|        return result._eax;
  178|       |
  179|       |#else
  180|       |        // TODO: Supports other compiler
  181|       |        return 0;
  182|       |#endif
  183|     82|    }
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: 0, False: 2]
  ------------------
  309|      0|                {
  310|      0|                    if (result._eax > 2)
  ------------------
  |  Branch (310:25): [True: 0, False: 0]
  ------------------
  311|      0|                        features |= PlatformInformation::CPU_FEATURE_PRO;
  312|       |
  313|       |                    // Check standard feature
  314|      0|                    _performCpuid(CPUID_FUNC_STANDARD_FEATURES, result);
  ------------------
  |  |  269|      0|#define CPUID_FUNC_STANDARD_FEATURES         0x1
  ------------------
  315|       |
  316|      0|                    if (result._edx & CPUID_STD_FPU)
  ------------------
  |  |  274|      0|#define CPUID_STD_FPU               (1<<0)
  ------------------
  |  Branch (316:25): [True: 0, False: 0]
  ------------------
  317|      0|                        features |= PlatformInformation::CPU_FEATURE_FPU;
  318|      0|                    if (result._edx & CPUID_STD_TSC)
  ------------------
  |  |  275|      0|#define CPUID_STD_TSC               (1<<4)
  ------------------
  |  Branch (318:25): [True: 0, False: 0]
  ------------------
  319|      0|                        features |= PlatformInformation::CPU_FEATURE_TSC;
  320|      0|                    if (result._edx & CPUID_STD_CMOV)
  ------------------
  |  |  276|      0|#define CPUID_STD_CMOV              (1<<15)
  ------------------
  |  Branch (320:25): [True: 0, False: 0]
  ------------------
  321|      0|                        features |= PlatformInformation::CPU_FEATURE_CMOV;
  322|      0|                    if (result._edx & CPUID_STD_MMX)
  ------------------
  |  |  277|      0|#define CPUID_STD_MMX               (1<<23)
  ------------------
  |  Branch (322:25): [True: 0, False: 0]
  ------------------
  323|      0|                        features |= PlatformInformation::CPU_FEATURE_MMX;
  324|      0|                    if (result._edx & CPUID_STD_SSE)
  ------------------
  |  |  278|      0|#define CPUID_STD_SSE               (1<<25)
  ------------------
  |  Branch (324:25): [True: 0, False: 0]
  ------------------
  325|      0|                        features |= PlatformInformation::CPU_FEATURE_MMXEXT | PlatformInformation::CPU_FEATURE_SSE;
  326|      0|                    if (result._edx & CPUID_STD_SSE2)
  ------------------
  |  |  279|      0|#define CPUID_STD_SSE2              (1<<26)
  ------------------
  |  Branch (326:25): [True: 0, False: 0]
  ------------------
  327|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE2;
  328|      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 (328:25): [True: 0, False: 0]
  ------------------
  329|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE3;
  330|      0|                    if (result._ecx & CPUID_STD_SSE41)
  ------------------
  |  |  283|      0|#define CPUID_STD_SSE41             (1<<19)     // ECX[19] - Bit 0 of standard function 1 indicate SSE41 supported
  ------------------
  |  Branch (330:25): [True: 0, False: 0]
  ------------------
  331|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE41;
  332|      0|                    if (result._ecx & CPUID_STD_SSE42)
  ------------------
  |  |  284|      0|#define CPUID_STD_SSE42             (1<<20)     // ECX[20] - Bit 0 of standard function 1 indicate SSE42 supported
  ------------------
  |  Branch (332:25): [True: 0, False: 0]
  ------------------
  333|      0|                        features |= PlatformInformation::CPU_FEATURE_SSE42;
  334|       |
  335|       |                    // Check to see if this is a Pentium 4 or later processor
  336|      0|                    if ((result._eax & CPUID_EXT_FAMILY_ID_MASK) ||
  ------------------
  |  |  287|      0|#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: 0]
  ------------------
  337|      0|                        (result._eax & CPUID_FAMILY_ID_MASK) == CPUID_PENTIUM4_ID)
  ------------------
  |  |  286|      0|#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|      0|#define CPUID_PENTIUM4_ID           0x0F00      // Pentium 4 family processor id
  ------------------
  |  Branch (337:25): [True: 0, False: 0]
  ------------------
  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|      0|                    const uint maxExtensionFunctionSupport = _performCpuid(CPUID_FUNC_EXTENSION_QUERY, result);
  ------------------
  |  |  270|      0|#define CPUID_FUNC_EXTENSION_QUERY           0x80000000
  ------------------
  346|      0|                    if (maxExtensionFunctionSupport >= CPUID_FUNC_ADVANCED_POWER_MANAGEMENT)
  ------------------
  |  |  272|      0|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  |  Branch (346:25): [True: 0, False: 0]
  ------------------
  347|      0|                    {
  348|      0|                        _performCpuid(CPUID_FUNC_ADVANCED_POWER_MANAGEMENT, result);
  ------------------
  |  |  272|      0|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  349|       |
  350|      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 (350:29): [True: 0, False: 0]
  ------------------
  351|      0|                            features |= PlatformInformation::CPU_FEATURE_INVARIANT_TSC;
  352|      0|                    }
  353|      0|                }
  354|      2|                else if (memcmp(&result._ebx, "AuthenticAMD", 12) == 0)
  ------------------
  |  Branch (354:26): [True: 2, False: 0]
  ------------------
  355|      2|                {
  356|      2|                    features |= PlatformInformation::CPU_FEATURE_PRO;
  357|       |
  358|       |                    // Check standard feature
  359|      2|                    _performCpuid(CPUID_FUNC_STANDARD_FEATURES, result);
  ------------------
  |  |  269|      2|#define CPUID_FUNC_STANDARD_FEATURES         0x1
  ------------------
  360|       |
  361|      2|                    if (result._edx & CPUID_STD_FPU)
  ------------------
  |  |  274|      2|#define CPUID_STD_FPU               (1<<0)
  ------------------
  |  Branch (361:25): [True: 2, False: 0]
  ------------------
  362|      2|                        features |= PlatformInformation::CPU_FEATURE_FPU;
  363|      2|                    if (result._edx & CPUID_STD_TSC)
  ------------------
  |  |  275|      2|#define CPUID_STD_TSC               (1<<4)
  ------------------
  |  Branch (363:25): [True: 2, False: 0]
  ------------------
  364|      2|                        features |= PlatformInformation::CPU_FEATURE_TSC;
  365|      2|                    if (result._edx & CPUID_STD_CMOV)
  ------------------
  |  |  276|      2|#define CPUID_STD_CMOV              (1<<15)
  ------------------
  |  Branch (365:25): [True: 2, False: 0]
  ------------------
  366|      2|                        features |= PlatformInformation::CPU_FEATURE_CMOV;
  367|      2|                    if (result._edx & CPUID_STD_MMX)
  ------------------
  |  |  277|      2|#define CPUID_STD_MMX               (1<<23)
  ------------------
  |  Branch (367:25): [True: 2, False: 0]
  ------------------
  368|      2|                        features |= PlatformInformation::CPU_FEATURE_MMX;
  369|      2|                    if (result._edx & CPUID_STD_SSE)
  ------------------
  |  |  278|      2|#define CPUID_STD_SSE               (1<<25)
  ------------------
  |  Branch (369:25): [True: 2, False: 0]
  ------------------
  370|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE;
  371|      2|                    if (result._edx & CPUID_STD_SSE2)
  ------------------
  |  |  279|      2|#define CPUID_STD_SSE2              (1<<26)
  ------------------
  |  Branch (371:25): [True: 2, False: 0]
  ------------------
  372|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE2;
  373|       |
  374|      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 (374:25): [True: 2, False: 0]
  ------------------
  375|      2|                        features |= PlatformInformation::CPU_FEATURE_SSE3;
  376|       |
  377|       |                    // Has extended feature ?
  378|      2|                    const uint maxExtensionFunctionSupport = _performCpuid(CPUID_FUNC_EXTENSION_QUERY, result);
  ------------------
  |  |  270|      2|#define CPUID_FUNC_EXTENSION_QUERY           0x80000000
  ------------------
  379|      2|                    if (maxExtensionFunctionSupport >= CPUID_FUNC_EXTENDED_FEATURES)
  ------------------
  |  |  271|      2|#define CPUID_FUNC_EXTENDED_FEATURES         0x80000001
  ------------------
  |  Branch (379:25): [True: 2, False: 0]
  ------------------
  380|      2|                    {
  381|       |                        // Check extended feature
  382|      2|                        _performCpuid(CPUID_FUNC_EXTENDED_FEATURES, result);
  ------------------
  |  |  271|      2|#define CPUID_FUNC_EXTENDED_FEATURES         0x80000001
  ------------------
  383|       |
  384|      2|                        if (result._edx & CPUID_EXT_3DNOW)
  ------------------
  |  |  290|      2|#define CPUID_EXT_3DNOW             (1<<31)
  ------------------
  |  Branch (384:29): [True: 0, False: 2]
  ------------------
  385|      0|                            features |= PlatformInformation::CPU_FEATURE_3DNOW;
  386|      2|                        if (result._edx & CPUID_EXT_AMD_3DNOWEXT)
  ------------------
  |  |  291|      2|#define CPUID_EXT_AMD_3DNOWEXT      (1<<30)
  ------------------
  |  Branch (386:29): [True: 0, False: 2]
  ------------------
  387|      0|                            features |= PlatformInformation::CPU_FEATURE_3DNOWEXT;
  388|      2|                        if (result._edx & CPUID_EXT_AMD_MMXEXT)
  ------------------
  |  |  292|      2|#define CPUID_EXT_AMD_MMXEXT        (1<<22)
  ------------------
  |  Branch (388:29): [True: 2, False: 0]
  ------------------
  389|      2|                            features |= PlatformInformation::CPU_FEATURE_MMXEXT;
  390|      2|                    }
  391|       |
  392|       |
  393|      2|                    if (maxExtensionFunctionSupport >= CPUID_FUNC_ADVANCED_POWER_MANAGEMENT)
  ------------------
  |  |  272|      2|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  |  Branch (393:25): [True: 2, False: 0]
  ------------------
  394|      2|                    {
  395|      2|                        _performCpuid(CPUID_FUNC_ADVANCED_POWER_MANAGEMENT, result);
  ------------------
  |  |  272|      2|#define CPUID_FUNC_ADVANCED_POWER_MANAGEMENT 0x80000007
  ------------------
  396|       |
  397|      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 (397:29): [True: 2, False: 0]
  ------------------
  398|      2|                            features |= PlatformInformation::CPU_FEATURE_INVARIANT_TSC;
  399|      2|                    }
  400|      2|                }
  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|  47.7k|        : mTarget(target), mName(name)
   35|  47.7k|    {
   36|  47.7k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEE:
   39|  3.74k|    {
   40|  3.74k|        OgreAssert(mNormalsMap.empty(),
  ------------------
  |  Branch (40:9): [True: 0, False: 3.74k]
  ------------------
   41|  3.74k|                   "Inconsistent calls to addVertex, must include normals always or never");
   42|       |
   43|  3.74k|        if(offset.squaredLength() < 1e-6f)
  ------------------
  |  Branch (43:12): [True: 224, False: 3.52k]
  ------------------
   44|    224|        {
   45|    224|            return;
   46|    224|        }
   47|       |
   48|  3.52k|        mVertexOffsetMap[index] = offset;
   49|  3.52k|        mBuffer.reset();
   50|  3.52k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEES4_:
   53|  3.57k|    {
   54|  3.57k|        OgreAssert(mVertexOffsetMap.empty() || !mNormalsMap.empty(),
  ------------------
  |  Branch (54:9): [True: 1.01k, False: 2.56k]
  |  Branch (54:9): [True: 2.56k, False: 0]
  ------------------
   55|  3.57k|                   "Inconsistent calls to addVertex, must include normals always or never");
   56|       |
   57|  3.57k|        if(offset.squaredLength() < 1e-6f && normal.squaredLength() < 1e-6f)
  ------------------
  |  Branch (57:12): [True: 1.04k, False: 2.53k]
  |  Branch (57:46): [True: 226, False: 817]
  ------------------
   58|    226|        {
   59|    226|            return;
   60|    226|        }
   61|       |
   62|  3.35k|        mVertexOffsetMap[index] = offset;
   63|  3.35k|        mNormalsMap[index] = normal;
   64|  3.35k|        mBuffer.reset();
   65|  3.35k|    }

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

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

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

_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|  10.4k|    {
   54|  10.4k|        OgreAssert(!name.empty(), "resource name must not be empty");
  ------------------
  |  Branch (54:9): [True: 2, False: 10.4k]
  ------------------
   55|       |
   56|       |        // Call creation implementation
   57|  10.4k|        ResourcePtr ret = ResourcePtr(
   58|  10.4k|            createImpl(name, getNextHandle(), group, isManual, loader, params));
   59|  10.4k|        if (params)
  ------------------
  |  Branch (59:13): [True: 0, False: 10.4k]
  ------------------
   60|      0|            ret->setParameterList(*params);
   61|       |
   62|  10.4k|        addImpl(ret);
   63|       |        // Tell resource group manager
   64|  10.4k|        if(ret)
  ------------------
  |  Branch (64:12): [True: 10.4k, False: 0]
  ------------------
   65|  10.4k|            ResourceGroupManager::getSingleton()._notifyResourceCreated(ret);
   66|  10.4k|        return ret;
   67|       |
   68|  10.4k|    }
_ZN4Ogre15ResourceManager16createOrRetrieveERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   75|  21.1k|    {
   76|       |        // Lock for the whole get / insert
   77|  21.1k|            OGRE_LOCK_AUTO_MUTEX;
   78|       |
   79|  21.1k|        ResourcePtr res = getResourceByName(name, group);
   80|  21.1k|        bool created = false;
   81|  21.1k|        if (!res)
  ------------------
  |  Branch (81:13): [True: 4.42k, False: 16.7k]
  ------------------
   82|  4.42k|        {
   83|  4.42k|            created = true;
   84|  4.42k|            res = createResource(name, group, isManual, loader, params);
   85|  4.42k|        }
   86|       |
   87|  21.1k|        return ResourceCreateOrRetrieveResult(res, created);
   88|  21.1k|    }
_ZN4Ogre15ResourceManager7prepareERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
   93|    110|    {
   94|    110|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
   95|       |        // ensure prepared
   96|    110|        r->prepare(backgroundThread);
   97|    110|        return r;
   98|    110|    }
_ZN4Ogre15ResourceManager4loadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
  103|  21.0k|    {
  104|  21.0k|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
  105|       |        // ensure loaded
  106|  21.0k|        r->load(backgroundThread);
  107|       |
  108|  21.0k|        return r;
  109|  21.0k|    }
_ZN4Ogre15ResourceManager7addImplERNS_9SharedPtrINS_8ResourceEEE:
  112|  10.4k|    {
  113|  10.4k|            OGRE_LOCK_AUTO_MUTEX;
  114|       |
  115|  10.4k|            std::pair<ResourceMap::iterator, bool> result;
  116|  10.4k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (116:12): [True: 10.4k, False: 0]
  ------------------
  117|  10.4k|        {
  118|  10.4k|            result = mResources.emplace(res->getName(), res);
  119|  10.4k|        }
  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|  10.4k|        ResourceLoadingListener* listener = ResourceGroupManager::getSingleton().getLoadingListener();
  129|  10.4k|        if (!result.second && listener)
  ------------------
  |  Branch (129:13): [True: 0, False: 10.4k]
  |  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|  10.4k|        if (!result.second)
  ------------------
  |  Branch (150:13): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|        std::pair<ResourceHandleMap::iterator, bool> resultHandle = mResourcesByHandle.emplace(res->getHandle(), res);
  158|  10.4k|        if (!resultHandle.second)
  ------------------
  |  Branch (158:13): [True: 0, False: 10.4k]
  ------------------
  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|  10.4k|    }
_ZN4Ogre15ResourceManager10removeImplERKNS_9SharedPtrINS_8ResourceEEE:
  167|  6.03k|    {
  168|  6.03k|        OgreAssert(res, "attempting to remove nullptr");
  ------------------
  |  Branch (168:9): [True: 0, False: 6.03k]
  ------------------
  169|       |
  170|  6.03k|#if OGRE_RESOURCEMANAGER_STRICT
  171|  6.03k|        if (res->getCreator() != this)
  ------------------
  |  Branch (171:13): [True: 0, False: 6.03k]
  ------------------
  172|  6.03k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Resource '" + res->getName() + "' was not created by the '" +
  173|  6.03k|                                                          getResourceType() + "' ResourceManager");
  174|  6.03k|#endif
  175|       |
  176|  6.03k|        OGRE_LOCK_AUTO_MUTEX;
  177|       |
  178|  6.03k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (178:12): [True: 6.03k, False: 0]
  ------------------
  179|  6.03k|        {
  180|  6.03k|            ResourceMap::iterator nameIt = mResources.find(res->getName());
  181|  6.03k|            if (nameIt != mResources.end())
  ------------------
  |  Branch (181:17): [True: 6.03k, False: 0]
  ------------------
  182|  6.03k|            {
  183|  6.03k|                mResources.erase(nameIt);
  184|  6.03k|            }
  185|  6.03k|        }
  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|  6.03k|        ResourceHandleMap::iterator handleIt = mResourcesByHandle.find(res->getHandle());
  205|  6.03k|        if (handleIt != mResourcesByHandle.end())
  ------------------
  |  Branch (205:13): [True: 6.03k, False: 0]
  ------------------
  206|  6.03k|        {
  207|  6.03k|            mResourcesByHandle.erase(handleIt);
  208|  6.03k|        }
  209|       |        // Tell resource group manager
  210|  6.03k|        ResourceGroupManager::getSingleton()._notifyResourceRemoved(res);
  211|  6.03k|    }
_ZN4Ogre15ResourceManager6removeERKNS_9SharedPtrINS_8ResourceEEE:
  298|  6.03k|    {
  299|  6.03k|        removeImpl(res);
  300|  6.03k|    }
_ZNK4Ogre15ResourceManager17getResourceByNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  368|   135k|    {
  369|   135k|        OGRE_LOCK_AUTO_MUTEX;
  370|       |
  371|       |        // resource should be in global pool
  372|   135k|        bool isGlobal = ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(groupName);
  373|       |
  374|   135k|        if(isGlobal)
  ------------------
  |  Branch (374:12): [True: 135k, False: 0]
  ------------------
  375|   135k|        {
  376|   135k|            auto it = mResources.find(name);
  377|   135k|            if( it != mResources.end())
  ------------------
  |  Branch (377:17): [True: 16.7k, False: 118k]
  ------------------
  378|  16.7k|            {
  379|  16.7k|                return it->second;
  380|  16.7k|            }
  381|   135k|        }
  382|       |
  383|       |        // look in all grouped pools
  384|   118k|        if (groupName == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (384:13): [True: 0, False: 118k]
  ------------------
  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|   118k|        else if (!isGlobal)
  ------------------
  |  Branch (396:18): [True: 0, False: 118k]
  ------------------
  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|   118k|        return ResourcePtr();
  421|   118k|    }
_ZN4Ogre15ResourceManager13getNextHandleEv:
  431|  10.4k|    {
  432|       |        // This is an atomic operation and hence needs no locking
  433|  10.4k|        return mNextHandle++;
  434|  10.4k|    }
_ZN4Ogre15ResourceManager10checkUsageEv:
  437|  4.81k|    {
  438|  4.81k|        if (getMemoryUsage() > mMemoryBudget)
  ------------------
  |  Branch (438:13): [True: 0, False: 4.81k]
  ------------------
  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|  4.81k|    }
_ZN4Ogre15ResourceManager21_notifyResourceLoadedEPNS_8ResourceE:
  466|  4.81k|    {
  467|  4.81k|        mMemoryUsage += res->getSize();
  468|  4.81k|        checkUsage();
  469|  4.81k|    }
_ZN4Ogre15ResourceManager23_notifyResourceUnloadedEPNS_8ResourceE:
  472|  4.81k|    {
  473|  4.81k|        mMemoryUsage -= res->getSize();
  474|  4.81k|    }

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

_ZN4Ogre10SerializerC2Ev:
   36|  36.8k|        mVersion("[Serializer_v1.00]"), // Version number
   37|  36.8k|        mFlipEndian(false)
   38|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
   39|       |        , mReportChunkErrors(true)
   40|       |#endif
   41|  36.8k|    {
   42|  36.8k|    }
_ZN4Ogre10SerializerD2Ev:
   46|  36.8k|    {
   47|  36.8k|    }
_ZN4Ogre10Serializer19determineEndiannessERKNS_9SharedPtrINS_10DataStreamEEE:
   50|  10.7k|    {
   51|  10.7k|        if (stream->tell() != 0)
  ------------------
  |  Branch (51:13): [True: 0, False: 10.7k]
  ------------------
   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|  10.7k|        uint16 dest;
   59|       |        // read header id manually (no conversion)
   60|  10.7k|        size_t actually_read = stream->read(&dest, sizeof(uint16));
   61|       |        // skip back
   62|  10.7k|        stream->skip(0 - (long)actually_read);
   63|  10.7k|        if (actually_read != sizeof(uint16))
  ------------------
  |  Branch (63:13): [True: 4, False: 10.7k]
  ------------------
   64|      4|        {
   65|       |            // end of file?
   66|      4|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   67|      4|                        "Couldn't read 16 bit header value from input stream.",
   68|      4|                        "Serializer::determineEndianness");
   69|      4|        }
   70|  10.7k|        if (dest == HEADER_STREAM_ID)
  ------------------
  |  Branch (70:13): [True: 2.75k, False: 7.99k]
  ------------------
   71|  2.75k|        {
   72|  2.75k|            mFlipEndian = false;
   73|  2.75k|        }
   74|  7.99k|        else if (dest == OTHER_ENDIAN_HEADER_STREAM_ID)
  ------------------
  |  Branch (74:18): [True: 7.95k, False: 39]
  ------------------
   75|  7.95k|        {
   76|  7.95k|            mFlipEndian = true;
   77|  7.95k|        }
   78|     39|        else
   79|     39|        {
   80|       |            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   81|     39|                "Header chunk didn't match either endian: Corrupted stream?",
   82|     39|                "Serializer::determineEndianness");
   83|     39|        }
   84|  10.7k|    }
_ZN4Ogre10Serializer14readFileHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  235|  4.71k|    {
  236|  4.71k|        unsigned short headerID;
  237|       |        
  238|       |        // Read header ID
  239|  4.71k|        readShorts(stream, &headerID, 1);
  240|       |        
  241|  4.71k|        if (headerID == HEADER_STREAM_ID)
  ------------------
  |  Branch (241:13): [True: 4.71k, False: 0]
  ------------------
  242|  4.71k|        {
  243|       |            // Read version
  244|  4.71k|            String ver = readString(stream);
  245|  4.71k|            if (ver != mVersion)
  ------------------
  |  Branch (245:17): [True: 0, False: 4.71k]
  ------------------
  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|  4.71k|        }
  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|  4.71k|    }
_ZN4Ogre10Serializer9readChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  262|   824k|    {
  263|   824k|        size_t pos = stream->tell();
  264|   824k|        unsigned short id;
  265|   824k|        readShorts(stream, &id, 1);
  266|       |        
  267|   824k|        readInts(stream, &mCurrentstreamLen, 1);
  268|       |
  269|   824k|        if (!stream->eof())
  ------------------
  |  Branch (269:13): [True: 821k, False: 2.97k]
  ------------------
  270|   821k|        {
  271|       |            // chunk size cant be smaller than the header size, and must fit within the stream
  272|   821k|            if (mCurrentstreamLen < calcChunkHeaderSize() || pos + mCurrentstreamLen > stream->size())
  ------------------
  |  Branch (272:17): [True: 807, False: 820k]
  |  Branch (272:62): [True: 2.17k, False: 818k]
  ------------------
  273|   821k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Corrupt chunk length");
  274|   821k|        }
  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|   821k|        return id;
  285|   824k|    }
_ZN4Ogre10Serializer9readBoolsERKNS_9SharedPtrINS_10DataStreamEEEPbm:
  288|   322k|    {
  289|   322k|        static_assert(sizeof(bool) == 1, "add conversion to char for your platform");
  290|   322k|        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|   645k|        for (size_t i = 0; i < count; ++i)
  ------------------
  |  Branch (293:28): [True: 322k, False: 322k]
  ------------------
  294|   322k|        {
  295|   322k|            uint8_t raw;
  296|   322k|            memcpy(&raw, &pDest[i], 1);
  297|   322k|            pDest[i] = (raw != 0);
  298|   322k|        }
  299|   322k|    }
_ZN4Ogre10Serializer10readFloatsERKNS_9SharedPtrINS_10DataStreamEEEPfm:
  302|  51.6k|    {
  303|  51.6k|        stream->read(pDest, sizeof(float) * count);
  304|  51.6k|        flipFromLittleEndian(pDest, sizeof(float), count);
  305|  51.6k|    }
_ZN4Ogre10Serializer10readShortsERKNS_9SharedPtrINS_10DataStreamEEEPtm:
  323|  1.16M|    {
  324|  1.16M|        stream->read(pDest, sizeof(unsigned short) * count);
  325|  1.16M|        flipFromLittleEndian(pDest, sizeof(unsigned short), count);
  326|  1.16M|    }
_ZN4Ogre10Serializer8readIntsERKNS_9SharedPtrINS_10DataStreamEEEPjm:
  329|  1.08M|    {
  330|  1.08M|        stream->read(pDest, sizeof(uint32) * count);
  331|  1.08M|        flipFromLittleEndian(pDest, sizeof(uint32), count);
  332|  1.08M|    }
_ZN4Ogre10Serializer10readStringERKNS_9SharedPtrINS_10DataStreamEEE:
  335|   231k|    {
  336|   231k|        return stream->getLine(false);
  337|   231k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_6VectorILi3EfEE:
  356|  1.65k|    {
  357|  1.65k|        readFloats(stream, pDest.ptr(), 3);
  358|  1.65k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_10QuaternionE:
  361|  1.52k|    {
  362|  1.52k|        float tmp[4];
  363|  1.52k|        readFloats(stream, tmp, 4);
  364|  1.52k|        pDest.x = tmp[0];
  365|  1.52k|        pDest.y = tmp[1];
  366|  1.52k|        pDest.z = tmp[2];
  367|  1.52k|        pDest.w = tmp[3];
  368|  1.52k|    }
_ZN4Ogre10Serializer20flipFromLittleEndianEPvmm:
  381|  2.29M|    {
  382|  2.29M|        if(mFlipEndian)
  ------------------
  |  Branch (382:12): [True: 1.81M, False: 475k]
  ------------------
  383|  1.81M|        {
  384|  1.81M|	        Bitwise::bswapChunks(pData, size, count);
  385|  1.81M|        }
  386|  2.29M|    }
_ZN4Ogre10Serializer14pushInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  389|   373k|    {
  390|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  391|       |        mChunkSizeStack.push_back(stream->tell());
  392|       |#endif
  393|   373k|    }
_ZN4Ogre10Serializer20backpedalChunkHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  395|   338k|    {
  396|   338k|        if (!stream->eof()){
  ------------------
  |  Branch (396:13): [True: 338k, False: 0]
  ------------------
  397|   338k|            stream->skip(-(int)calcChunkHeaderSize());
  398|   338k|        }
  399|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  400|       |        mChunkSizeStack.back() = stream->tell();
  401|       |#endif
  402|   338k|    }
_ZN4Ogre10Serializer13popInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  404|   359k|    {
  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|   359k|    }

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

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

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

_ZN4Ogre16StreamSerialiserC2ERKNS_9SharedPtrINS_10DataStreamEEENS0_6EndianEbNS0_17RealStorageFormatE:
  109|    387|        : mStream(stream)
  110|    387|        , mEndian(endianMode)
  111|    387|        , mFlipEndian(false)
  112|    387|        , mReadWriteHeader(autoHeader)
  113|    387|        , mRealFormat(realFormat)
  114|    387|    {
  115|    387|        if (mEndian != ENDIAN_AUTO)
  ------------------
  |  Branch (115:13): [True: 0, False: 387]
  ------------------
  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: 387]
  ------------------
  128|    387|    }
_ZN4Ogre16StreamSerialiserD2Ev:
  131|    387|    {
  132|       |        // really this should be empty if read/write was complete, but be tidy
  133|    387|        if (!mChunkStack.empty())
  ------------------
  |  Branch (133:13): [True: 2, False: 385]
  ------------------
  134|      2|        {
  135|      2|            LogManager::getSingleton().stream(LML_WARNING) <<
  136|      2|                "Warning: stream " << mStream->getName() << " was not fully read / written; " <<
  137|      2|                mChunkStack.size() << " chunks remain unterminated.";
  138|      2|        }
  139|    387|        for (auto & i : mChunkStack)
  ------------------
  |  Branch (139:23): [True: 2, False: 387]
  ------------------
  140|      2|            delete i;
  141|    387|        mChunkStack.clear();
  142|       |
  143|    387|    }
_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.24k|    {
  166|       |        // Have we figured out the endian mode yet?
  167|  1.24k|        if (mReadWriteHeader)
  ------------------
  |  Branch (167:13): [True: 387, False: 860]
  ------------------
  168|    387|            readHeader();
  169|       |
  170|  1.24k|        OgreAssert(mEndian != ENDIAN_AUTO,
  ------------------
  |  Branch (170:9): [True: 0, False: 1.24k]
  ------------------
  171|  1.24k|                   "Endian mode has not been determined, did you disable header without setting?");
  172|       |
  173|  1.24k|        Chunk* chunk = readChunkImpl();
  174|  1.24k|        mChunkStack.push_back(chunk);
  175|       |
  176|  1.24k|        return chunk;
  177|       |
  178|  1.24k|    }
_ZN4Ogre16StreamSerialiser12readChunkEndEj:
  239|    745|    {
  240|    745|        Chunk* c = popChunk(id);
  241|       |
  242|    745|        OgreAssert(mStream, "Stream is null");
  ------------------
  |  Branch (242:9): [True: 0, False: 745]
  ------------------
  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|    745|        if (mStream->tell() < (c->offset + CHUNK_HEADER_SIZE + c->length))
  ------------------
  |  Branch (247:13): [True: 80, False: 665]
  ------------------
  248|     80|            mStream->seek(c->offset + CHUNK_HEADER_SIZE + c->length);
  249|       |
  250|       |        OGRE_DELETE c;
  251|    745|    }
_ZN4Ogre16StreamSerialiser10readHeaderEv:
  261|    387|    {
  262|    387|        uint32 headerid = 0;
  263|    387|        size_t actually_read = mStream->read(&headerid, sizeof(uint32));
  264|       |        // skip back
  265|    387|        mStream->skip(0 - (long)actually_read);
  266|       |        // validate that this is a header chunk
  267|    387|        if (headerid == REVERSE_HEADER_ID)
  ------------------
  |  Branch (267:13): [True: 21, False: 366]
  ------------------
  268|     21|        {
  269|     21|            mFlipEndian = true;
  270|     21|        }
  271|    366|        else if (headerid == HEADER_ID)
  ------------------
  |  Branch (271:18): [True: 277, False: 89]
  ------------------
  272|    277|        {
  273|    277|            mFlipEndian = false;
  274|    277|        }
  275|     89|        else
  276|     89|        {
  277|       |            // no good
  278|     89|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, 
  279|     89|                "Cannot determine endian mode because header is missing", 
  280|     89|                "StreamSerialiser::readHeader");
  281|     89|        }
  282|    298|        determineEndianness();
  283|       |
  284|    298|        mReadWriteHeader = false;
  285|       |
  286|    298|        const Chunk* c = readChunkBegin();
  287|       |        // endian should be flipped now
  288|    298|        assert(c->id == HEADER_ID);
  289|    298|        (void)c; // Silence warning
  290|       |
  291|       |        // read real storage format
  292|    298|        bool realIsDouble;
  293|    298|        read(&realIsDouble);
  294|    298|        mRealFormat = realIsDouble? REAL_DOUBLE : REAL_FLOAT;
  ------------------
  |  Branch (294:23): [True: 56, False: 242]
  ------------------
  295|       |
  296|    298|        readChunkEnd(HEADER_ID);
  297|       |
  298|    298|    }
_ZN4Ogre16StreamSerialiser19determineEndiannessEv:
  301|    298|    {
  302|       |#if OGRE_ENDIAN == OGRE_ENDIAN_BIG
  303|       |        if (mFlipEndian)
  304|       |            mEndian = ENDIAN_LITTLE;
  305|       |        else
  306|       |            mEndian = ENDIAN_BIG;
  307|       |#else
  308|    298|        if (mFlipEndian)
  ------------------
  |  Branch (308:13): [True: 21, False: 277]
  ------------------
  309|     21|            mEndian = ENDIAN_BIG;
  310|    277|        else
  311|    277|            mEndian = ENDIAN_LITTLE;
  312|    298|#endif
  313|    298|    }
_ZNK4Ogre16StreamSerialiser11checkStreamEbbb:
  330|  6.22k|    {
  331|  6.22k|        OgreAssert(mStream, "Stream is null");
  ------------------
  |  Branch (331:9): [True: 0, False: 6.22k]
  ------------------
  332|       |
  333|  6.22k|        if (failOnEof && mStream->eof())
  ------------------
  |  Branch (333:13): [True: 6.22k, False: 0]
  |  Branch (333:26): [True: 347, False: 5.88k]
  ------------------
  334|  6.22k|            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.04k|    {
  422|  1.04k|        auto chunk = std::make_unique<Chunk>();
  423|  1.04k|        chunk->offset = static_cast<uint32>(mStream->tell());
  424|  1.04k|        read(&chunk->id);
  425|  1.04k|        read(&chunk->version);
  426|  1.04k|        read(&chunk->length);
  427|       |
  428|  1.04k|        if (chunk->length > mStream->size() - mStream->tell())
  ------------------
  |  Branch (428:13): [True: 41, False: 999]
  ------------------
  429|  1.04k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Chunk length field exceeds remaining stream data");
  430|       |
  431|    999|        uint32 checksum;
  432|    999|        read(&checksum);
  433|       |        
  434|    999|        if (checksum != calculateChecksum(chunk.get()))
  ------------------
  |  Branch (434:13): [True: 113, False: 886]
  ------------------
  435|    113|        {
  436|       |            // no good, this is an invalid chunk
  437|    113|            uint32 off = chunk->offset;
  438|    113|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, 
  439|    113|                "Corrupt chunk detected in stream " + mStream->getName() + " at byte "
  440|    113|                + StringConverter::toString(off), 
  441|    113|                "StreamSerialiser::readChunkImpl");
  442|    113|        }
  443|       |
  444|    886|        return chunk.release();
  445|       |
  446|       |
  447|    999|    }
_ZN4Ogre16StreamSerialiser8readDataEPvmm:
  617|  6.22k|    {
  618|  6.22k|        checkStream(true, true, false);
  619|       |
  620|  6.22k|        size_t totSize = size * count;
  621|  6.22k|        mStream->read(buf, totSize);
  622|       |
  623|  6.22k|        if (mFlipEndian)
  ------------------
  |  Branch (623:13): [True: 73, False: 6.15k]
  ------------------
  624|     73|			Bitwise::bswapChunks(buf, size, count);
  625|       |
  626|  6.22k|    }
_ZN4Ogre16StreamSerialiser4readEPNS_6VectorILi3EfEEm:
  637|    564|    {
  638|  1.12k|        for (size_t i = 0; i < count; ++i, ++vec)
  ------------------
  |  Branch (638:28): [True: 564, False: 564]
  ------------------
  639|    564|        {
  640|    564|            read(vec->ptr(), 3);
  641|    564|        }
  642|    564|    }
_ZN4Ogre16StreamSerialiser4readEPNS_6VectorILi4EfEEm:
  645|    564|    {
  646|  1.12k|        for (size_t i = 0; i < count; ++i, ++vec)
  ------------------
  |  Branch (646:28): [True: 564, False: 564]
  ------------------
  647|    564|        {
  648|    564|            read(vec->ptr(), 4);
  649|    564|        }
  650|    564|    }
_ZN4Ogre16StreamSerialiser4readEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  677|    564|    {
  678|       |        // String is stored as a uint32 character count, then string
  679|    564|        uint32 len;
  680|    564|        read(&len);
  681|       |
  682|       |        // Guard against OOM from corrupt/malicious input: cap len to remaining chunk bytes
  683|    564|        OgreAssertDbg(mChunkStack.size(), "Not currently in a chunk, cannot read string length");
  684|    564|        if (len > mChunkStack.back()->length)
  ------------------
  |  Branch (684:13): [True: 387, False: 177]
  ------------------
  685|    564|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "String length field exceeds remaining chunk data");
  686|       |
  687|    177|        string->resize(len);
  688|    177|        if (len)
  ------------------
  |  Branch (688:13): [True: 57, False: 120]
  ------------------
  689|     57|            read(&(*string->begin()), len);
  690|    177|    }
_ZN4Ogre16StreamSerialiser4readEPfm:
  693|  1.69k|    {
  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.69k|        if (mRealFormat == REAL_FLOAT)
  ------------------
  |  Branch (700:13): [True: 1.13k, False: 558]
  ------------------
  701|  1.13k|            readData(val, sizeof(float), count);
  702|    558|        else
  703|    558|            readDoublesAsFloats(val, count);
  704|  1.69k|#endif
  705|       |
  706|  1.69k|    }
_ZN4Ogre16StreamSerialiser4readEPbm:
  785|    182|    {
  786|    364|        for (size_t i = 0; i < count; ++i, ++val)
  ------------------
  |  Branch (786:28): [True: 182, False: 182]
  ------------------
  787|    182|        {
  788|    182|            char c;
  789|    182|            read(&c);
  790|    182|            *val = (c == 1);
  791|    182|        }
  792|    182|    }
_ZN4Ogre16StreamSerialiser19readDoublesAsFloatsEPfm:
  813|    558|    {
  814|    558|        double t = 0;
  815|    558|        readConverted(val, t, count);
  816|    558|    }
_ZN4Ogre16StreamSerialiser17calculateChecksumEPNS0_5ChunkE:
  819|    859|    {
  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|    859|        uint32 id = c->id;
  823|    859|        uint16 version = c->version;
  824|    859|        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|    859|        uint32 hashVal = SuperFastHash((const char*)&id, sizeof(uint32), 0);
  833|    859|        hashVal = SuperFastHash((const char*)&version, sizeof(uint16), hashVal);
  834|    859|        hashVal = SuperFastHash((const char*)&length, sizeof(uint32), hashVal);
  835|       |
  836|    859|        return hashVal;
  837|    859|    }
_ZN4Ogre16StreamSerialiser8popChunkEj:
  840|    745|    {
  841|    745|        OgreAssert(!mChunkStack.empty(), "No active chunk!");
  ------------------
  |  Branch (841:9): [True: 0, False: 745]
  ------------------
  842|       |
  843|    745|        const Chunk* chunk = mChunkStack.back();
  844|    745|        OgreAssert(chunk->id == id, "Incorrect chunk id!");
  ------------------
  |  Branch (844:9): [True: 1, False: 744]
  ------------------
  845|       |
  846|    744|        Chunk* c = mChunkStack.back();
  847|    744|        mChunkStack.pop_back();
  848|    744|        return c;
  849|       |
  850|    745|    }
OgreStreamSerialiser.cpp:_ZN4OgreL13SuperFastHashEPKcij:
   40|  2.57k|    {
   41|  2.57k|#if OGRE_ENDIAN == OGRE_ENDIAN_LITTLE
   42|  2.57k|#  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.57k|        uint32 hash;
   49|  2.57k|        int rem;
   50|       |
   51|  2.57k|        if (hashSoFar)
  ------------------
  |  Branch (51:13): [True: 1.71k, False: 859]
  ------------------
   52|  1.71k|            hash = hashSoFar;
   53|    859|        else
   54|    859|            hash = len;
   55|       |
   56|  2.57k|        if (len <= 0 || data == NULL) return 0;
  ------------------
  |  Branch (56:13): [True: 0, False: 2.57k]
  |  Branch (56:25): [True: 0, False: 2.57k]
  ------------------
   57|       |
   58|  2.57k|        rem = len & 3;
   59|  2.57k|        len >>= 2;
   60|       |
   61|       |        /* Main loop */
   62|  4.29k|        for (;len > 0; len--) {
  ------------------
  |  Branch (62:15): [True: 1.71k, False: 2.57k]
  ------------------
   63|  1.71k|            hash  += OGRE_GET16BITS (data);
  ------------------
  |  |   42|  1.71k|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
   64|  1.71k|            uint32 tmp    = (OGRE_GET16BITS (data+2) << 11) ^ hash;
  ------------------
  |  |   42|  1.71k|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
   65|  1.71k|            hash   = (hash << 16) ^ tmp;
   66|  1.71k|            data  += 2*sizeof (uint16);
   67|  1.71k|            hash  += hash >> 11;
   68|  1.71k|        }
   69|       |
   70|       |        /* Handle end cases */
   71|  2.57k|        switch (rem) {
  ------------------
  |  Branch (71:17): [True: 859, False: 1.71k]
  ------------------
   72|      0|        case 3: hash += OGRE_GET16BITS (data);
  ------------------
  |  |   42|      0|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
  |  Branch (72:9): [True: 0, False: 2.57k]
  ------------------
   73|      0|            hash ^= hash << 16;
   74|      0|            hash ^= data[sizeof (uint16)] << 18;
   75|      0|            hash += hash >> 11;
   76|      0|            break;
   77|    859|        case 2: hash += OGRE_GET16BITS (data);
  ------------------
  |  |   42|    859|#  define OGRE_GET16BITS(d) (*((const uint16 *) (d)))
  ------------------
  |  Branch (77:9): [True: 859, False: 1.71k]
  ------------------
   78|    859|            hash ^= hash << 11;
   79|    859|            hash += hash >> 17;
   80|    859|            break;
   81|      0|        case 1: hash += *data;
  ------------------
  |  Branch (81:9): [True: 0, False: 2.57k]
  ------------------
   82|      0|            hash ^= hash << 10;
   83|      0|            hash += hash >> 1;
   84|  2.57k|        }
   85|       |
   86|       |        /* Force "avalanching" of final 127 bits */
   87|  2.57k|        hash ^= hash << 3;
   88|  2.57k|        hash += hash >> 5;
   89|  2.57k|        hash ^= hash << 4;
   90|  2.57k|        hash += hash >> 17;
   91|  2.57k|        hash ^= hash << 25;
   92|  2.57k|        hash += hash >> 6;
   93|       |
   94|  2.57k|        return hash;
   95|  2.57k|#undef OGRE_GET16BITS
   96|  2.57k|    }

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

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

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

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

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

