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

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

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

_ZN4Ogre8KeyFrameD2Ev:
   62|  5.58k|        virtual ~KeyFrame() {}
_ZNK4Ogre8KeyFrame7getTimeEv:
   65|  38.3k|        Real getTime(void) const { return mTime; }
_ZN4Ogre19VertexMorphKeyFrameD2Ev:
  158|  2.75k|        ~VertexMorphKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrameD2Ev:
  187|  1.98k|        ~VertexPoseKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrame7PoseRefC2Etf:
  208|  1.65k|            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.92k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_10DataStreamEEC2INS_16MemoryDataStreamEEEPT_:
   50|  7.29k|        explicit SharedPtr(Y* ptr) : shared_ptr<T>(ptr) {}
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_4MeshEEERKNS0_IT_EE:
   55|  4.92k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}
_ZNK4Ogre9SharedPtrINS_8SkeletonEEptEv:
   63|  1.06k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_8SkeletonEEERKNS0_IT_EE:
   55|  1.06k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmhb:
   39|  13.4k|        : HardwareBuffer(usage, useShadowBuffer),
   40|  13.4k|          mIsInstanceData(false),
   41|  13.4k|          mMgr(mgr),
   42|  13.4k|          mNumVertices(numVertices),
   43|  13.4k|          mVertexSize(vertexSize),
   44|  13.4k|          mInstanceDataStepRate(1)
   45|  13.4k|    {
   46|       |        // Calculate the size of the vertices
   47|  13.4k|        mSizeInBytes = mVertexSize * numVertices;
   48|       |
   49|       |        // Create a shadow buffer if required
   50|  13.4k|        if (useShadowBuffer)
  ------------------
  |  Branch (50:13): [True: 0, False: 13.4k]
  ------------------
   51|      0|        {
   52|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   53|      0|        }
   54|       |
   55|  13.4k|    }
_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmPNS_14HardwareBufferE:
   58|  13.4k|        : HardwareVertexBuffer(mgr, vertexSize, numVertices, delegate->getUsage(), false)
   59|  13.4k|    {
   60|  13.4k|        mDelegate.reset(delegate);
   61|  13.4k|    }
_ZN4Ogre20HardwareVertexBufferD2Ev:
   64|  13.4k|    {
   65|  13.4k|        if (mMgr)
  ------------------
  |  Branch (65:13): [True: 13.4k, False: 0]
  ------------------
   66|  13.4k|        {
   67|  13.4k|            mMgr->_notifyVertexBufferDestroyed(this);
   68|  13.4k|        }
   69|  13.4k|    }
_ZN4Ogre13VertexElementC2EtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  104|  32.6k|        : mOffset(offset), mSource(source), mIndex(index), mType(theType), mSemantic(semantic)
  105|  32.6k|    {
  106|  32.6k|    }
_ZNK4Ogre13VertexElement7getSizeEv:
  109|  46.1k|    {
  110|  46.1k|        return getTypeSize(mType);
  111|  46.1k|    }
_ZN4Ogre13VertexElement11getTypeSizeENS_17VertexElementTypeE:
  114|  48.8k|    {
  115|  48.8k|        switch(etype)
  ------------------
  |  Branch (115:16): [True: 48.1k, False: 721]
  ------------------
  116|  48.8k|        {
  117|    220|        case VET_FLOAT1:
  ------------------
  |  Branch (117:9): [True: 220, False: 48.6k]
  ------------------
  118|    220|            return sizeof(float);
  119|  6.87k|        case VET_FLOAT2:
  ------------------
  |  Branch (119:9): [True: 6.87k, False: 41.9k]
  ------------------
  120|  6.87k|            return sizeof(float)*2;
  121|  1.69k|        case VET_FLOAT3:
  ------------------
  |  Branch (121:9): [True: 1.69k, False: 47.1k]
  ------------------
  122|  1.69k|            return sizeof(float)*3;
  123|  1.37k|        case VET_FLOAT4:
  ------------------
  |  Branch (123:9): [True: 1.37k, False: 47.5k]
  ------------------
  124|  1.37k|            return sizeof(float)*4;
  125|     78|        case VET_DOUBLE1:
  ------------------
  |  Branch (125:9): [True: 78, False: 48.7k]
  ------------------
  126|     78|            return sizeof(double);
  127|    621|        case VET_DOUBLE2:
  ------------------
  |  Branch (127:9): [True: 621, False: 48.2k]
  ------------------
  128|    621|            return sizeof(double)*2;
  129|    157|        case VET_DOUBLE3:
  ------------------
  |  Branch (129:9): [True: 157, False: 48.7k]
  ------------------
  130|    157|            return sizeof(double)*3;
  131|    276|        case VET_DOUBLE4:
  ------------------
  |  Branch (131:9): [True: 276, False: 48.5k]
  ------------------
  132|    276|            return sizeof(double)*4;
  133|     31|        case VET_SHORT1:
  ------------------
  |  Branch (133:9): [True: 31, False: 48.8k]
  ------------------
  134|    123|        case VET_USHORT1:
  ------------------
  |  Branch (134:9): [True: 92, False: 48.7k]
  ------------------
  135|    196|        case VET_HALF1:
  ------------------
  |  Branch (135:9): [True: 73, False: 48.7k]
  ------------------
  136|    196|            return sizeof( short );
  137|    108|        case VET_SHORT2:
  ------------------
  |  Branch (137:9): [True: 108, False: 48.7k]
  ------------------
  138|  1.39k|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (138:9): [True: 1.29k, False: 47.5k]
  ------------------
  139|  1.46k|        case VET_USHORT2:
  ------------------
  |  Branch (139:9): [True: 63, False: 48.8k]
  ------------------
  140|  1.56k|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (140:9): [True: 102, False: 48.7k]
  ------------------
  141|  2.26k|        case VET_HALF2:
  ------------------
  |  Branch (141:9): [True: 706, False: 48.1k]
  ------------------
  142|  2.26k|            return sizeof( short ) * 2;
  143|     35|        case VET_SHORT3:
  ------------------
  |  Branch (143:9): [True: 35, False: 48.8k]
  ------------------
  144|    129|        case VET_USHORT3:
  ------------------
  |  Branch (144:9): [True: 94, False: 48.7k]
  ------------------
  145|    162|        case VET_HALF3:
  ------------------
  |  Branch (145:9): [True: 33, False: 48.8k]
  ------------------
  146|    162|            return sizeof( short ) * 3;
  147|     65|        case VET_SHORT4:
  ------------------
  |  Branch (147:9): [True: 65, False: 48.8k]
  ------------------
  148|    455|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (148:9): [True: 390, False: 48.4k]
  ------------------
  149|    636|        case VET_USHORT4:
  ------------------
  |  Branch (149:9): [True: 181, False: 48.6k]
  ------------------
  150|  5.25k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (150:9): [True: 4.61k, False: 44.2k]
  ------------------
  151|  8.84k|        case VET_HALF4:
  ------------------
  |  Branch (151:9): [True: 3.59k, False: 45.2k]
  ------------------
  152|  8.84k|            return sizeof( short ) * 4;
  153|    108|        case VET_INT1:
  ------------------
  |  Branch (153:9): [True: 108, False: 48.7k]
  ------------------
  154|    231|        case VET_UINT1:
  ------------------
  |  Branch (154:9): [True: 123, False: 48.7k]
  ------------------
  155|    231|            return sizeof( int );
  156|     70|        case VET_INT2:
  ------------------
  |  Branch (156:9): [True: 70, False: 48.8k]
  ------------------
  157|  1.16k|        case VET_UINT2:
  ------------------
  |  Branch (157:9): [True: 1.09k, False: 47.7k]
  ------------------
  158|  1.16k|            return sizeof( int ) * 2;
  159|    577|        case VET_INT3:
  ------------------
  |  Branch (159:9): [True: 577, False: 48.2k]
  ------------------
  160|    623|        case VET_UINT3:
  ------------------
  |  Branch (160:9): [True: 46, False: 48.8k]
  ------------------
  161|    623|            return sizeof( int ) * 3;
  162|    138|        case VET_INT4:
  ------------------
  |  Branch (162:9): [True: 138, False: 48.7k]
  ------------------
  163|    805|        case VET_UINT4:
  ------------------
  |  Branch (163:9): [True: 667, False: 48.2k]
  ------------------
  164|    805|            return sizeof( int ) * 4;
  165|  5.50k|        case VET_BYTE4:
  ------------------
  |  Branch (165:9): [True: 5.50k, False: 43.3k]
  ------------------
  166|  6.09k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (166:9): [True: 584, False: 48.2k]
  ------------------
  167|  7.69k|        case VET_UBYTE4:
  ------------------
  |  Branch (167:9): [True: 1.60k, False: 47.2k]
  ------------------
  168|  7.88k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (168:9): [True: 190, False: 48.6k]
  ------------------
  169|  11.8k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (169:9): [True: 3.97k, False: 44.8k]
  ------------------
  170|  11.8k|            return sizeof(char)*4;
  171|  10.6k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (171:9): [True: 10.6k, False: 38.1k]
  ------------------
  172|  10.6k|            return 4;
  173|  48.8k|        }
  174|    721|        return 0;
  175|  48.8k|    }
_ZN4Ogre13VertexElement12getTypeCountENS_17VertexElementTypeE:
  178|  26.2k|    {
  179|  26.2k|        switch (etype)
  ------------------
  |  Branch (179:17): [True: 26.2k, False: 0]
  ------------------
  180|  26.2k|        {
  181|    418|        case VET_FLOAT1:
  ------------------
  |  Branch (181:9): [True: 418, False: 25.8k]
  ------------------
  182|    813|        case VET_SHORT1:
  ------------------
  |  Branch (182:9): [True: 395, False: 25.8k]
  ------------------
  183|  1.22k|        case VET_USHORT1:
  ------------------
  |  Branch (183:9): [True: 416, False: 25.8k]
  ------------------
  184|  1.75k|        case VET_UINT1:
  ------------------
  |  Branch (184:9): [True: 529, False: 25.7k]
  ------------------
  185|  1.90k|        case VET_INT1:
  ------------------
  |  Branch (185:9): [True: 149, False: 26.1k]
  ------------------
  186|  2.30k|        case VET_DOUBLE1:
  ------------------
  |  Branch (186:9): [True: 398, False: 25.8k]
  ------------------
  187|  2.70k|        case VET_HALF1:
  ------------------
  |  Branch (187:9): [True: 400, False: 25.8k]
  ------------------
  188|  2.70k|            return 1;
  189|  2.39k|        case VET_FLOAT2:
  ------------------
  |  Branch (189:9): [True: 2.39k, False: 23.8k]
  ------------------
  190|  2.55k|        case VET_SHORT2:
  ------------------
  |  Branch (190:9): [True: 162, False: 26.1k]
  ------------------
  191|  3.42k|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (191:9): [True: 861, False: 25.4k]
  ------------------
  192|  3.46k|        case VET_USHORT2:
  ------------------
  |  Branch (192:9): [True: 42, False: 26.2k]
  ------------------
  193|  3.59k|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (193:9): [True: 134, False: 26.1k]
  ------------------
  194|  4.16k|        case VET_UINT2:
  ------------------
  |  Branch (194:9): [True: 569, False: 25.6k]
  ------------------
  195|  4.56k|        case VET_INT2:
  ------------------
  |  Branch (195:9): [True: 404, False: 25.8k]
  ------------------
  196|  5.24k|        case VET_DOUBLE2:
  ------------------
  |  Branch (196:9): [True: 679, False: 25.5k]
  ------------------
  197|  5.43k|        case VET_HALF2:
  ------------------
  |  Branch (197:9): [True: 187, False: 26.0k]
  ------------------
  198|  5.43k|            return 2;
  199|    454|        case VET_FLOAT3:
  ------------------
  |  Branch (199:9): [True: 454, False: 25.8k]
  ------------------
  200|    559|        case VET_SHORT3:
  ------------------
  |  Branch (200:9): [True: 105, False: 26.1k]
  ------------------
  201|    743|        case VET_USHORT3:
  ------------------
  |  Branch (201:9): [True: 184, False: 26.0k]
  ------------------
  202|  1.01k|        case VET_UINT3:
  ------------------
  |  Branch (202:9): [True: 274, False: 25.9k]
  ------------------
  203|  1.29k|        case VET_INT3:
  ------------------
  |  Branch (203:9): [True: 274, False: 25.9k]
  ------------------
  204|  1.50k|        case VET_DOUBLE3:
  ------------------
  |  Branch (204:9): [True: 213, False: 26.0k]
  ------------------
  205|  1.59k|        case VET_HALF3:
  ------------------
  |  Branch (205:9): [True: 91, False: 26.1k]
  ------------------
  206|  1.59k|            return 3;
  207|    122|        case VET_FLOAT4:
  ------------------
  |  Branch (207:9): [True: 122, False: 26.1k]
  ------------------
  208|    719|        case VET_SHORT4:
  ------------------
  |  Branch (208:9): [True: 597, False: 25.6k]
  ------------------
  209|    974|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (209:9): [True: 255, False: 26.0k]
  ------------------
  210|  1.29k|        case VET_USHORT4:
  ------------------
  |  Branch (210:9): [True: 318, False: 25.9k]
  ------------------
  211|  2.82k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (211:9): [True: 1.53k, False: 24.7k]
  ------------------
  212|  3.58k|        case VET_UINT4:
  ------------------
  |  Branch (212:9): [True: 761, False: 25.5k]
  ------------------
  213|  3.96k|        case VET_INT4:
  ------------------
  |  Branch (213:9): [True: 378, False: 25.8k]
  ------------------
  214|  4.23k|        case VET_DOUBLE4:
  ------------------
  |  Branch (214:9): [True: 269, False: 25.9k]
  ------------------
  215|  5.65k|        case VET_BYTE4:
  ------------------
  |  Branch (215:9): [True: 1.42k, False: 24.8k]
  ------------------
  216|  7.13k|        case VET_UBYTE4:
  ------------------
  |  Branch (216:9): [True: 1.47k, False: 24.7k]
  ------------------
  217|  7.85k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (217:9): [True: 723, False: 25.5k]
  ------------------
  218|  8.04k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (218:9): [True: 189, False: 26.0k]
  ------------------
  219|  11.4k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (219:9): [True: 3.38k, False: 22.8k]
  ------------------
  220|  15.4k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (220:9): [True: 4.02k, False: 22.2k]
  ------------------
  221|  16.5k|        case VET_HALF4:
  ------------------
  |  Branch (221:9): [True: 1.07k, False: 25.1k]
  ------------------
  222|  16.5k|            return 4;
  223|  26.2k|        }
  224|  26.2k|        OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid type", 
  225|  26.2k|            "VertexElement::getTypeCount");
  226|  26.2k|    }
_ZN4Ogre13VertexElement11getBaseTypeENS_17VertexElementTypeE:
  296|  28.3k|    {
  297|  28.3k|        switch (multiType)
  ------------------
  |  Branch (297:17): [True: 28.0k, False: 311]
  ------------------
  298|  28.3k|        {
  299|    421|            case VET_FLOAT1:
  ------------------
  |  Branch (299:13): [True: 421, False: 27.9k]
  ------------------
  300|  2.82k|            case VET_FLOAT2:
  ------------------
  |  Branch (300:13): [True: 2.39k, False: 25.9k]
  ------------------
  301|  3.46k|            case VET_FLOAT3:
  ------------------
  |  Branch (301:13): [True: 645, False: 27.7k]
  ------------------
  302|  3.71k|            case VET_FLOAT4:
  ------------------
  |  Branch (302:13): [True: 249, False: 28.1k]
  ------------------
  303|  3.71k|                return VET_FLOAT1;
  304|    402|            case VET_HALF1:
  ------------------
  |  Branch (304:13): [True: 402, False: 27.9k]
  ------------------
  305|    591|            case VET_HALF2:
  ------------------
  |  Branch (305:13): [True: 189, False: 28.1k]
  ------------------
  306|    683|            case VET_HALF3:
  ------------------
  |  Branch (306:13): [True: 92, False: 28.2k]
  ------------------
  307|  1.75k|            case VET_HALF4:
  ------------------
  |  Branch (307:13): [True: 1.07k, False: 27.2k]
  ------------------
  308|  1.75k|                return VET_HALF1;
  309|    407|            case VET_DOUBLE1:
  ------------------
  |  Branch (309:13): [True: 407, False: 27.9k]
  ------------------
  310|  1.08k|            case VET_DOUBLE2:
  ------------------
  |  Branch (310:13): [True: 680, False: 27.6k]
  ------------------
  311|  1.30k|            case VET_DOUBLE3:
  ------------------
  |  Branch (311:13): [True: 214, False: 28.1k]
  ------------------
  312|  1.57k|            case VET_DOUBLE4:
  ------------------
  |  Branch (312:13): [True: 271, False: 28.0k]
  ------------------
  313|  1.57k|                return VET_DOUBLE1;
  314|    169|            case VET_INT1:
  ------------------
  |  Branch (314:13): [True: 169, False: 28.2k]
  ------------------
  315|    574|            case VET_INT2:
  ------------------
  |  Branch (315:13): [True: 405, False: 27.9k]
  ------------------
  316|    851|            case VET_INT3:
  ------------------
  |  Branch (316:13): [True: 277, False: 28.0k]
  ------------------
  317|  1.23k|            case VET_INT4:
  ------------------
  |  Branch (317:13): [True: 380, False: 27.9k]
  ------------------
  318|  1.23k|                return VET_INT1;
  319|    530|            case VET_UINT1:
  ------------------
  |  Branch (319:13): [True: 530, False: 27.8k]
  ------------------
  320|  1.10k|            case VET_UINT2:
  ------------------
  |  Branch (320:13): [True: 571, False: 27.7k]
  ------------------
  321|  1.37k|            case VET_UINT3:
  ------------------
  |  Branch (321:13): [True: 274, False: 28.0k]
  ------------------
  322|  2.14k|            case VET_UINT4:
  ------------------
  |  Branch (322:13): [True: 765, False: 27.6k]
  ------------------
  323|  2.14k|                return VET_UINT1;
  324|    396|            case VET_SHORT1:
  ------------------
  |  Branch (324:13): [True: 396, False: 27.9k]
  ------------------
  325|    558|            case VET_SHORT2:
  ------------------
  |  Branch (325:13): [True: 162, False: 28.2k]
  ------------------
  326|    669|            case VET_SHORT3:
  ------------------
  |  Branch (326:13): [True: 111, False: 28.2k]
  ------------------
  327|  1.27k|            case VET_SHORT4:
  ------------------
  |  Branch (327:13): [True: 603, False: 27.7k]
  ------------------
  328|  1.27k|                return VET_SHORT1;
  329|    420|            case VET_USHORT1:
  ------------------
  |  Branch (329:13): [True: 420, False: 27.9k]
  ------------------
  330|    462|            case VET_USHORT2:
  ------------------
  |  Branch (330:13): [True: 42, False: 28.3k]
  ------------------
  331|    650|            case VET_USHORT3:
  ------------------
  |  Branch (331:13): [True: 188, False: 28.1k]
  ------------------
  332|    969|            case VET_USHORT4:
  ------------------
  |  Branch (332:13): [True: 319, False: 28.0k]
  ------------------
  333|    969|                return VET_USHORT1;
  334|    861|            case VET_SHORT2_NORM:
  ------------------
  |  Branch (334:13): [True: 861, False: 27.5k]
  ------------------
  335|  1.11k|            case VET_SHORT4_NORM:
  ------------------
  |  Branch (335:13): [True: 256, False: 28.1k]
  ------------------
  336|  1.11k|                return VET_SHORT2_NORM;
  337|    138|            case VET_USHORT2_NORM:
  ------------------
  |  Branch (337:13): [True: 138, False: 28.2k]
  ------------------
  338|  1.67k|            case VET_USHORT4_NORM:
  ------------------
  |  Branch (338:13): [True: 1.53k, False: 26.8k]
  ------------------
  339|  1.67k|                return VET_USHORT2_NORM;
  340|  1.42k|            case VET_BYTE4:
  ------------------
  |  Branch (340:13): [True: 1.42k, False: 26.9k]
  ------------------
  341|  1.42k|                return VET_BYTE4;
  342|    724|            case VET_BYTE4_NORM:
  ------------------
  |  Branch (342:13): [True: 724, False: 27.6k]
  ------------------
  343|    724|                return VET_BYTE4_NORM;
  344|  1.47k|            case VET_UBYTE4:
  ------------------
  |  Branch (344:13): [True: 1.47k, False: 26.8k]
  ------------------
  345|  1.47k|                return VET_UBYTE4;
  346|    210|            case VET_UBYTE4_NORM:
  ------------------
  |  Branch (346:13): [True: 210, False: 28.1k]
  ------------------
  347|  3.59k|            case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (347:13): [True: 3.38k, False: 24.9k]
  ------------------
  348|  3.59k|                return VET_UBYTE4_NORM;
  349|  5.39k|            case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (349:13): [True: 5.39k, False: 22.9k]
  ------------------
  350|  5.39k|                return VET_INT_10_10_10_2_NORM;
  351|  28.3k|        };
  352|       |        // To keep compiler happy
  353|    311|        return VET_FLOAT1;
  354|  28.3k|    }
_ZN4Ogre17VertexDeclarationC2Ev:
  357|   113k|    {
  358|   113k|    }
_ZN4Ogre17VertexDeclarationD2Ev:
  361|   113k|    {
  362|   113k|    }
_ZNK4Ogre17VertexDeclaration11getElementsEv:
  365|  2.44k|    {
  366|  2.44k|        return mElementList;
  367|  2.44k|    }
_ZN4Ogre17VertexDeclaration10addElementEtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  372|  27.4k|    {
  373|  27.4k|        mElementList.push_back(VertexElement(source, offset, theType, semantic, index));
  374|  27.4k|        notifyChanged();
  375|  27.4k|        return mElementList.back();
  376|  27.4k|    }
_ZN4Ogre17VertexDeclaration13modifyElementEttmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  444|  5.22k|    {
  445|       |        assert(elem_index < mElementList.size() && "Index out of bounds");
  446|  5.22k|        VertexElementList::iterator i = mElementList.begin();
  447|  5.22k|        std::advance(i, elem_index);
  448|  5.22k|        (*i) = VertexElement(source, offset, theType, semantic, index);
  449|  5.22k|        notifyChanged();
  450|  5.22k|    }
_ZNK4Ogre17VertexDeclaration21findElementBySemanticENS_21VertexElementSemanticEt:
  454|   102k|    {
  455|   102k|        for (auto& e : mElementList)
  ------------------
  |  Branch (455:22): [True: 11.6k, False: 100k]
  ------------------
  456|  11.6k|        {
  457|  11.6k|            if (e.getSemantic() == sem && e.getIndex() == index)
  ------------------
  |  Branch (457:17): [True: 2.70k, False: 8.92k]
  |  Branch (457:43): [True: 1.79k, False: 911]
  ------------------
  458|  1.79k|            {
  459|  1.79k|                return &e;
  460|  1.79k|            }
  461|  11.6k|        }
  462|       |
  463|   100k|        return NULL;
  464|   102k|    }
_ZNK4Ogre17VertexDeclaration20findElementsBySourceEt:
  468|  17.5k|    {
  469|  17.5k|        VertexElementList retList;
  470|  17.5k|        for (auto& e : mElementList)
  ------------------
  |  Branch (470:22): [True: 56.2k, False: 17.5k]
  ------------------
  471|  56.2k|        {
  472|  56.2k|            if (e.getSource() == source)
  ------------------
  |  Branch (472:17): [True: 26.1k, False: 30.1k]
  ------------------
  473|  26.1k|            {
  474|  26.1k|                retList.push_back(e);
  475|  26.1k|            }
  476|  56.2k|        }
  477|  17.5k|        return retList;
  478|  17.5k|    }
_ZNK4Ogre17VertexDeclaration13getVertexSizeEt:
  482|  10.5k|    {
  483|  10.5k|        size_t sz = 0;
  484|  10.5k|        for (auto& e : mElementList)
  ------------------
  |  Branch (484:22): [True: 30.2k, False: 10.5k]
  ------------------
  485|  30.2k|        {
  486|  30.2k|            if (e.getSource() == source)
  ------------------
  |  Branch (486:17): [True: 15.3k, False: 14.9k]
  ------------------
  487|  15.3k|            {
  488|  15.3k|                sz += e.getSize();
  489|       |
  490|  15.3k|            }
  491|  30.2k|        }
  492|  10.5k|        return sz;
  493|  10.5k|    }
_ZN4Ogre19VertexBufferBindingC2Ev:
  676|   113k|    VertexBufferBinding::VertexBufferBinding() : mHighIndex(0)
  677|   113k|    {
  678|   113k|    }
_ZN4Ogre19VertexBufferBindingD2Ev:
  681|   113k|    {
  682|   113k|        unsetAllBindings();
  683|   113k|    }
_ZN4Ogre19VertexBufferBinding10setBindingEtRKNS_9SharedPtrINS_20HardwareVertexBufferEEE:
  686|  10.0k|    {
  687|       |        // NB will replace any existing buffer ptr at this index, and will thus cause
  688|       |        // reference count to decrement on that buffer (possibly destroying it)
  689|  10.0k|        mBindingMap[index] = buffer;
  690|  10.0k|        mHighIndex = std::max(mHighIndex, (unsigned short)(index+1));
  691|  10.0k|    }
_ZN4Ogre19VertexBufferBinding16unsetAllBindingsEv:
  706|   113k|    {
  707|   113k|        mBindingMap.clear();
  708|   113k|        mHighIndex = 0;
  709|   113k|    }
_ZNK4Ogre19VertexBufferBinding11getBindingsEv:
  713|   109k|    {
  714|   109k|        return mBindingMap;
  715|   109k|    }
_ZNK4Ogre19VertexBufferBinding9getBufferEt:
  718|  1.47k|    {
  719|  1.47k|        VertexBufferBindingMap::const_iterator i = mBindingMap.find(index);
  720|  1.47k|        if (i == mBindingMap.end())
  ------------------
  |  Branch (720:13): [True: 62, False: 1.41k]
  ------------------
  721|     62|        {
  722|     62|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "No buffer is bound to that index.",
  723|     62|                "VertexBufferBinding::getBuffer");
  724|     62|        }
  725|  1.41k|        return i->second;
  726|  1.47k|    }
_ZNK4Ogre19VertexBufferBinding13isBufferBoundEt:
  729|  38.6k|    {
  730|  38.6k|        return mBindingMap.find(index) != mBindingMap.end();
  731|  38.6k|    }

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

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

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

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

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

_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|   114k|    {
   45|       |        assert( msSingleton );  return ( *msSingleton );
   46|   114k|    }
_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|   114k|    {
   96|   114k|        return static_pointer_cast<Material>(getResourceByName(name, groupName));
   97|   114k|    }
_ZN4Ogre15MaterialManager10initialiseEv:
  111|      1|    {
  112|       |        // Set up default material - don't use name constructor as we want to avoid applying defaults
  113|      1|        mDefaultSettings = create("DefaultSettings", ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
  114|       |        // Add a single technique and pass, non-programmable
  115|      1|        mDefaultSettings->createTechnique()->createPass();
  116|       |
  117|       |        // Set the default LOD strategy
  118|      1|        mDefaultSettings->setLodStrategy(LodStrategyManager::getSingleton().getDefaultStrategy());
  119|       |
  120|       |        // Set up a lit base white material
  121|      1|        create("BaseWhite", ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
  122|       |        // Set up an unlit base white material
  123|      1|        MaterialPtr baseWhiteNoLighting = create("BaseWhiteNoLighting",
  124|      1|        ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
  125|      1|        baseWhiteNoLighting->setLightingEnabled(false);
  126|       |
  127|      1|    }
_ZN4Ogre15MaterialManager38_notifyBeforeIlluminationPassesClearedEPNS_9TechniqueE:
  273|      2|	{
  274|       |		// First, check the scheme specific listeners
  275|      2|		ListenerMap::iterator it = mListenerMap.find(mActiveSchemeName);
  276|      2|		if(it != mListenerMap.end())
  ------------------
  |  Branch (276:6): [True: 0, False: 2]
  ------------------
  277|      0|		{
  278|      0|			ListenerList& listenerList = it->second;
  279|      0|			for(auto & i : listenerList)
  ------------------
  |  Branch (279:17): [True: 0, False: 0]
  ------------------
  280|      0|			{
  281|      0|				bool handled = i->beforeIlluminationPassesCleared(tech);
  282|      0|				if(handled)
  ------------------
  |  Branch (282:8): [True: 0, False: 0]
  ------------------
  283|      0|					return;
  284|      0|			}
  285|      0|		}
  286|       |
  287|       |		//If no success, check generic listeners
  288|      2|		it = mListenerMap.find(BLANKSTRING);
  289|      2|		if(it != mListenerMap.end())
  ------------------
  |  Branch (289:6): [True: 0, False: 2]
  ------------------
  290|      0|		{
  291|      0|			ListenerList& listenerList = it->second;
  292|      0|			for(auto & i : listenerList)
  ------------------
  |  Branch (292:17): [True: 0, False: 0]
  ------------------
  293|      0|			{
  294|      0|				bool handled = i->beforeIlluminationPassesCleared(tech);
  295|      0|				if(handled)
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|					return;
  297|      0|			}
  298|      0|		}
  299|      2|	}

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

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

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

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

_ZN4Ogre18MeshSerializerImplC2Ev:
   63|  9.84k|    {
   64|       |        // Version number
   65|  9.84k|        mVersion = "[MeshSerializer_v1.100]";
   66|  9.84k|        exportedLodCount = 0;
   67|  9.84k|    }
_ZN4Ogre18MeshSerializerImplD2Ev:
   70|  9.84k|    {
   71|  9.84k|    }
_ZN4Ogre18MeshSerializerImpl10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  110|  4.80k|    {
  111|       |        // Determine endianness (must be the first thing we do!)
  112|  4.80k|        determineEndianness(stream);
  113|       |
  114|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  115|       |        enableValidation();
  116|       |#endif
  117|       |        // Check header
  118|  4.80k|        readFileHeader(stream);
  119|  4.80k|        pushInnerChunk(stream);
  120|  4.80k|        unsigned short streamID = readChunk(stream);
  121|       |
  122|  34.7k|        while(!stream->eof())
  ------------------
  |  Branch (122:15): [True: 31.6k, False: 3.11k]
  ------------------
  123|  31.6k|        {
  124|  31.6k|            switch (streamID)
  ------------------
  |  Branch (124:21): [True: 19.8k, False: 11.8k]
  ------------------
  125|  31.6k|            {
  126|  19.8k|            case M_MESH:
  ------------------
  |  Branch (126:13): [True: 19.8k, False: 11.8k]
  ------------------
  127|  19.8k|                readMesh(stream, pMesh, listener);
  128|  19.8k|                break;
  129|  31.6k|            }
  130|       |
  131|  29.9k|            streamID = readChunk(stream);
  132|  29.9k|        }
  133|  3.11k|        popInnerChunk(stream);
  134|  3.11k|    }
_ZN4Ogre18MeshSerializerImpl12readGeometryERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  601|   113k|    {
  602|       |
  603|   113k|        dest->vertexStart = 0;
  604|       |
  605|   113k|        unsigned int vertexCount = 0;
  606|   113k|        readInts(stream, &vertexCount, 1);
  607|   113k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vertexCount, 1))
  ------------------
  |  Branch (607:13): [True: 1.55k, False: 112k]
  ------------------
  608|   113k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex count exceeds remaining chunk data");
  609|   112k|        dest->vertexCount = vertexCount;
  610|       |        // Find optional geometry streams
  611|   112k|        if (!stream->eof())
  ------------------
  |  Branch (611:13): [True: 112k, False: 31]
  ------------------
  612|   112k|        {
  613|   112k|            pushInnerChunk(stream);
  614|   112k|            unsigned short streamID = readChunk(stream);
  615|   137k|            while(!stream->eof() &&
  ------------------
  |  Branch (615:19): [True: 137k, False: 595]
  ------------------
  616|   137k|                (streamID == M_GEOMETRY_VERTEX_DECLARATION ||
  ------------------
  |  Branch (616:18): [True: 17.4k, False: 119k]
  ------------------
  617|   119k|                 streamID == M_GEOMETRY_VERTEX_BUFFER ))
  ------------------
  |  Branch (617:18): [True: 11.1k, False: 108k]
  ------------------
  618|  28.6k|            {
  619|  28.6k|                switch (streamID)
  ------------------
  |  Branch (619:25): [True: 28.6k, False: 0]
  ------------------
  620|  28.6k|                {
  621|  17.4k|                case M_GEOMETRY_VERTEX_DECLARATION:
  ------------------
  |  Branch (621:17): [True: 17.4k, False: 11.1k]
  ------------------
  622|  17.4k|                    readGeometryVertexDeclaration(stream, pMesh, dest);
  623|  17.4k|                    break;
  624|  11.1k|                case M_GEOMETRY_VERTEX_BUFFER:
  ------------------
  |  Branch (624:17): [True: 11.1k, False: 17.4k]
  ------------------
  625|  11.1k|                    readGeometryVertexBuffer(stream, pMesh, dest);
  626|  11.1k|                    break;
  627|  28.6k|                }
  628|       |                // Get next stream
  629|  25.9k|                if (!stream->eof())
  ------------------
  |  Branch (629:21): [True: 25.6k, False: 246]
  ------------------
  630|  25.6k|                {
  631|  25.6k|                    streamID = readChunk(stream);
  632|  25.6k|                }
  633|  25.9k|            }
  634|   109k|            if (!stream->eof())
  ------------------
  |  Branch (634:17): [True: 108k, False: 595]
  ------------------
  635|   108k|            {
  636|       |                // Backpedal back to start of non-submesh stream
  637|   108k|                backpedalChunkHeader(stream);
  638|   108k|            }
  639|   109k|            popInnerChunk(stream);
  640|   109k|        }
  641|       |
  642|       |        // Perform any necessary colour conversions from ARGB to ABGR (UBYTE4)
  643|   109k|        dest->convertPackedColour(_DETAIL_SWAP_RB, VET_UBYTE4_NORM);
  644|       |
  645|   109k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (645:19): [True: 0, False: 109k]
  ------------------
  646|   109k|        if(!rs || rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_16X3))
  ------------------
  |  Branch (646:12): [True: 109k, False: 0]
  |  Branch (646:19): [True: 0, False: 0]
  ------------------
  647|   109k|            return;
  648|       |
  649|    306|        for(auto& elem : dest->vertexDeclaration->getElements())
  ------------------
  |  Branch (649:24): [True: 0, False: 306]
  ------------------
  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|    306|    }
_ZN4Ogre18MeshSerializerImpl29readGeometryVertexDeclarationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  661|  17.4k|    {
  662|       |        // Find optional geometry streams
  663|  17.4k|        if (!stream->eof())
  ------------------
  |  Branch (663:13): [True: 17.4k, False: 0]
  ------------------
  664|  17.4k|        {
  665|  17.4k|            pushInnerChunk(stream);
  666|  17.4k|            unsigned short streamID = readChunk(stream);
  667|  44.9k|            while(!stream->eof() &&
  ------------------
  |  Branch (667:19): [True: 44.7k, False: 240]
  ------------------
  668|  44.7k|                (streamID == M_GEOMETRY_VERTEX_ELEMENT ))
  ------------------
  |  Branch (668:17): [True: 27.5k, False: 17.1k]
  ------------------
  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.4k|                if (!stream->eof())
  ------------------
  |  Branch (677:21): [True: 27.4k, False: 56]
  ------------------
  678|  27.4k|                {
  679|  27.4k|                    streamID = readChunk(stream);
  680|  27.4k|                }
  681|  27.4k|            }
  682|  17.3k|            if (!stream->eof())
  ------------------
  |  Branch (682:17): [True: 17.1k, False: 240]
  ------------------
  683|  17.1k|            {
  684|       |                // Backpedal back to start of non-submesh stream
  685|  17.1k|                backpedalChunkHeader(stream);
  686|  17.1k|            }
  687|  17.3k|            popInnerChunk(stream);
  688|  17.3k|        }
  689|       |
  690|  17.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: 302, False: 27.2k]
  |  Branch (702:24): [True: 2.08k, False: 25.1k]
  ------------------
  703|  2.38k|            vType = VET_UBYTE4_NORM;
  704|  25.1k|        else
  705|  25.1k|            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: 78, False: 27.4k]
  ------------------
  715|  27.5k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Cannot add vertex element after reading buffer");
  716|       |
  717|  27.4k|        dest->vertexDeclaration->addElement(source, offset, vType, vSemantic, index);
  718|       |
  719|  27.4k|        if (vType == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (719:13): [True: 4.96k, False: 22.5k]
  ------------------
  720|  4.96k|        {
  721|  4.96k|            LogManager::getSingleton().stream(LML_WARNING)
  722|  4.96k|                << "Warning: VET_COLOUR_ARGB element type is deprecated and incurs conversion on load. "
  723|  4.96k|                << "Use OgreMeshUpgrader on '" << pMesh->getName() << "' as soon as possible.";
  724|  4.96k|        }
  725|       |
  726|  27.4k|    }
_ZN4Ogre18MeshSerializerImpl24readGeometryVertexBufferERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  730|  11.1k|    {
  731|  11.1k|        unsigned short bindIndex, vertexSize;
  732|       |        // unsigned short bindIndex;    // Index to bind this buffer to
  733|  11.1k|        readShorts(stream, &bindIndex, 1);
  734|       |        // unsigned short vertexSize;   // Per-vertex size, must agree with declaration at this index
  735|  11.1k|        readShorts(stream, &vertexSize, 1);
  736|  11.1k|        if (dest->vertexBufferBinding->isBufferBound(bindIndex))
  ------------------
  |  Branch (736:13): [True: 202, False: 10.9k]
  ------------------
  737|  11.1k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate vertex buffer binding");
  738|  10.9k|        pushInnerChunk(stream);
  739|  10.9k|        {
  740|       |        // Check for vertex data header
  741|  10.9k|        unsigned short headerID;
  742|  10.9k|        headerID = readChunk(stream);
  743|  10.9k|        if (headerID != M_GEOMETRY_VERTEX_BUFFER_DATA)
  ------------------
  |  Branch (743:13): [True: 434, False: 10.5k]
  ------------------
  744|    434|        {
  745|    434|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Can't find vertex buffer data area",
  746|    434|                "MeshSerializerImpl::readGeometryVertexBuffer");
  747|    434|        }
  748|  10.5k|        size_t declaredVertexSize = dest->vertexDeclaration->getVertexSize(bindIndex);
  749|  10.5k|        if (declaredVertexSize == 0)
  ------------------
  |  Branch (749:13): [True: 477, False: 10.0k]
  ------------------
  750|    477|        {
  751|    477|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Missing vertex declaration for buffer bind index");
  752|    477|        }
  753|       |        // Check that vertex size agrees
  754|  10.0k|        if (declaredVertexSize != vertexSize)
  ------------------
  |  Branch (754:13): [True: 321, False: 9.70k]
  ------------------
  755|    321|        {
  756|    321|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer vertex size does not agree with vertex declaration");
  757|    321|        }
  758|       |
  759|       |        // Create / populate vertex buffer
  760|  9.70k|        size_t vbufBytes = dest->vertexCount * (size_t)vertexSize;
  761|  9.70k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vbufBytes, 1))
  ------------------
  |  Branch (761:13): [True: 465, False: 9.24k]
  ------------------
  762|  9.70k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex buffer size exceeds remaining chunk data");
  763|  9.24k|        HardwareVertexBufferSharedPtr vbuf;
  764|  9.24k|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
  765|  9.24k|            vertexSize,
  766|  9.24k|            dest->vertexCount,
  767|  9.24k|            pMesh->mVertexBufferUsage,
  768|  9.24k|            pMesh->mVertexBufferShadowBuffer);
  769|  9.24k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
  770|  9.24k|        stream->read(vbufLock.pData, vbufBytes);
  771|       |
  772|  9.24k|        auto elems = dest->vertexDeclaration->findElementsBySource(bindIndex);
  773|       |        // validate vertex element declarations
  774|  9.24k|        for (auto& elem : elems)
  ------------------
  |  Branch (774:25): [True: 13.4k, False: 8.68k]
  ------------------
  775|  13.4k|        {
  776|  13.4k|            if (elem.getSize() == 0)
  ------------------
  |  Branch (776:17): [True: 274, False: 13.1k]
  ------------------
  777|  13.4k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid vertex element type");
  778|  13.1k|            if (elem.getOffset() + elem.getSize() > vertexSize)
  ------------------
  |  Branch (778:17): [True: 288, False: 12.8k]
  ------------------
  779|  13.1k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  780|  13.1k|                                "Vertex element offset + size exceeds vertex buffer stride");
  781|  13.1k|        }
  782|       |
  783|       |        // endian conversion for OSX
  784|  8.68k|        flipFromLittleEndian(vbufLock.pData, dest->vertexCount, vertexSize, elems);
  785|       |
  786|       |        // Set binding
  787|  8.68k|        dest->vertexBufferBinding->setBinding(bindIndex, vbuf);
  788|  8.68k|        }
  789|      0|        popInnerChunk(stream);
  790|       |
  791|  8.68k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshNameTableERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  794|  3.67k|    {
  795|       |        // The map for
  796|  3.67k|        std::map<unsigned short, String> subMeshNames;
  797|  3.67k|        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|  3.67k|        if (!stream->eof())
  ------------------
  |  Branch (806:13): [True: 3.67k, False: 0]
  ------------------
  807|  3.67k|        {
  808|  3.67k|            pushInnerChunk(stream);
  809|  3.67k|            streamID = readChunk(stream);
  810|  14.4k|            while(!stream->eof() && (streamID == M_SUBMESH_NAME_TABLE_ELEMENT ))
  ------------------
  |  Branch (810:19): [True: 14.0k, False: 388]
  |  Branch (810:37): [True: 10.8k, False: 3.28k]
  ------------------
  811|  10.8k|            {
  812|       |                // Read in the index of the submesh.
  813|  10.8k|                readShorts(stream, &subMeshIndex, 1);
  814|       |                // Read in the String and map it to its index.
  815|  10.8k|                subMeshNames[subMeshIndex] = readString(stream);
  816|       |
  817|       |                // If we're not end of file get the next stream ID
  818|  10.8k|                if (!stream->eof())
  ------------------
  |  Branch (818:21): [True: 10.5k, False: 265]
  ------------------
  819|  10.5k|                    streamID = readChunk(stream);
  820|  10.8k|            }
  821|  3.67k|            if (!stream->eof())
  ------------------
  |  Branch (821:17): [True: 3.28k, False: 388]
  ------------------
  822|  3.28k|            {
  823|       |                // Backpedal back to start of stream
  824|  3.28k|                backpedalChunkHeader(stream);
  825|  3.28k|            }
  826|  3.67k|            popInnerChunk(stream);
  827|  3.67k|        }
  828|       |
  829|       |        // Set all the submeshes names
  830|       |        // ?
  831|       |        // Loop through and save out the index and names.
  832|  3.67k|        for (auto& sn : subMeshNames)
  ------------------
  |  Branch (832:23): [True: 9.70k, False: 3.67k]
  ------------------
  833|  9.70k|        {
  834|       |            // Name this submesh to the stored name.
  835|  9.70k|            pMesh->nameSubMesh(sn.second, sn.first);
  836|  9.70k|        }
  837|  3.67k|    }
_ZN4Ogre18MeshSerializerImpl8readMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  840|  19.8k|    {
  841|       |        // Never automatically build edge lists for this version
  842|       |        // expect them in the file or not at all
  843|  19.8k|        pMesh->mAutoBuildEdgeLists = false;
  844|       |
  845|       |        // bool skeletallyAnimated
  846|  19.8k|        bool skeletallyAnimated;
  847|  19.8k|        readBools(stream, &skeletallyAnimated, 1);
  848|       |
  849|       |        // Find all substreams
  850|  19.8k|        if (!stream->eof())
  ------------------
  |  Branch (850:13): [True: 19.8k, False: 19]
  ------------------
  851|  19.8k|        {
  852|  19.8k|            pushInnerChunk(stream);
  853|  19.8k|            unsigned short streamID = readChunk(stream);
  854|   192k|            while(!stream->eof() &&
  ------------------
  |  Branch (854:19): [True: 190k, False: 2.55k]
  ------------------
  855|   190k|                (streamID == M_GEOMETRY ||
  ------------------
  |  Branch (855:18): [True: 19.9k, False: 170k]
  ------------------
  856|   170k|                 streamID == M_SUBMESH ||
  ------------------
  |  Branch (856:18): [True: 114k, False: 55.7k]
  ------------------
  857|  55.7k|                 streamID == M_MESH_SKELETON_LINK ||
  ------------------
  |  Branch (857:18): [True: 15.0k, False: 40.6k]
  ------------------
  858|  40.6k|                 streamID == M_MESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (858:18): [True: 1.92k, False: 38.7k]
  ------------------
  859|  38.7k|                 streamID == M_MESH_LOD_LEVEL ||
  ------------------
  |  Branch (859:18): [True: 6.74k, False: 32.0k]
  ------------------
  860|  32.0k|                 streamID == M_MESH_BOUNDS ||
  ------------------
  |  Branch (860:18): [True: 3.64k, False: 28.3k]
  ------------------
  861|  28.3k|                 streamID == M_SUBMESH_NAME_TABLE ||
  ------------------
  |  Branch (861:18): [True: 3.67k, False: 24.7k]
  ------------------
  862|  24.7k|                 streamID == M_EDGE_LISTS ||
  ------------------
  |  Branch (862:18): [True: 1.13k, False: 23.5k]
  ------------------
  863|  23.5k|                 streamID == M_POSES ||
  ------------------
  |  Branch (863:18): [True: 1.86k, False: 21.7k]
  ------------------
  864|  21.7k|                 streamID == M_ANIMATIONS ||
  ------------------
  |  Branch (864:18): [True: 2.38k, False: 19.3k]
  ------------------
  865|  19.3k|                 streamID == M_TABLE_EXTREMES))
  ------------------
  |  Branch (865:18): [True: 3.52k, False: 15.8k]
  ------------------
  866|   174k|            {
  867|   174k|                switch(streamID)
  ------------------
  |  Branch (867:24): [True: 174k, False: 0]
  ------------------
  868|   174k|                {
  869|  19.9k|                case M_GEOMETRY:
  ------------------
  |  Branch (869:17): [True: 19.9k, False: 154k]
  ------------------
  870|  19.9k|                    pMesh->createVertexData();
  871|  19.9k|                    try {
  872|  19.9k|                        readGeometry(stream, pMesh, pMesh->sharedVertexData);
  873|  19.9k|                    }
  874|  19.9k|                    catch (Exception&)
  875|  19.9k|                    {
  876|       |                        // duff geometry data entry with 0 vertices
  877|  4.48k|                        pMesh->resetVertexData();
  878|       |                        // Skip this stream (pointer will have been returned to just after header)
  879|  4.48k|                        stream->skip(mCurrentstreamLen - MSTREAM_OVERHEAD_SIZE);
  880|  4.48k|                    }
  881|  19.9k|                    break;
  882|   114k|                case M_SUBMESH:
  ------------------
  |  Branch (882:17): [True: 114k, False: 59.9k]
  ------------------
  883|   114k|                    readSubMesh(stream, pMesh, listener);
  884|   114k|                    break;
  885|  15.0k|                case M_MESH_SKELETON_LINK:
  ------------------
  |  Branch (885:17): [True: 15.0k, False: 159k]
  ------------------
  886|  15.0k|                    readSkeletonLink(stream, pMesh, listener);
  887|  15.0k|                    break;
  888|  1.92k|                case M_MESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (888:17): [True: 1.92k, False: 172k]
  ------------------
  889|  1.92k|                    readMeshBoneAssignment(stream, pMesh);
  890|  1.92k|                    break;
  891|  6.74k|                case M_MESH_LOD_LEVEL:
  ------------------
  |  Branch (891:17): [True: 6.74k, False: 167k]
  ------------------
  892|  6.74k|                    readMeshLodLevel(stream, pMesh);
  893|  6.74k|                    break;
  894|  3.64k|                case M_MESH_BOUNDS:
  ------------------
  |  Branch (894:17): [True: 3.64k, False: 170k]
  ------------------
  895|  3.64k|                    readBoundsInfo(stream, pMesh);
  896|  3.64k|                    break;
  897|  3.67k|                case M_SUBMESH_NAME_TABLE:
  ------------------
  |  Branch (897:17): [True: 3.67k, False: 170k]
  ------------------
  898|  3.67k|                    readSubMeshNameTable(stream, pMesh);
  899|  3.67k|                    break;
  900|  1.13k|                case M_EDGE_LISTS:
  ------------------
  |  Branch (900:17): [True: 1.13k, False: 173k]
  ------------------
  901|  1.13k|                    readEdgeList(stream, pMesh);
  902|  1.13k|                    break;
  903|  1.86k|                case M_POSES:
  ------------------
  |  Branch (903:17): [True: 1.86k, False: 172k]
  ------------------
  904|  1.86k|                    readPoses(stream, pMesh);
  905|  1.86k|                    break;
  906|  2.38k|                case M_ANIMATIONS:
  ------------------
  |  Branch (906:17): [True: 2.38k, False: 172k]
  ------------------
  907|  2.38k|                    readAnimations(stream, pMesh);
  908|  2.38k|                    break;
  909|  3.52k|                case M_TABLE_EXTREMES:
  ------------------
  |  Branch (909:17): [True: 3.52k, False: 171k]
  ------------------
  910|  3.52k|                    readExtremes(stream, pMesh);
  911|  3.52k|                    break;
  912|   174k|                }
  913|       |
  914|   173k|                if (!stream->eof())
  ------------------
  |  Branch (914:21): [True: 171k, False: 2.14k]
  ------------------
  915|   171k|                {
  916|   171k|                    streamID = readChunk(stream);
  917|   171k|                }
  918|       |
  919|   173k|            }
  920|  18.3k|            if (!stream->eof())
  ------------------
  |  Branch (920:17): [True: 15.8k, False: 2.55k]
  ------------------
  921|  15.8k|            {
  922|       |                // Backpedal back to start of stream
  923|  15.8k|                backpedalChunkHeader(stream);
  924|  15.8k|            }
  925|  18.3k|            popInnerChunk(stream);
  926|  18.3k|        }
  927|       |
  928|  19.8k|    }
_ZN4Ogre18MeshSerializerImpl11readSubMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  931|   114k|    {
  932|   114k|        unsigned short streamID;
  933|       |
  934|   114k|        SubMesh* sm = pMesh->createSubMesh();
  935|       |
  936|       |        // char* materialName
  937|   114k|        String materialName = readString(stream);
  938|   114k|        if(listener)
  ------------------
  |  Branch (938:12): [True: 0, False: 114k]
  ------------------
  939|      0|            listener->processMaterialName(pMesh, &materialName);
  940|   114k|        if (auto material = MaterialManager::getSingleton().getByName(materialName, pMesh->getGroup()))
  ------------------
  |  Branch (940:18): [True: 0, False: 114k]
  ------------------
  941|      0|        {
  942|      0|            sm->setMaterial(material);
  943|      0|        }
  944|   114k|        else
  945|   114k|        {
  946|   114k|            logMaterialNotFound(materialName, pMesh->getGroup(), "SubMesh of", pMesh->getName(), LML_WARNING);
  947|   114k|        }
  948|       |
  949|       |        // bool useSharedVertices
  950|   114k|        readBools(stream,&sm->useSharedVertices, 1);
  951|       |
  952|   114k|        sm->indexData->indexStart = 0;
  953|   114k|        unsigned int indexCount = 0;
  954|   114k|        readInts(stream, &indexCount, 1);
  955|   114k|        sm->indexData->indexCount = indexCount;
  956|       |
  957|   114k|        HardwareIndexBufferSharedPtr ibuf;
  958|       |        // bool indexes32Bit
  959|   114k|        bool idx32bit;
  960|   114k|        readBools(stream, &idx32bit, 1);
  961|   114k|        if (indexCount > 0)
  ------------------
  |  Branch (961:13): [True: 89.8k, False: 24.8k]
  ------------------
  962|  89.8k|        {
  963|  89.8k|            if (!checkChunkRemainingSize(mCurrentstreamLen, indexCount, idx32bit ? sizeof(unsigned int) : sizeof(unsigned short)))
  ------------------
  |  Branch (963:17): [True: 105, False: 89.7k]
  |  Branch (963:73): [True: 2.83k, False: 86.9k]
  ------------------
  964|  89.8k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Index buffer size exceeds chunk size");
  965|  89.7k|            if (idx32bit)
  ------------------
  |  Branch (965:17): [True: 2.79k, False: 86.9k]
  ------------------
  966|  2.79k|            {
  967|  2.79k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  968|  2.79k|                        HardwareIndexBuffer::IT_32BIT,
  969|  2.79k|                        sm->indexData->indexCount,
  970|  2.79k|                        pMesh->mIndexBufferUsage,
  971|  2.79k|                        pMesh->mIndexBufferShadowBuffer);
  972|  2.79k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  973|  2.79k|                readInts(stream, static_cast<unsigned int*>(ibufLock.pData), sm->indexData->indexCount);
  974|       |
  975|  2.79k|            }
  976|  86.9k|            else // 16-bit
  977|  86.9k|            {
  978|  86.9k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
  979|  86.9k|                        HardwareIndexBuffer::IT_16BIT,
  980|  86.9k|                        sm->indexData->indexCount,
  981|  86.9k|                        pMesh->mIndexBufferUsage,
  982|  86.9k|                        pMesh->mIndexBufferShadowBuffer);
  983|  86.9k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
  984|  86.9k|                readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), sm->indexData->indexCount);
  985|  86.9k|            }
  986|  89.7k|        }
  987|   114k|        sm->indexData->indexBuffer = ibuf;
  988|       |
  989|   114k|        pushInnerChunk(stream);
  990|   114k|        {
  991|       |        // M_GEOMETRY stream (Optional: present only if useSharedVertices = false)
  992|   114k|        if (!sm->useSharedVertices)
  ------------------
  |  Branch (992:13): [True: 93.7k, False: 20.8k]
  ------------------
  993|  93.7k|        {
  994|  93.7k|            streamID = readChunk(stream);
  995|  93.7k|            if (streamID != M_GEOMETRY)
  ------------------
  |  Branch (995:17): [True: 62, False: 93.6k]
  ------------------
  996|     62|            {
  997|     62|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Missing geometry data in mesh file",
  998|     62|                    "MeshSerializerImpl::readSubMesh");
  999|     62|            }
 1000|  93.6k|            sm->createVertexData();
 1001|  93.6k|            readGeometry(stream, pMesh, sm->vertexData);
 1002|  93.6k|        }
 1003|       |
 1004|       |
 1005|       |        // Find all bone assignments, submesh operation, and texture aliases (if present)
 1006|   114k|        if (!stream->eof())
  ------------------
  |  Branch (1006:13): [True: 114k, False: 225]
  ------------------
 1007|   114k|        {
 1008|   114k|            streamID = readChunk(stream);
 1009|   114k|            bool seenTexAlias = false;
 1010|   117k|            while(!stream->eof() &&
  ------------------
  |  Branch (1010:19): [True: 117k, False: 134]
  ------------------
 1011|   117k|                (streamID == M_SUBMESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (1011:18): [True: 1.58k, False: 116k]
  ------------------
 1012|   116k|                 streamID == M_SUBMESH_OPERATION ||
  ------------------
  |  Branch (1012:18): [True: 213, False: 115k]
  ------------------
 1013|   115k|                 streamID == M_SUBMESH_TEXTURE_ALIAS))
  ------------------
  |  Branch (1013:18): [True: 1.65k, False: 114k]
  ------------------
 1014|  3.44k|            {
 1015|  3.44k|                switch(streamID)
  ------------------
  |  Branch (1015:24): [True: 3.44k, False: 0]
  ------------------
 1016|  3.44k|                {
 1017|    213|                case M_SUBMESH_OPERATION:
  ------------------
  |  Branch (1017:17): [True: 213, False: 3.23k]
  ------------------
 1018|    213|                    readSubMeshOperation(stream, pMesh, sm);
 1019|    213|                    break;
 1020|  1.58k|                case M_SUBMESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (1020:17): [True: 1.58k, False: 1.86k]
  ------------------
 1021|  1.58k|                    readSubMeshBoneAssignment(stream, pMesh, sm);
 1022|  1.58k|                    break;
 1023|  1.65k|                case M_SUBMESH_TEXTURE_ALIAS:
  ------------------
  |  Branch (1023:17): [True: 1.65k, False: 1.79k]
  ------------------
 1024|  1.65k|                    seenTexAlias = true;
 1025|  1.65k|                    String aliasName = readString(stream);
 1026|  1.65k|                    String textureName = readString(stream);
 1027|  1.65k|                    break;
 1028|  3.44k|                }
 1029|       |
 1030|  3.44k|                if (!stream->eof())
  ------------------
  |  Branch (1030:21): [True: 3.42k, False: 26]
  ------------------
 1031|  3.42k|                {
 1032|  3.42k|                    streamID = readChunk(stream);
 1033|  3.42k|                }
 1034|       |
 1035|  3.44k|            }
 1036|       |
 1037|   114k|            if (seenTexAlias)
  ------------------
  |  Branch (1037:17): [True: 1.14k, False: 113k]
  ------------------
 1038|  1.14k|                LogManager::getSingleton().logError("texture aliases for SubMeshes are unsupported - " +
 1039|  1.14k|                                                      stream->getName());
 1040|       |
 1041|   114k|            if (!stream->eof())
  ------------------
  |  Branch (1041:17): [True: 114k, False: 134]
  ------------------
 1042|   114k|            {
 1043|       |                // Backpedal back to start of stream
 1044|   114k|                    backpedalChunkHeader(stream);
 1045|   114k|                }
 1046|   114k|            }
 1047|   114k|        }
 1048|   114k|        popInnerChunk(stream);
 1049|       |
 1050|   114k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshOperationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1054|    213|    {
 1055|       |        // unsigned short operationType
 1056|    213|        unsigned short opType;
 1057|    213|        readShorts(stream, &opType, 1);
 1058|    213|        sm->operationType = static_cast<RenderOperation::OperationType>(opType);
 1059|    213|    }
_ZN4Ogre18MeshSerializerImpl16readSkeletonLinkERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 1070|  15.0k|    {
 1071|  15.0k|        String skelName = readString(stream);
 1072|       |
 1073|  15.0k|        if(listener)
  ------------------
  |  Branch (1073:12): [True: 0, False: 15.0k]
  ------------------
 1074|      0|            listener->processSkeletonName(pMesh, &skelName);
 1075|       |
 1076|  15.0k|        pMesh->setSkeletonName(skelName);
 1077|  15.0k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1120|  1.92k|    {
 1121|  1.92k|        VertexBoneAssignment assign;
 1122|       |
 1123|       |        // unsigned int vertexIndex;
 1124|  1.92k|        readInts(stream, &(assign.vertexIndex),1);
 1125|       |        // unsigned short boneIndex;
 1126|  1.92k|        readShorts(stream, &(assign.boneIndex),1);
 1127|       |        // float weight;
 1128|  1.92k|        readFloats(stream, &(assign.weight), 1);
 1129|       |
 1130|  1.92k|        pMesh->addBoneAssignment(assign);
 1131|       |
 1132|  1.92k|    }
_ZN4Ogre18MeshSerializerImpl25readSubMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1136|  1.58k|    {
 1137|  1.58k|        VertexBoneAssignment assign;
 1138|       |
 1139|       |        // unsigned int vertexIndex;
 1140|  1.58k|        readInts(stream, &(assign.vertexIndex),1);
 1141|       |        // unsigned short boneIndex;
 1142|  1.58k|        readShorts(stream, &(assign.boneIndex),1);
 1143|       |        // float weight;
 1144|  1.58k|        readFloats(stream, &(assign.weight), 1);
 1145|       |
 1146|  1.58k|        sub->addBoneAssignment(assign);
 1147|       |
 1148|  1.58k|    }
_ZN4Ogre18MeshSerializerImpl14readBoundsInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1342|  3.64k|    {
 1343|  3.64k|        Vector3 min, max;
 1344|  3.64k|        readFloats(stream, min.ptr(), 3);
 1345|  3.64k|        readFloats(stream, max.ptr(), 3);
 1346|  3.64k|        AxisAlignedBox box(min, max);
 1347|  3.64k|        pMesh->_setBounds(box, false);
 1348|       |
 1349|  3.64k|        float radius;
 1350|  3.64k|        readFloats(stream, &radius, 1);
 1351|  3.64k|        pMesh->_setBoundingSphereRadius(radius);
 1352|  3.64k|    }
_ZN4Ogre18MeshSerializerImpl16readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1362|  3.36k|    {
 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|  3.36k|        String strategyName = readString(stream);
 1428|  3.36k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 1429|       |
 1430|       |        // Check that valid strategy name was given, otherwise use default
 1431|  3.36k|        if (strategy == 0)
  ------------------
  |  Branch (1431:13): [True: 2.87k, False: 494]
  ------------------
 1432|  2.87k|            strategy = LodStrategyManager::getSingleton().getDefaultStrategy();
 1433|       |
 1434|  3.36k|        pMesh->setLodStrategy(strategy);
 1435|       |
 1436|       |        // unsigned short numLevels;
 1437|  3.36k|        uint16 numLods;
 1438|  3.36k|        readShorts(stream, &numLods, 1);
 1439|  3.36k|        numLods = std::max<ushort>(numLods, 1);
 1440|       |
 1441|  3.36k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (1441:13): [True: 74, False: 3.29k]
  ------------------
 1442|  3.36k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 1443|       |
 1444|  3.29k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (1444:12): [True: 4, False: 3.28k]
  ------------------
 1445|  3.29k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 1446|       |
 1447|  3.28k|        pMesh->_setLodInfo(numLods);
 1448|  3.28k|        pushInnerChunk(stream);
 1449|       |        // lodID=0 is the original mesh. We need to skip it.
 1450|  3.63k|        for(int lodID = 1; lodID < pMesh->getNumLodLevels(); lodID++){
  ------------------
  |  Branch (1450:28): [True: 617, False: 3.01k]
  ------------------
 1451|       |            // Read depth
 1452|    617|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[lodID];
 1453|    617|            unsigned short streamID = readChunk(stream);
 1454|    617|            readFloats(stream, &(usage.userValue), 1);
 1455|    617|            switch(streamID){
 1456|    274|            case M_MESH_LOD_MANUAL:
  ------------------
  |  Branch (1456:13): [True: 274, False: 343]
  ------------------
 1457|    274|                readMeshLodUsageManual(stream, pMesh, lodID, usage);
 1458|    274|                break;
 1459|    212|            case M_MESH_LOD_GENERATED:
  ------------------
  |  Branch (1459:13): [True: 212, False: 405]
  ------------------
 1460|    212|                readMeshLodUsageGenerated(stream, pMesh, lodID, usage);
 1461|    212|                break;
 1462|     84|            default:
  ------------------
  |  Branch (1462:13): [True: 84, False: 533]
  ------------------
 1463|     84|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1464|    617|                "Invalid Lod Usage type in " + pMesh->getName(),
 1465|    617|                    "MeshSerializerImpl::readMeshLodInfo");
 1466|    617|            }
 1467|    349|            usage.manualMesh.reset(); // will trigger load later with manual Lod
 1468|    349|            usage.edgeData = NULL;
 1469|    349|        }
 1470|  3.01k|        popInnerChunk(stream);
 1471|  3.01k|#endif
 1472|  3.01k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1476|    274|    {
 1477|    274|        pMesh->mHasManualLodLevel = true;
 1478|    274|        usage.manualName = readString(stream);
 1479|       |        
 1480|       |        // Generate for mixed
 1481|    274|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1481:22): [True: 372, False: 274]
  ------------------
 1482|    372|        {
 1483|       |            s->mLodFaceList[lodNum-1] = OGRE_NEW IndexData();
 1484|    372|        }
 1485|    274|    }
_ZN4Ogre18MeshSerializerImpl25readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1488|    212|    {
 1489|    212|        usage.manualName = "";
 1490|       |
 1491|       |        // Get one set of detail per SubMesh
 1492|    212|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1492:22): [True: 2.17k, False: 75]
  ------------------
 1493|  2.17k|        {
 1494|  2.17k|            s->mLodFaceList[lodNum - 1] = OGRE_NEW IndexData();
 1495|  2.17k|            IndexData* indexData = s->mLodFaceList[lodNum - 1];
 1496|       |
 1497|  2.17k|            unsigned int numIndexes;
 1498|  2.17k|            readInts(stream, &numIndexes, 1);
 1499|  2.17k|            indexData->indexCount = static_cast<size_t>(numIndexes);
 1500|       |
 1501|  2.17k|            unsigned int offset;
 1502|  2.17k|            readInts(stream, &offset, 1);
 1503|  2.17k|            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|  2.17k|            unsigned int bufferIndex;
 1508|  2.17k|            readInts(stream, &bufferIndex, 1);
 1509|  2.17k|            if(bufferIndex != (unsigned int)-1) {
  ------------------
  |  Branch (1509:16): [True: 82, False: 2.09k]
  ------------------
 1510|     82|                if (bufferIndex - 1 >= (unsigned int)lodNum - 1)
  ------------------
  |  Branch (1510:21): [True: 78, False: 4]
  ------------------
 1511|     82|                    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: 1, False: 3]
  ------------------
 1515|      4|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Referenced LOD index buffer is null");
 1516|  2.09k|            } else {
 1517|       |                // generate buffers
 1518|       |
 1519|       |                // bool indexes32Bit
 1520|  2.09k|                bool idx32Bit;
 1521|  2.09k|                readBools(stream, &idx32Bit, 1);
 1522|       |                
 1523|  2.09k|                unsigned int buffIndexCount;
 1524|  2.09k|                readInts(stream, &buffIndexCount, 1);
 1525|       |
 1526|  2.09k|                if (!checkChunkRemainingSize(mCurrentstreamLen, buffIndexCount, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (1526:21): [True: 58, False: 2.03k]
  |  Branch (1526:81): [True: 1.04k, False: 1.04k]
  ------------------
 1527|  2.09k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 1528|       |
 1529|  2.03k|                indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 1530|  2.03k|                    idx32Bit ? HardwareIndexBuffer::IT_32BIT : HardwareIndexBuffer::IT_16BIT,
  ------------------
  |  Branch (1530:21): [True: 998, False: 1.03k]
  ------------------
 1531|  2.03k|                    buffIndexCount, pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 1532|  2.03k|                HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 1533|       |
 1534|  2.03k|                if (idx32Bit)
  ------------------
  |  Branch (1534:21): [True: 998, False: 1.03k]
  ------------------
 1535|    998|                {
 1536|    998|                    readInts(stream, (uint32*)ibufLock.pData, buffIndexCount);
 1537|    998|                }
 1538|  1.03k|                else
 1539|  1.03k|                {
 1540|  1.03k|                    readShorts(stream, (uint16*)ibufLock.pData, buffIndexCount);
 1541|  1.03k|                }
 1542|  2.03k|            }
 1543|  2.17k|        }
 1544|    212|    }
_ZN4Ogre18MeshSerializerImpl20flipFromLittleEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1549|  8.67k|    {
 1550|  8.67k|        if (mFlipEndian)
  ------------------
  |  Branch (1550:13): [True: 8.67k, False: 0]
  ------------------
 1551|  8.67k|        {
 1552|  8.67k|            flipEndian(pData, vertexCount, vertexSize, elems);
 1553|  8.67k|        }
 1554|  8.67k|    }
_ZN4Ogre18MeshSerializerImpl10flipEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1567|  8.67k|    {
 1568|  8.67k|        void *pBase = pData;
 1569|  24.0k|        for (size_t v = 0; v < vertexCount; ++v)
  ------------------
  |  Branch (1569:28): [True: 15.3k, False: 8.67k]
  ------------------
 1570|  15.3k|        {
 1571|  15.3k|            for (auto& e : elems)
  ------------------
  |  Branch (1571:26): [True: 26.2k, False: 15.3k]
  ------------------
 1572|  26.2k|            {
 1573|  26.2k|                void *pElem;
 1574|       |                // re-base pointer to the element
 1575|  26.2k|                e.baseVertexPointerToElement(pBase, &pElem);
 1576|       |                // Flip the endian based on the type
 1577|  26.2k|                size_t typeSize = 0;
 1578|  26.2k|                switch (VertexElement::getBaseType(e.getType()))
 1579|  26.2k|                {
 1580|  3.39k|                    case VET_FLOAT1:
  ------------------
  |  Branch (1580:21): [True: 3.39k, False: 22.8k]
  ------------------
 1581|  3.39k|                        typeSize = sizeof(float);
 1582|  3.39k|                        break;
 1583|  1.55k|                    case VET_DOUBLE1:
  ------------------
  |  Branch (1583:21): [True: 1.55k, False: 24.7k]
  ------------------
 1584|  1.55k|                        typeSize = sizeof(double);
 1585|  1.55k|                        break;
 1586|  1.25k|                    case VET_SHORT1:
  ------------------
  |  Branch (1586:21): [True: 1.25k, False: 25.0k]
  ------------------
 1587|  1.25k|                        typeSize = sizeof(short);
 1588|  1.25k|                        break;
 1589|    960|                    case VET_USHORT1:
  ------------------
  |  Branch (1589:21): [True: 960, False: 25.3k]
  ------------------
 1590|    960|                        typeSize = sizeof(unsigned short);
 1591|    960|                        break;
 1592|  1.20k|                    case VET_INT1:
  ------------------
  |  Branch (1592:21): [True: 1.20k, False: 25.0k]
  ------------------
 1593|  1.20k|                        typeSize = sizeof(int);
 1594|  1.20k|                        break;
 1595|  2.13k|                    case VET_UINT1:
  ------------------
  |  Branch (1595:21): [True: 2.13k, False: 24.1k]
  ------------------
 1596|  2.13k|                        typeSize = sizeof(unsigned int);
 1597|  2.13k|                        break;
 1598|  3.57k|                    case VET_UBYTE4_NORM:
  ------------------
  |  Branch (1598:21): [True: 3.57k, False: 22.6k]
  ------------------
 1599|  5.04k|                    case VET_UBYTE4:
  ------------------
  |  Branch (1599:21): [True: 1.47k, False: 24.7k]
  ------------------
 1600|  5.04k|                        typeSize = 0; // NO FLIPPING
 1601|  5.04k|                        break;
 1602|  10.7k|                    default:
  ------------------
  |  Branch (1602:21): [True: 10.7k, False: 15.5k]
  ------------------
 1603|  10.7k|                        assert(false); // Should never happen
 1604|  26.2k|                };
 1605|  26.2k|				Bitwise::bswapChunks(pElem, typeSize,
 1606|  26.2k|                    VertexElement::getTypeCount(e.getType()));
 1607|  26.2k|            }
 1608|       |
 1609|  15.3k|            pBase = static_cast<void*>(
 1610|  15.3k|                static_cast<unsigned char*>(pBase) + vertexSize);
 1611|  15.3k|        }
 1612|  8.67k|    }
_ZN4Ogre18MeshSerializerImpl12readEdgeListERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1797|  1.13k|    {
 1798|  1.13k|        pMesh->mEdgeListsBuilt = true; // set this early, so any partial data is freed
 1799|       |
 1800|  1.13k|        if (!stream->eof())
  ------------------
  |  Branch (1800:13): [True: 1.13k, False: 0]
  ------------------
 1801|  1.13k|        {
 1802|  1.13k|            pushInnerChunk(stream);
 1803|  1.13k|            unsigned short streamID = readChunk(stream);
 1804|  2.09k|            while(!stream->eof() &&
  ------------------
  |  Branch (1804:19): [True: 1.68k, False: 409]
  ------------------
 1805|  1.68k|                streamID == M_EDGE_LIST_LOD)
  ------------------
  |  Branch (1805:17): [True: 966, False: 716]
  ------------------
 1806|    966|            {
 1807|       |                // Process single LOD
 1808|       |
 1809|       |                // unsigned short lodIndex
 1810|    966|                unsigned short lodIndex;
 1811|    966|                readShorts(stream, &lodIndex, 1);
 1812|       |
 1813|       |                // bool isManual            // If manual, no edge data here, loaded from manual mesh
 1814|    966|                bool isManual;
 1815|    966|                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|    966|                if (!isManual) {
  ------------------
  |  Branch (1824:21): [True: 403, False: 563]
  ------------------
 1825|    403|#endif
 1826|    403|                    MeshLodUsage& usage = pMesh->mMeshLodUsageList.at(lodIndex);
 1827|    403|                    if(!usage.manualName.empty())
  ------------------
  |  Branch (1827:24): [True: 12, False: 391]
  ------------------
 1828|    403|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD is marked as non-manual, but has a manual mesh name");
 1829|       |
 1830|    391|                    if (usage.edgeData)
  ------------------
  |  Branch (1830:25): [True: 2, False: 389]
  ------------------
 1831|    391|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate edge data for LOD");
 1832|       |
 1833|    389|                    auto edgeData = std::make_unique<EdgeData>(); // in case of exception, will be deleted automatically
 1834|       |
 1835|       |                    // Read detail information of the edge list
 1836|    389|                    readEdgeListLodInfo(stream, edgeData.get());
 1837|       |
 1838|       |                    // Postprocessing edge groups
 1839|    389|                    for (auto& edgeGroup : edgeData->edgeGroups)
  ------------------
  |  Branch (1839:42): [True: 135, False: 389]
  ------------------
 1840|    135|                    {
 1841|       |                        // Populate edgeGroup.vertexData pointers
 1842|       |                        // If there is shared vertex data, vertexSet 0 is that,
 1843|       |                        // otherwise 0 is first dedicated
 1844|    135|                        if (pMesh->sharedVertexData)
  ------------------
  |  Branch (1844:29): [True: 90, False: 45]
  ------------------
 1845|     90|                        {
 1846|     90|                            if (edgeGroup.vertexSet == 0)
  ------------------
  |  Branch (1846:33): [True: 50, False: 40]
  ------------------
 1847|     50|                            {
 1848|     50|                                edgeGroup.vertexData = pMesh->sharedVertexData;
 1849|     50|                            }
 1850|     40|                            else
 1851|     40|                            {
 1852|     40|                                edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet - 1)->vertexData;
 1853|     40|                            }
 1854|     90|                        }
 1855|     45|                        else
 1856|     45|                        {
 1857|     45|                            edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet)->vertexData;
 1858|     45|                        }
 1859|    135|                    }
 1860|       |
 1861|    389|                    usage.edgeData = edgeData.release();
 1862|    389|                }
 1863|       |
 1864|    952|                if (!stream->eof())
  ------------------
  |  Branch (1864:21): [True: 580, False: 372]
  ------------------
 1865|    580|                {
 1866|    580|                    streamID = readChunk(stream);
 1867|    580|                }
 1868|       |
 1869|    952|            }
 1870|  1.12k|            if (!stream->eof())
  ------------------
  |  Branch (1870:17): [True: 716, False: 409]
  ------------------
 1871|    716|            {
 1872|       |                // Backpedal back to start of stream
 1873|    716|                backpedalChunkHeader(stream);
 1874|    716|            }
 1875|  1.12k|            popInnerChunk(stream);
 1876|  1.12k|        }
 1877|  1.13k|    }
_ZN4Ogre18MeshSerializerImpl19readEdgeListLodInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_8EdgeDataE:
 1881|    384|    {
 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|    384|        readBools(stream, &edgeData->isClosed, 1);
 1917|       |        // unsigned long numTriangles
 1918|    384|        uint32 numTriangles;
 1919|    384|        readInts(stream, &numTriangles, 1);
 1920|    384|        if(!checkChunkRemainingSize(mCurrentstreamLen, numTriangles, sizeof(EdgeData::Triangle) + sizeof(Vector4f)))
  ------------------
  |  Branch (1920:12): [True: 58, False: 326]
  ------------------
 1921|    384|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list triangle data exceeds chunk size");
 1922|       |
 1923|       |        // Allocate correct amount of memory
 1924|    326|        edgeData->triangles.resize(numTriangles);
 1925|    326|        edgeData->triangleFaceNormals.resize(numTriangles);
 1926|    326|        edgeData->triangleLightFacings.resize(numTriangles);
 1927|       |        // unsigned long numEdgeGroups
 1928|    326|        uint32 numEdgeGroups;
 1929|    326|        readInts(stream, &numEdgeGroups, 1);
 1930|    326|        if(!checkChunkRemainingSize(mCurrentstreamLen, numEdgeGroups, sizeof(uint32) * 4))
  ------------------
  |  Branch (1930:12): [True: 58, False: 268]
  ------------------
 1931|    326|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list group data exceeds chunk size");
 1932|       |
 1933|       |        // Allocate correct amount of memory
 1934|    268|        edgeData->edgeGroups.resize(numEdgeGroups);
 1935|       |        // Triangle* triangleList
 1936|    268|        uint32 tmp[3];
 1937|  3.94k|        for (size_t t = 0; t < numTriangles; ++t)
  ------------------
  |  Branch (1937:28): [True: 3.67k, False: 268]
  ------------------
 1938|  3.67k|        {
 1939|  3.67k|            EdgeData::Triangle& tri = edgeData->triangles[t];
 1940|       |            // unsigned long indexSet
 1941|  3.67k|            readInts(stream, tmp, 1);
 1942|  3.67k|            tri.indexSet = tmp[0];
 1943|       |            // unsigned long vertexSet
 1944|  3.67k|            readInts(stream, tmp, 1);
 1945|  3.67k|            tri.vertexSet = tmp[0];
 1946|       |            // unsigned long vertIndex[3]
 1947|  3.67k|            readInts(stream, tmp, 3);
 1948|       |
 1949|  3.67k|            tri.vertIndex[0] = tmp[0];
 1950|  3.67k|            tri.vertIndex[1] = tmp[1];
 1951|  3.67k|            tri.vertIndex[2] = tmp[2];
 1952|       |            // unsigned long sharedVertIndex[3]
 1953|  3.67k|            readInts(stream, tmp, 3);
 1954|  3.67k|            tri.sharedVertIndex[0] = tmp[0];
 1955|  3.67k|            tri.sharedVertIndex[1] = tmp[1];
 1956|  3.67k|            tri.sharedVertIndex[2] = tmp[2];
 1957|       |            // float normal[4]
 1958|  3.67k|            readFloats(stream, &(edgeData->triangleFaceNormals[t].x), 4);
 1959|       |
 1960|  3.67k|        }
 1961|    268|        pushInnerChunk(stream);
 1962|    550|        for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
  ------------------
  |  Branch (1962:29): [True: 492, False: 58]
  ------------------
 1963|    492|        {
 1964|    492|            unsigned short streamID = readChunk(stream);
 1965|    492|            if (streamID != M_EDGE_GROUP)
  ------------------
  |  Branch (1965:17): [True: 85, False: 407]
  ------------------
 1966|     85|            {
 1967|     85|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1968|     85|                    "Missing M_EDGE_GROUP stream",
 1969|     85|                    "MeshSerializerImpl::readEdgeListLodInfo");
 1970|     85|            }
 1971|    407|            EdgeData::EdgeGroup& edgeGroup = edgeData->edgeGroups[eg];
 1972|       |
 1973|       |            // unsigned long vertexSet
 1974|    407|            readInts(stream, tmp, 1);
 1975|    407|            edgeGroup.vertexSet = tmp[0];
 1976|       |            // unsigned long triStart
 1977|    407|            readInts(stream, tmp, 1);
 1978|    407|            edgeGroup.triStart = tmp[0];
 1979|       |            // unsigned long triCount
 1980|    407|            readInts(stream, tmp, 1);
 1981|    407|            edgeGroup.triCount = tmp[0];
 1982|       |            // unsigned long numEdges
 1983|    407|            uint32 numEdges;
 1984|    407|            readInts(stream, &numEdges, 1);
 1985|    407|            if(!checkChunkRemainingSize(mCurrentstreamLen, numEdges, sizeof(uint32) * 6 + sizeof(bool)))
  ------------------
  |  Branch (1985:16): [True: 125, False: 282]
  ------------------
 1986|    407|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list edge data exceeds chunk size");
 1987|       |
 1988|    282|            edgeGroup.edges.resize(numEdges);
 1989|       |            // Edge* edgeList
 1990|  35.3k|            for (uint32 e = 0; e < numEdges; ++e)
  ------------------
  |  Branch (1990:32): [True: 35.0k, False: 282]
  ------------------
 1991|  35.0k|            {
 1992|  35.0k|                EdgeData::Edge& edge = edgeGroup.edges[e];
 1993|       |                // unsigned long  triIndex[2]
 1994|  35.0k|                readInts(stream, tmp, 2);
 1995|  35.0k|                edge.triIndex[0] = tmp[0];
 1996|  35.0k|                edge.triIndex[1] = tmp[1];
 1997|       |                // unsigned long  vertIndex[2]
 1998|  35.0k|                readInts(stream, tmp, 2);
 1999|  35.0k|                edge.vertIndex[0] = tmp[0];
 2000|  35.0k|                edge.vertIndex[1] = tmp[1];
 2001|       |                // unsigned long  sharedVertIndex[2]
 2002|  35.0k|                readInts(stream, tmp, 2);
 2003|  35.0k|                edge.sharedVertIndex[0] = tmp[0];
 2004|  35.0k|                edge.sharedVertIndex[1] = tmp[1];
 2005|       |                // bool degenerate
 2006|  35.0k|                readBools(stream, &(edge.degenerate), 1);
 2007|  35.0k|            }
 2008|    282|        }
 2009|     58|        popInnerChunk(stream);
 2010|     58|    }
_ZN4Ogre18MeshSerializerImpl9readPosesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2325|  1.86k|    {
 2326|       |        // Find all substreams
 2327|  1.86k|        if (!stream->eof())
  ------------------
  |  Branch (2327:13): [True: 1.86k, False: 0]
  ------------------
 2328|  1.86k|        {
 2329|  1.86k|            pushInnerChunk(stream);
 2330|  1.86k|            unsigned short streamID = readChunk(stream);
 2331|  15.5k|            while(!stream->eof() &&
  ------------------
  |  Branch (2331:19): [True: 15.3k, False: 238]
  ------------------
 2332|  15.3k|                (streamID == M_POSE))
  ------------------
  |  Branch (2332:17): [True: 13.7k, False: 1.61k]
  ------------------
 2333|  13.7k|            {
 2334|  13.7k|                switch(streamID)
  ------------------
  |  Branch (2334:24): [True: 13.7k, False: 0]
  ------------------
 2335|  13.7k|                {
 2336|  13.7k|                case M_POSE:
  ------------------
  |  Branch (2336:17): [True: 13.7k, False: 0]
  ------------------
 2337|  13.7k|                    readPose(stream, pMesh);
 2338|  13.7k|                    break;
 2339|       |
 2340|  13.7k|                }
 2341|       |
 2342|  13.7k|                if (!stream->eof())
  ------------------
  |  Branch (2342:21): [True: 13.5k, False: 219]
  ------------------
 2343|  13.5k|                {
 2344|  13.5k|                    streamID = readChunk(stream);
 2345|  13.5k|                }
 2346|       |
 2347|  13.7k|            }
 2348|  1.84k|            if (!stream->eof())
  ------------------
  |  Branch (2348:17): [True: 1.61k, False: 238]
  ------------------
 2349|  1.61k|            {
 2350|       |                // Backpedal back to start of stream
 2351|  1.61k|                backpedalChunkHeader(stream);
 2352|  1.61k|            }
 2353|  1.84k|            popInnerChunk(stream);
 2354|  1.84k|        }
 2355|  1.86k|    }
_ZN4Ogre18MeshSerializerImpl8readPoseERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2358|  13.7k|    {
 2359|       |        // char* name (may be blank)
 2360|  13.7k|        String name = readString(stream);
 2361|       |        // unsigned short target
 2362|  13.7k|        unsigned short target;
 2363|  13.7k|        readShorts(stream, &target, 1);
 2364|       |
 2365|       |        // bool includesNormals
 2366|  13.7k|        bool includesNormals;
 2367|  13.7k|        readBools(stream, &includesNormals, 1);
 2368|       |        
 2369|  13.7k|        Pose* pose = pMesh->createPose(target, name);
 2370|       |
 2371|       |        // Find all substreams
 2372|  13.7k|        if (!stream->eof())
  ------------------
  |  Branch (2372:13): [True: 13.7k, False: 29]
  ------------------
 2373|  13.7k|        {
 2374|  13.7k|            pushInnerChunk(stream);
 2375|  13.7k|            unsigned short streamID = readChunk(stream);
 2376|  19.4k|            while(!stream->eof() &&
  ------------------
  |  Branch (2376:19): [True: 19.2k, False: 202]
  ------------------
 2377|  19.2k|                (streamID == M_POSE_VERTEX))
  ------------------
  |  Branch (2377:17): [True: 5.78k, False: 13.5k]
  ------------------
 2378|  5.78k|            {
 2379|  5.78k|                switch(streamID)
  ------------------
  |  Branch (2379:24): [True: 5.78k, False: 0]
  ------------------
 2380|  5.78k|                {
 2381|  5.78k|                case M_POSE_VERTEX:
  ------------------
  |  Branch (2381:17): [True: 5.78k, False: 0]
  ------------------
 2382|       |                    // create vertex offset
 2383|  5.78k|                    uint32 vertIndex;
 2384|  5.78k|                    Vector3f offset, normal;
 2385|       |                    // unsigned long vertexIndex
 2386|  5.78k|                    readInts(stream, &vertIndex, 1);
 2387|       |                    // float xoffset, yoffset, zoffset
 2388|  5.78k|                    readFloats(stream, offset.ptr(), 3);
 2389|       |                    
 2390|  5.78k|                    if (includesNormals)
  ------------------
  |  Branch (2390:25): [True: 3.12k, False: 2.66k]
  ------------------
 2391|  3.12k|                    {
 2392|  3.12k|                        readFloats(stream, normal.ptr(), 3);
 2393|  3.12k|                        pose->addVertex(vertIndex, offset, normal);                     
 2394|  3.12k|                    }
 2395|  2.66k|                    else 
 2396|  2.66k|                    {
 2397|  2.66k|                        pose->addVertex(vertIndex, offset);
 2398|  2.66k|                    }
 2399|       |
 2400|       |
 2401|  5.78k|                    break;
 2402|       |
 2403|  5.78k|                }
 2404|       |
 2405|  5.78k|                if (!stream->eof())
  ------------------
  |  Branch (2405:21): [True: 5.62k, False: 158]
  ------------------
 2406|  5.62k|                {
 2407|  5.62k|                    streamID = readChunk(stream);
 2408|  5.62k|                }
 2409|       |
 2410|  5.78k|            }
 2411|  13.7k|            if (!stream->eof())
  ------------------
  |  Branch (2411:17): [True: 13.5k, False: 202]
  ------------------
 2412|  13.5k|            {
 2413|       |                // Backpedal back to start of stream
 2414|  13.5k|                backpedalChunkHeader(stream);
 2415|  13.5k|            }
 2416|  13.7k|            popInnerChunk(stream);
 2417|  13.7k|        }
 2418|  13.7k|    }
_ZN4Ogre18MeshSerializerImpl14readAnimationsERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2421|  2.38k|    {
 2422|       |        // Find all substreams
 2423|  2.38k|        if (!stream->eof())
  ------------------
  |  Branch (2423:13): [True: 2.38k, False: 0]
  ------------------
 2424|  2.38k|        {
 2425|  2.38k|            pushInnerChunk(stream);
 2426|  2.38k|            unsigned short streamID = readChunk(stream);
 2427|  4.38k|            while(!stream->eof() &&
  ------------------
  |  Branch (2427:19): [True: 4.20k, False: 173]
  ------------------
 2428|  4.20k|                (streamID == M_ANIMATION))
  ------------------
  |  Branch (2428:17): [True: 2.05k, False: 2.15k]
  ------------------
 2429|  2.05k|            {
 2430|  2.05k|                switch(streamID)
  ------------------
  |  Branch (2430:24): [True: 2.05k, False: 0]
  ------------------
 2431|  2.05k|                {
 2432|  2.05k|                case M_ANIMATION:
  ------------------
  |  Branch (2432:17): [True: 2.05k, False: 0]
  ------------------
 2433|  2.05k|                    readAnimation(stream, pMesh);
 2434|  2.05k|                    break;
 2435|       |
 2436|  2.05k|                }
 2437|       |
 2438|  2.00k|                if (!stream->eof())
  ------------------
  |  Branch (2438:21): [True: 1.83k, False: 162]
  ------------------
 2439|  1.83k|                {
 2440|  1.83k|                    streamID = readChunk(stream);
 2441|  1.83k|                }
 2442|       |
 2443|  2.00k|            }
 2444|  2.32k|            if (!stream->eof())
  ------------------
  |  Branch (2444:17): [True: 2.15k, False: 173]
  ------------------
 2445|  2.15k|            {
 2446|       |                // Backpedal back to start of stream
 2447|  2.15k|                backpedalChunkHeader(stream);
 2448|  2.15k|            }
 2449|  2.32k|            popInnerChunk(stream);
 2450|  2.32k|        }
 2451|  2.38k|    }
_ZN4Ogre18MeshSerializerImpl13readAnimationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2454|  2.05k|    {
 2455|       |        // char* name
 2456|  2.05k|        String name = readString(stream);
 2457|       |        // float length
 2458|  2.05k|        float len;
 2459|  2.05k|        readFloats(stream, &len, 1);
 2460|       |
 2461|  2.05k|        Animation* anim = pMesh->createAnimation(name, len);
 2462|       |
 2463|       |        // tracks
 2464|  2.05k|        if (!stream->eof())
  ------------------
  |  Branch (2464:13): [True: 2.00k, False: 53]
  ------------------
 2465|  2.00k|        {
 2466|  2.00k|            pushInnerChunk(stream);
 2467|  2.00k|            unsigned short streamID = readChunk(stream);
 2468|       |            
 2469|       |            // Optional base info is possible
 2470|  2.00k|            if (streamID == M_ANIMATION_BASEINFO)
  ------------------
  |  Branch (2470:17): [True: 126, False: 1.87k]
  ------------------
 2471|    126|            {
 2472|       |                // char baseAnimationName
 2473|    126|                String baseAnimName = readString(stream);
 2474|       |                // float baseKeyFrameTime
 2475|    126|                float baseKeyTime;
 2476|    126|                readFloats(stream, &baseKeyTime, 1);
 2477|       |                
 2478|    126|                anim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
 2479|       |                
 2480|    126|                if (!stream->eof())
  ------------------
  |  Branch (2480:21): [True: 120, False: 6]
  ------------------
 2481|    120|                {
 2482|       |                    // Get next stream
 2483|    120|                    streamID = readChunk(stream);
 2484|    120|                }
 2485|    126|            }
 2486|       |            
 2487|  5.03k|            while(!stream->eof() &&
  ------------------
  |  Branch (2487:19): [True: 4.91k, False: 121]
  ------------------
 2488|  4.91k|                streamID == M_ANIMATION_TRACK)
  ------------------
  |  Branch (2488:17): [True: 3.08k, False: 1.83k]
  ------------------
 2489|  3.08k|            {
 2490|  3.08k|                switch(streamID)
  ------------------
  |  Branch (2490:24): [True: 3.08k, False: 0]
  ------------------
 2491|  3.08k|                {
 2492|  3.08k|                case M_ANIMATION_TRACK:
  ------------------
  |  Branch (2492:17): [True: 3.08k, False: 0]
  ------------------
 2493|  3.08k|                    readAnimationTrack(stream, anim, pMesh);
 2494|  3.08k|                    break;
 2495|  3.08k|                };
 2496|  3.03k|                if (!stream->eof())
  ------------------
  |  Branch (2496:21): [True: 2.94k, False: 88]
  ------------------
 2497|  2.94k|                {
 2498|  2.94k|                    streamID = readChunk(stream);
 2499|  2.94k|                }
 2500|       |
 2501|  3.03k|            }
 2502|  1.95k|            if (!stream->eof())
  ------------------
  |  Branch (2502:17): [True: 1.83k, False: 121]
  ------------------
 2503|  1.83k|            {
 2504|       |                // Backpedal back to start of stream
 2505|  1.83k|                backpedalChunkHeader(stream);
 2506|  1.83k|            }
 2507|  1.95k|            popInnerChunk(stream);
 2508|  1.95k|        }
 2509|  2.05k|    }
_ZN4Ogre18MeshSerializerImpl18readAnimationTrackERKNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_4MeshE:
 2513|  3.08k|    {
 2514|       |        // ushort type
 2515|  3.08k|        uint16 inAnimType;
 2516|  3.08k|        readShorts(stream, &inAnimType, 1);
 2517|  3.08k|        VertexAnimationType animType = (VertexAnimationType)inAnimType;
 2518|       |
 2519|       |        // unsigned short target
 2520|  3.08k|        uint16 target;
 2521|  3.08k|        readShorts(stream, &target, 1);
 2522|       |
 2523|  3.08k|        if (target > pMesh->getNumSubMeshes())
  ------------------
  |  Branch (2523:13): [True: 10, False: 3.07k]
  ------------------
 2524|  3.08k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid target for vertex animation track");
 2525|       |
 2526|  3.07k|        VertexData* vdata = pMesh->getVertexDataByTrackHandle(target);
 2527|  3.07k|        if (!vdata)
  ------------------
  |  Branch (2527:13): [True: 1, False: 3.06k]
  ------------------
 2528|  3.07k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track references target with no vertex data");
 2529|  3.06k|        VertexAnimationTrack* track = anim->createVertexTrack(target, vdata, animType);
 2530|       |
 2531|       |        // keyframes
 2532|  3.06k|        if (!stream->eof())
  ------------------
  |  Branch (2532:13): [True: 3.05k, False: 14]
  ------------------
 2533|  3.05k|        {
 2534|  3.05k|            pushInnerChunk(stream);
 2535|  3.05k|            unsigned short streamID = readChunk(stream);
 2536|  7.79k|            while(!stream->eof() &&
  ------------------
  |  Branch (2536:19): [True: 7.70k, False: 89]
  ------------------
 2537|  7.70k|                (streamID == M_ANIMATION_MORPH_KEYFRAME ||
  ------------------
  |  Branch (2537:18): [True: 2.75k, False: 4.94k]
  ------------------
 2538|  4.94k|                 streamID == M_ANIMATION_POSE_KEYFRAME))
  ------------------
  |  Branch (2538:18): [True: 1.99k, False: 2.94k]
  ------------------
 2539|  4.75k|            {
 2540|  4.75k|                switch(streamID)
  ------------------
  |  Branch (2540:24): [True: 4.75k, False: 0]
  ------------------
 2541|  4.75k|                {
 2542|  2.75k|                case M_ANIMATION_MORPH_KEYFRAME:
  ------------------
  |  Branch (2542:17): [True: 2.75k, False: 1.99k]
  ------------------
 2543|  2.75k|                    readMorphKeyFrame(stream, pMesh, track);
 2544|  2.75k|                    break;
 2545|  1.99k|                case M_ANIMATION_POSE_KEYFRAME:
  ------------------
  |  Branch (2545:17): [True: 1.99k, False: 2.75k]
  ------------------
 2546|  1.99k|                    readPoseKeyFrame(stream, track);
 2547|  1.99k|                    break;
 2548|  4.75k|                };
 2549|  4.73k|                if (!stream->eof())
  ------------------
  |  Branch (2549:21): [True: 4.66k, False: 75]
  ------------------
 2550|  4.66k|                {
 2551|  4.66k|                    streamID = readChunk(stream);
 2552|  4.66k|                }
 2553|       |
 2554|  4.73k|            }
 2555|  3.03k|            if (!stream->eof())
  ------------------
  |  Branch (2555:17): [True: 2.94k, False: 89]
  ------------------
 2556|  2.94k|            {
 2557|       |                // Backpedal back to start of stream
 2558|  2.94k|                backpedalChunkHeader(stream);
 2559|  2.94k|            }
 2560|  3.03k|            popInnerChunk(stream);
 2561|  3.03k|        }
 2562|       |
 2563|  3.06k|    }
_ZN4Ogre18MeshSerializerImpl17readMorphKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_20VertexAnimationTrackE:
 2566|  2.75k|    {
 2567|       |        // float time
 2568|  2.75k|        float timePos;
 2569|  2.75k|        readFloats(stream, &timePos, 1);
 2570|       |        
 2571|       |        // bool includesNormals
 2572|  2.75k|        bool includesNormals;
 2573|  2.75k|        readBools(stream, &includesNormals, 1);
 2574|       |
 2575|  2.75k|        VertexMorphKeyFrame* kf = track->createVertexMorphKeyFrame(timePos);
 2576|       |
 2577|       |        // Create buffer, allow read and use shadow buffer
 2578|  2.75k|        size_t vertexCount = track->getAssociatedVertexData()->vertexCount;
 2579|  2.75k|        size_t vertexSize = sizeof(float) * (includesNormals ? 6 : 3);
  ------------------
  |  Branch (2579:46): [True: 858, False: 1.90k]
  ------------------
 2580|  2.75k|        HardwareVertexBufferSharedPtr vbuf =
 2581|  2.75k|            pMesh->getHardwareBufferManager()->createVertexBuffer(
 2582|  2.75k|                vertexSize, vertexCount,
 2583|  2.75k|                HardwareBuffer::HBU_STATIC, true);
 2584|       |        // float x,y,z          // repeat by number of vertices in original geometry
 2585|  2.75k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 2586|  2.75k|        readFloats(stream, static_cast<float*>(vbufLock.pData), vertexCount * (includesNormals ? 6 : 3));
  ------------------
  |  Branch (2586:80): [True: 858, False: 1.90k]
  ------------------
 2587|  2.75k|        kf->setVertexBuffer(vbuf);
 2588|       |
 2589|  2.75k|    }
_ZN4Ogre18MeshSerializerImpl16readPoseKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_20VertexAnimationTrackE:
 2592|  1.99k|    {
 2593|       |        // float time
 2594|  1.99k|        float timePos;
 2595|  1.99k|        readFloats(stream, &timePos, 1);
 2596|       |
 2597|       |        // Create keyframe
 2598|  1.99k|        VertexPoseKeyFrame* kf = track->createVertexPoseKeyFrame(timePos);
 2599|       |
 2600|  1.99k|        if (!stream->eof())
  ------------------
  |  Branch (2600:13): [True: 1.96k, False: 29]
  ------------------
 2601|  1.96k|        {
 2602|  1.96k|            pushInnerChunk(stream);
 2603|  1.96k|            unsigned short streamID = readChunk(stream);
 2604|  3.61k|            while(!stream->eof() &&
  ------------------
  |  Branch (2604:19): [True: 3.57k, False: 42]
  ------------------
 2605|  3.57k|                streamID == M_ANIMATION_POSE_REF)
  ------------------
  |  Branch (2605:17): [True: 1.65k, False: 1.92k]
  ------------------
 2606|  1.65k|            {
 2607|  1.65k|                switch(streamID)
  ------------------
  |  Branch (2607:24): [True: 1.65k, False: 0]
  ------------------
 2608|  1.65k|                {
 2609|  1.65k|                case M_ANIMATION_POSE_REF:
  ------------------
  |  Branch (2609:17): [True: 1.65k, False: 0]
  ------------------
 2610|  1.65k|                    uint16 poseIndex;
 2611|  1.65k|                    float influence;
 2612|       |                    // unsigned short poseIndex
 2613|  1.65k|                    readShorts(stream, &poseIndex, 1);
 2614|       |                    // float influence
 2615|  1.65k|                    readFloats(stream, &influence, 1);
 2616|       |
 2617|  1.65k|                    kf->addPoseReference(poseIndex, influence);
 2618|       |
 2619|  1.65k|                    break;
 2620|  1.65k|                };
 2621|  1.65k|                if (!stream->eof())
  ------------------
  |  Branch (2621:21): [True: 1.63k, False: 11]
  ------------------
 2622|  1.63k|                {
 2623|  1.63k|                    streamID = readChunk(stream);
 2624|  1.63k|                }
 2625|  1.65k|            }
 2626|  1.96k|            if (!stream->eof())
  ------------------
  |  Branch (2626:17): [True: 1.92k, False: 42]
  ------------------
 2627|  1.92k|            {
 2628|       |                // Backpedal back to start of stream
 2629|  1.92k|                backpedalChunkHeader(stream);
 2630|  1.92k|            }
 2631|  1.96k|            popInnerChunk(stream);
 2632|  1.96k|        }
 2633|  1.99k|    }
_ZN4Ogre18MeshSerializerImpl12readExtremesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2636|  3.52k|    {
 2637|  3.52k|        unsigned short idx;
 2638|  3.52k|        readShorts(stream, &idx, 1);
 2639|       |        
 2640|  3.52k|        SubMesh *sm = pMesh->getSubMeshes().at(idx);
 2641|       |
 2642|  3.52k|        const size_t minChunkSize = MSTREAM_OVERHEAD_SIZE + sizeof(unsigned short);
 2643|  3.52k|        if (mCurrentstreamLen <= minChunkSize)
  ------------------
  |  Branch (2643:13): [True: 2, False: 3.52k]
  ------------------
 2644|  3.52k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Extremes chunk too small");
 2645|       |
 2646|  3.52k|        size_t n_floats = (mCurrentstreamLen - minChunkSize) / sizeof(float);
 2647|       |
 2648|  3.52k|        if (n_floats == 0 || n_floats % 3 != 0)
  ------------------
  |  Branch (2648:13): [True: 25, False: 3.49k]
  |  Branch (2648:30): [True: 16, False: 3.48k]
  ------------------
 2649|  3.52k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid extremes data size");
 2650|       |        
 2651|  3.50k|        sm->extremityPoints.resize(n_floats / 3);
 2652|       |
 2653|  3.50k|        readFloats(stream, sm->extremityPoints.front().ptr(), n_floats);
 2654|  3.50k|    }
_ZN4Ogre23MeshSerializerImpl_v1_8C2Ev:
 2668|  4.92k|    {
 2669|       |        // Version number
 2670|  4.92k|        mVersion = "[MeshSerializer_v1.8]";
 2671|       |        // v1.8 and older had broken chunk size bookkeeping (see readMeshLodLevel) and several
 2672|       |        // third party exporters wrote incorrect sizes, too. tolerate them on reading.
 2673|  4.92k|        mReportChunkErrors = false;
 2674|  4.92k|    }
_ZN4Ogre23MeshSerializerImpl_v1_825readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2901|    156|    {
 2902|    156|        usage.manualName = "";
 2903|    156|        usage.manualMesh.reset();
 2904|    156|        pushInnerChunk(stream);
 2905|    156|        {
 2906|       |            // Get one set of detail per SubMesh
 2907|    156|            for (auto *sm : pMesh->getSubMeshes())
  ------------------
  |  Branch (2907:27): [True: 146, False: 80]
  ------------------
 2908|    146|            {
 2909|    146|                unsigned long streamID = readChunk(stream);
 2910|    146|                if (streamID != M_MESH_LOD_GENERATED)
  ------------------
  |  Branch (2910:21): [True: 29, False: 117]
  ------------------
 2911|     29|                {
 2912|     29|                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2913|     29|                        "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 2914|     29|                        "MeshSerializerImpl::readMeshLodUsageGenerated");
 2915|     29|                }
 2916|       |
 2917|    117|                IndexData* indexData = OGRE_NEW IndexData();
 2918|    117|                sm->mLodFaceList[lodNum - 1] = indexData;
 2919|    117|                unsigned int numIndexes;
 2920|    117|                readInts(stream, &numIndexes, 1);
 2921|    117|                bool idx32Bit;
 2922|    117|                readBools(stream, &idx32Bit, 1);
 2923|       |
 2924|    117|                if (!checkChunkRemainingSize(mCurrentstreamLen, numIndexes, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (2924:21): [True: 47, False: 70]
  |  Branch (2924:77): [True: 52, False: 65]
  ------------------
 2925|    117|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 2926|       |
 2927|     70|                indexData->indexCount = numIndexes;
 2928|       |
 2929|     70|                if (idx32Bit)
  ------------------
  |  Branch (2929:21): [True: 14, False: 56]
  ------------------
 2930|     14|                {
 2931|     14|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2932|     14|                        HardwareIndexBuffer::IT_32BIT, indexData->indexCount,
 2933|     14|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2934|     14|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2935|     14|                    readInts(stream, static_cast<unsigned int*>(ibufLock.pData), indexData->indexCount);
 2936|     14|                }
 2937|     56|                else
 2938|     56|                {
 2939|     56|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2940|     56|                        HardwareIndexBuffer::IT_16BIT, indexData->indexCount,
 2941|     56|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2942|     56|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2943|     56|                    readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), indexData->indexCount);
 2944|     56|                }
 2945|     70|            }
 2946|    156|        }
 2947|     80|        popInnerChunk(stream);
 2948|     80|    }
_ZN4Ogre23MeshSerializerImpl_v1_822readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2952|     22|    {
 2953|     22|        pushInnerChunk(stream);
 2954|     22|        unsigned long streamID;
 2955|       |        // Read detail stream
 2956|     22|        streamID = readChunk(stream);
 2957|     22|        if (streamID != M_MESH_LOD_MANUAL)
  ------------------
  |  Branch (2957:13): [True: 8, False: 14]
  ------------------
 2958|      8|        {
 2959|      8|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2960|      8|                "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 2961|      8|                "MeshSerializerImpl::readMeshLodUsageManual");
 2962|      8|        }
 2963|       |
 2964|     14|        usage.manualName = readString(stream);
 2965|     14|        usage.manualMesh.reset(); // will trigger load later
 2966|     14|        popInnerChunk(stream);
 2967|     14|    }
_ZN4Ogre23MeshSerializerImpl_v1_816readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2971|  3.37k|    {
 2972|       |#if OGRE_NO_MESHLOD
 2973|       |
 2974|       |        /*
 2975|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 2976|       |        // We need to walk through the data to not rely on the chunk size!
 2977|       |        stream->skip(mCurrentstreamLen);
 2978|       |
 2979|       |        // Since we got here, we have already read the chunk header.
 2980|       |        backpedalChunkHeader(stream);
 2981|       |        */
 2982|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 2983|       |        String strategyName = readString(stream);
 2984|       |        uint16 numLods;
 2985|       |        readShorts(stream, &numLods, 1);
 2986|       |        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 2987|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 2988|       |        bool manual;
 2989|       |        readBools(stream, &manual, 1); // missing in v1_9
 2990|       |        pushInnerChunk(stream);
 2991|       |        for (uint16 i = 1; i < numLods; ++i)
 2992|       |        {
 2993|       |            uint16 streamID = readChunk(stream);
 2994|       |            if (streamID != M_MESH_LOD_USAGE)
 2995|       |            {
 2996|       |                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2997|       |                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 2998|       |                    "MeshSerializerImpl::readMeshLodInfo");
 2999|       |            }
 3000|       |            float usageValue;
 3001|       |            readFloats(stream, &usageValue, 1);
 3002|       |
 3003|       |            if (manual)
 3004|       |            {
 3005|       |                // Read detail stream
 3006|       |                streamID = readChunk(stream);
 3007|       |                if (streamID != M_MESH_LOD_MANUAL)
 3008|       |                {
 3009|       |                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3010|       |                        "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 3011|       |                        "MeshSerializerImpl::readMeshLodUsageManual");
 3012|       |                }
 3013|       |
 3014|       |                String manualName = readString(stream);
 3015|       |            }
 3016|       |            else
 3017|       |            {
 3018|       |                pushInnerChunk(stream);
 3019|       |                for (uint16 n = 0; n < numSubs; ++n)
 3020|       |                {
 3021|       |                    streamID = readChunk(stream);
 3022|       |                    if (streamID != M_MESH_LOD_GENERATED)
 3023|       |                    {
 3024|       |                        OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3025|       |                            "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 3026|       |                            "MeshSerializerImpl::readMeshLodUsageGenerated");
 3027|       |                    }
 3028|       |
 3029|       |                    unsigned int numIndexes;
 3030|       |                    readInts(stream, &numIndexes, 1);
 3031|       |
 3032|       |                    bool idx32Bit;
 3033|       |                    readBools(stream, &idx32Bit, 1);
 3034|       |
 3035|       |                    size_t buffSize = numIndexes * (idx32Bit ? 4 : 2);
 3036|       |                    stream->skip(buffSize);
 3037|       |                }
 3038|       |                popInnerChunk(stream);
 3039|       |            }
 3040|       |        }
 3041|       |        popInnerChunk(stream);
 3042|       |#else
 3043|  3.37k|        unsigned short streamID, i;
 3044|       |
 3045|       |        // Read the strategy to be used for this mesh
 3046|  3.37k|        String strategyName = readString(stream);
 3047|  3.37k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 3048|       |        
 3049|  3.37k|        if (strategy)
  ------------------
  |  Branch (3049:13): [True: 593, False: 2.78k]
  ------------------
 3050|    593|            pMesh->setLodStrategy(strategy);
 3051|       |
 3052|       |        // unsigned short numLevels;
 3053|  3.37k|        uint16 numLods;
 3054|  3.37k|        readShorts(stream, &numLods, 1);
 3055|  3.37k|        numLods = std::max<ushort>(numLods, 1);
 3056|       |
 3057|  3.37k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (3057:13): [True: 61, False: 3.31k]
  ------------------
 3058|  3.37k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 3059|       |
 3060|  3.31k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (3060:12): [True: 2, False: 3.31k]
  ------------------
 3061|  3.31k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 3062|       |
 3063|  3.31k|        pMesh->mMeshLodUsageList.resize(numLods);
 3064|       |
 3065|  3.31k|        bool manual; // true for manual alternate meshes, false for generated
 3066|  3.31k|        readBools(stream, &manual, 1);
 3067|  3.31k|        pMesh->mHasManualLodLevel = manual;
 3068|       |
 3069|       |        // Preallocate submesh lod face data if not manual
 3070|  3.31k|        if (!pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3070:13): [True: 1.46k, False: 1.84k]
  ------------------
 3071|  1.46k|        {
 3072|  1.46k|            unsigned short numsubs = pMesh->getNumSubMeshes();
 3073|  16.7k|            for (i = 0; i < numsubs; ++i)
  ------------------
  |  Branch (3073:25): [True: 15.2k, False: 1.46k]
  ------------------
 3074|  15.2k|            {
 3075|  15.2k|                SubMesh* sm = pMesh->getSubMesh(i);
 3076|  15.2k|                assert(sm->mLodFaceList.empty());
 3077|  15.2k|                sm->mLodFaceList.resize(numLods - 1);
 3078|  15.2k|            }
 3079|  1.46k|        }
 3080|       |
 3081|  3.31k|        pushInnerChunk(stream);
 3082|       |        // Loop from 1 rather than 0 (full detail index is not in file)
 3083|  3.50k|        for (i = 1; i < numLods; ++i)
  ------------------
  |  Branch (3083:21): [True: 278, False: 3.22k]
  ------------------
 3084|    278|        {
 3085|    278|            streamID = readChunk(stream);
 3086|    278|            if (streamID != M_MESH_LOD_USAGE)
  ------------------
  |  Branch (3086:17): [True: 89, False: 189]
  ------------------
 3087|     89|            {
 3088|     89|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3089|     89|                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3090|     89|                    "MeshSerializerImpl::readMeshLodInfo");
 3091|     89|            }
 3092|       |            // Read depth
 3093|    189|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[i];
 3094|    189|            readFloats(stream, &(usage.userValue), 1);
 3095|       |
 3096|    189|            if (pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3096:17): [True: 22, False: 167]
  ------------------
 3097|     22|            {
 3098|     22|                readMeshLodUsageManual(stream, pMesh, i, usage);
 3099|     22|            }
 3100|    167|            else //(!pMesh->hasManualLodLevel())
 3101|    167|            {
 3102|    167|                readMeshLodUsageGenerated(stream, pMesh, i, usage);
 3103|    167|            }
 3104|    189|            usage.edgeData = NULL;
 3105|    189|        }
 3106|  3.22k|        popInnerChunk(stream);
 3107|  3.22k|#endif
 3108|  3.22k|    }
OgreMeshSerializerImpl.cpp:_ZN4OgreL23checkChunkRemainingSizeEmmm:
   51|   223k|    {
   52|   223k|        if (itemCount == 0)
  ------------------
  |  Branch (52:13): [True: 16.2k, False: 206k]
  ------------------
   53|  16.2k|            return true;
   54|       |
   55|   206k|        if (chunkSize <= MSTREAM_OVERHEAD_SIZE || itemSize == 0)
  ------------------
  |  Branch (55:13): [True: 539, False: 206k]
  |  Branch (55:51): [True: 0, False: 206k]
  ------------------
   56|    539|            return false;
   57|       |
   58|   206k|        size_t remaining = chunkSize - MSTREAM_OVERHEAD_SIZE;
   59|   206k|        return remaining / itemSize >= itemCount;
   60|   206k|    }

_ZN4Ogre4NodeC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   35|    714|        :mParent(0),
   36|    714|        mName(name),
   37|    714|        mNeedParentUpdate(false),
   38|    714|        mNeedChildUpdate(false),
   39|    714|        mParentNotified(false),
   40|    714|        mQueuedForUpdate(false),
   41|    714|        mInheritOrientation(true),
   42|    714|        mInheritScale(true),
   43|    714|        mCachedTransformOutOfDate(true),
   44|    714|        mOrientation(Quaternion::IDENTITY),
   45|    714|        mPosition(Vector3::ZERO),
   46|    714|        mScale(Vector3::UNIT_SCALE),
   47|    714|        mDerivedOrientation(Quaternion::IDENTITY),
   48|    714|        mDerivedPosition(Vector3::ZERO),
   49|    714|        mDerivedScale(Vector3::UNIT_SCALE),
   50|    714|        mInitialPosition(Vector3::ZERO),
   51|    714|        mInitialOrientation(Quaternion::IDENTITY),
   52|    714|        mInitialScale(Vector3::UNIT_SCALE),
   53|    714|        mListener(0)
   54|    714|    {
   55|    714|        needUpdate();
   56|    714|    }
_ZN4Ogre4NodeD2Ev:
   60|    714|    {
   61|       |        // Call listener (note, only called if there's something to do)
   62|    714|        if (mListener)
  ------------------
  |  Branch (62:13): [True: 0, False: 714]
  ------------------
   63|      0|        {
   64|      0|            mListener->nodeDestroyed(this);
   65|      0|        }
   66|       |
   67|    714|        removeAllChildren();
   68|    714|        if(mParent)
  ------------------
  |  Branch (68:12): [True: 5, False: 709]
  ------------------
   69|      5|            mParent->removeChild(this);
   70|       |
   71|    714|        if (mQueuedForUpdate)
  ------------------
  |  Branch (71:13): [True: 0, False: 714]
  ------------------
   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|    714|    }
_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:
  192|    563|    {
  193|    563|        updateFromParentImpl();
  194|       |
  195|       |        // Call listener (note, this method only called if there's something to do)
  196|    563|        if (mListener)
  ------------------
  |  Branch (196:13): [True: 0, False: 563]
  ------------------
  197|      0|        {
  198|      0|            mListener->nodeUpdated(this);
  199|      0|        }
  200|    563|    }
_ZNK4Ogre4Node20updateFromParentImplEv:
  203|    563|    {
  204|    563|        mCachedTransformOutOfDate = true;
  205|       |
  206|    563|        if (mParent)
  ------------------
  |  Branch (206:13): [True: 2, False: 561]
  ------------------
  207|      2|        {
  208|       |#if OGRE_NODE_INHERIT_TRANSFORM
  209|       |            // Decompose full transform to position, orientation and scale, shear is lost here.
  210|       |            _getFullTransform().decomposition(mDerivedPosition, mDerivedScale, mDerivedOrientation);
  211|       |#else
  212|       |            // Update orientation
  213|      2|            const Quaternion& parentOrientation = mParent->_getDerivedOrientation();
  214|      2|            if (mInheritOrientation)
  ------------------
  |  Branch (214:17): [True: 2, False: 0]
  ------------------
  215|      2|            {
  216|       |                // Combine orientation with that of parent
  217|      2|                mDerivedOrientation = parentOrientation * mOrientation;
  218|      2|            }
  219|      0|            else
  220|      0|            {
  221|       |                // No inheritance
  222|      0|                mDerivedOrientation = mOrientation;
  223|      0|            }
  224|       |
  225|       |            // Update scale
  226|      2|            const Vector3& parentScale = mParent->_getDerivedScale();
  227|      2|            if (mInheritScale)
  ------------------
  |  Branch (227:17): [True: 2, False: 0]
  ------------------
  228|      2|            {
  229|       |                // Scale own position by parent scale, NB just combine
  230|       |                // as equivalent axes, no shearing
  231|      2|                mDerivedScale = parentScale * mScale;
  232|      2|            }
  233|      0|            else
  234|      0|            {
  235|       |                // No inheritance
  236|      0|                mDerivedScale = mScale;
  237|      0|            }
  238|       |
  239|       |            // Change position vector based on parent's orientation & scale
  240|      2|            mDerivedPosition = parentOrientation * (parentScale * mPosition);
  241|       |
  242|       |            // Add altered position vector to parents
  243|      2|            mDerivedPosition += mParent->_getDerivedPosition();
  244|      2|#endif
  245|      2|        }
  246|    561|        else
  247|    561|        {
  248|       |            // Root node, no parent
  249|    561|            mDerivedOrientation = mOrientation;
  250|    561|            mDerivedPosition = mPosition;
  251|    561|            mDerivedScale = mScale;
  252|    561|        }
  253|       |
  254|    563|        mNeedParentUpdate = false;
  255|       |
  256|    563|    }
_ZN4Ogre4Node8addChildEPS0_:
  280|     13|    {
  281|     13|        if (child->mParent)
  ------------------
  |  Branch (281:13): [True: 3, False: 10]
  ------------------
  282|      3|        {
  283|      3|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
  284|      3|                        "Node '" + child->getName() + "' already is a child of '" + child->mParent->getName() + "'");
  285|      3|        }
  286|       |
  287|     10|        mChildren.push_back(child);
  288|     10|        child->setParent(this);
  289|       |
  290|     10|    }
_ZN4Ogre4Node11removeChildEPS0_:
  320|      5|    {
  321|      5|        if (child)
  ------------------
  |  Branch (321:13): [True: 5, False: 0]
  ------------------
  322|      5|        {
  323|      5|            ChildNodeMap::iterator i = std::find(mChildren.begin(), mChildren.end(), child);
  324|      5|            if(i != mChildren.end() && *i == child)
  ------------------
  |  Branch (324:16): [True: 5, False: 0]
  |  Branch (324:16): [True: 5, False: 0]
  |  Branch (324:40): [True: 5, False: 0]
  ------------------
  325|      5|            {
  326|       |                // cancel any pending update
  327|      5|                cancelUpdate(child);
  328|       |
  329|      5|                std::swap(*i, mChildren.back());
  330|      5|                mChildren.pop_back();
  331|       |                child->setParent(NULL);
  332|      5|            }
  333|      5|        }
  334|      5|        return child;
  335|      5|    }
_ZN4Ogre4Node14setOrientationERKNS_10QuaternionE:
  339|    714|    {
  340|    714|#ifndef OGRE_FAST_MATH
  341|    714|        OgreAssertDbg(!q.isNaN(), "Invalid orientation supplied as parameter");
  342|    714|#endif
  343|    714|        mOrientation = q;
  344|    714|        mOrientation.normalise();
  345|    714|        needUpdate();
  346|    714|    }
_ZN4Ogre4Node11setPositionERKNS_6VectorILi3EfEE:
  361|    714|    {
  362|    714|#ifndef OGRE_FAST_MATH
  363|       |        assert(!pos.isNaN() && "Invalid vector supplied as parameter");
  364|    714|#endif
  365|    714|        mPosition = pos;
  366|    714|        needUpdate();
  367|    714|    }
_ZNK4Ogre4Node22_getDerivedOrientationEv:
  452|    565|    {
  453|    565|        if (mNeedParentUpdate)
  ------------------
  |  Branch (453:13): [True: 1, False: 564]
  ------------------
  454|      1|        {
  455|      1|            _updateFromParent();
  456|      1|        }
  457|    565|        return mDerivedOrientation;
  458|    565|    }
_ZNK4Ogre4Node19_getDerivedPositionEv:
  461|    565|    {
  462|    565|        if (mNeedParentUpdate)
  ------------------
  |  Branch (462:13): [True: 562, False: 3]
  ------------------
  463|    562|        {
  464|    562|            _updateFromParent();
  465|    562|        }
  466|    565|        return mDerivedPosition;
  467|    565|    }
_ZNK4Ogre4Node16_getDerivedScaleEv:
  470|    565|    {
  471|    565|        if (mNeedParentUpdate)
  ------------------
  |  Branch (471:13): [True: 0, False: 565]
  ------------------
  472|      0|        {
  473|      0|            _updateFromParent();
  474|      0|        }
  475|    565|        return mDerivedScale;
  476|    565|    }
_ZN4Ogre4Node17removeAllChildrenEv:
  546|    714|    {
  547|    714|        for (auto *c : mChildren)
  ------------------
  |  Branch (547:22): [True: 5, False: 714]
  ------------------
  548|      5|        {
  549|      5|            c->setParent(0);
  550|      5|        }
  551|    714|        mChildren.clear();
  552|    714|        mChildrenToUpdate.clear();
  553|    714|    }
_ZN4Ogre4Node8setScaleERKNS_6VectorILi3EfEE:
  563|     14|    {
  564|     14|#ifndef OGRE_FAST_MATH
  565|       |        assert(!inScale.isNaN() && "Invalid vector supplied as parameter");
  566|     14|#endif
  567|     14|        mScale = inScale;
  568|     14|        needUpdate();
  569|     14|    }
_ZN4Ogre4Node15setInitialStateEv:
  600|    563|    {
  601|    563|        mInitialPosition = mPosition;
  602|    563|        mInitialOrientation = mOrientation;
  603|    563|        mInitialScale = mScale;
  604|    563|    }
_ZN4Ogre4Node10needUpdateEb:
  680|  2.17k|    {
  681|       |
  682|  2.17k|        mNeedParentUpdate = true;
  683|  2.17k|        mNeedChildUpdate = true;
  684|  2.17k|        mCachedTransformOutOfDate = true;
  685|       |
  686|       |        // Make sure we're not root and parent hasn't been notified before
  687|  2.17k|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (687:13): [True: 10, False: 2.16k]
  |  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.17k|        mChildrenToUpdate.clear();
  695|  2.17k|    }
_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.push_back(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(std::remove(mChildrenToUpdate.begin(), mChildrenToUpdate.end(), child),
  718|      5|                                mChildrenToUpdate.end());
  719|       |
  720|       |        // Propagate this up if we're done
  721|      5|        if (mChildrenToUpdate.empty() && mParent && !mNeedChildUpdate)
  ------------------
  |  Branch (721:13): [True: 5, False: 0]
  |  Branch (721:42): [True: 0, False: 5]
  |  Branch (721:53): [True: 0, False: 0]
  ------------------
  722|      0|        {
  723|      0|            mParent->cancelUpdate(this);
  724|      0|            mParentNotified = false ;
  725|      0|        }
  726|      5|    }

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

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

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

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

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

_ZN4Ogre4PoseC2EtRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   34|  13.7k|        : mTarget(target), mName(name)
   35|  13.7k|    {
   36|  13.7k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEE:
   39|  2.66k|    {
   40|  2.66k|        OgreAssert(mNormalsMap.empty(),
  ------------------
  |  Branch (40:9): [True: 0, False: 2.66k]
  ------------------
   41|  2.66k|                   "Inconsistent calls to addVertex, must include normals always or never");
   42|       |
   43|  2.66k|        if(offset.squaredLength() < 1e-6f)
  ------------------
  |  Branch (43:12): [True: 358, False: 2.30k]
  ------------------
   44|    358|        {
   45|    358|            return;
   46|    358|        }
   47|       |
   48|  2.30k|        mVertexOffsetMap[index] = offset;
   49|  2.30k|        mBuffer.reset();
   50|  2.30k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEES4_:
   53|  3.12k|    {
   54|  3.12k|        OgreAssert(mVertexOffsetMap.empty() || !mNormalsMap.empty(),
  ------------------
  |  Branch (54:9): [True: 831, False: 2.28k]
  |  Branch (54:9): [True: 2.28k, False: 0]
  ------------------
   55|  3.12k|                   "Inconsistent calls to addVertex, must include normals always or never");
   56|       |
   57|  3.12k|        if(offset.squaredLength() < 1e-6f && normal.squaredLength() < 1e-6f)
  ------------------
  |  Branch (57:12): [True: 1.25k, False: 1.86k]
  |  Branch (57:46): [True: 143, False: 1.11k]
  ------------------
   58|    143|        {
   59|    143|            return;
   60|    143|        }
   61|       |
   62|  2.97k|        mVertexOffsetMap[index] = offset;
   63|  2.97k|        mNormalsMap[index] = normal;
   64|  2.97k|        mBuffer.reset();
   65|  2.97k|    }

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

_ZN4Ogre20ResourceGroupManager12getSingletonEv:
   40|   182k|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|   182k|    }
_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|  14.6k|    {
  516|  14.6k|        OgreAssert(!resourceName.empty(), "resourceName is empty string");
  ------------------
  |  Branch (516:9): [True: 0, False: 14.6k]
  ------------------
  517|  14.6k|        if(mLoadingListener)
  ------------------
  |  Branch (517:12): [True: 0, False: 14.6k]
  ------------------
  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|  14.6k|        ResourceGroup* grp = getResourceGroup(groupName, throwOnFailure);
  526|  14.6k|        if (!grp)
  ------------------
  |  Branch (526:13): [True: 0, False: 14.6k]
  ------------------
  527|      0|        {
  528|       |            // we only get here if throwOnFailure is false
  529|      0|            return DataStreamPtr();
  530|      0|        }
  531|       |
  532|  14.6k|        Archive* pArch = resourceExists(grp, resourceName);
  533|       |
  534|  14.6k|        if (pArch == NULL && (searchGroupsIfNotFound ||
  ------------------
  |  Branch (534:13): [True: 14.6k, False: 0]
  |  Branch (534:31): [True: 0, False: 14.6k]
  ------------------
  535|  14.6k|            groupName == AUTODETECT_RESOURCE_GROUP_NAME || grp->inGlobalPool ||
  ------------------
  |  Branch (535:13): [True: 0, False: 14.6k]
  |  Branch (535:60): [True: 14.6k, 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|  14.6k|        {
  538|  14.6k|            std::pair<Archive*, ResourceGroup*> ret = resourceExistsInAnyGroupImpl(resourceName);
  539|       |
  540|  14.6k|            if(ret.second && resourceBeingLoaded && !ret.second->inGlobalPool) {
  ------------------
  |  Branch (540:16): [True: 0, False: 14.6k]
  |  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|  14.6k|            pArch = ret.first;
  545|  14.6k|        }
  546|       |
  547|  14.6k|        if (pArch)
  ------------------
  |  Branch (547:13): [True: 0, False: 14.6k]
  ------------------
  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|  14.6k|        if(!throwOnFailure)
  ------------------
  |  Branch (555:12): [True: 0, False: 14.6k]
  ------------------
  556|      0|            return DataStreamPtr();
  557|       |
  558|  14.6k|        OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND, "Cannot locate resource " + 
  559|  14.6k|            resourceName + " in resource group " + groupName + ".", 
  560|  14.6k|            "ResourceGroupManager::openResource");
  561|       |
  562|  14.6k|    }
_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:
  863|  8.99k|    {
  864|  8.99k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (864:13): [True: 0, False: 8.99k]
  |  Branch (864:30): [True: 0, False: 0]
  ------------------
  865|      0|        {
  866|       |            // Use current group (batch loading)
  867|      0|            addCreatedResource(res, *mCurrentGroup);
  868|      0|        }
  869|  8.99k|        else
  870|  8.99k|        {
  871|       |            // Find group
  872|  8.99k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  873|  8.99k|            if (grp)
  ------------------
  |  Branch (873:17): [True: 8.99k, False: 0]
  ------------------
  874|  8.99k|            {
  875|  8.99k|                addCreatedResource(res, *grp);
  876|  8.99k|            }
  877|  8.99k|        }
  878|       |
  879|  8.99k|        fireResourceCreated(res);
  880|  8.99k|    }
_ZNK4Ogre20ResourceGroupManager22_notifyResourceRemovedERKNS_9SharedPtrINS_8ResourceEEE:
  883|  5.98k|    {
  884|  5.98k|        fireResourceRemove(res);
  885|       |
  886|  5.98k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (886:13): [True: 0, False: 5.98k]
  |  Branch (886:30): [True: 0, False: 0]
  ------------------
  887|      0|        {
  888|       |            // Do nothing - we're batch unloading so list will be cleared
  889|      0|        }
  890|  5.98k|        else
  891|  5.98k|        {
  892|       |            // Find group
  893|  5.98k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  894|  5.98k|            if (grp)
  ------------------
  |  Branch (894:17): [True: 5.98k, False: 0]
  ------------------
  895|  5.98k|            {
  896|  5.98k|                            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
  897|  5.98k|                ResourceGroup::LoadResourceOrderMap::iterator i = 
  898|  5.98k|                    grp->loadResourceOrderMap.find(
  899|  5.98k|                        res->getCreator()->getLoadingOrder());
  900|  5.98k|                if (i != grp->loadResourceOrderMap.end())
  ------------------
  |  Branch (900:21): [True: 5.98k, False: 0]
  ------------------
  901|  5.98k|                {
  902|       |                    // Iterate over the resource list and remove
  903|  5.98k|                    LoadUnloadResourceList& resList = i->second;
  904|  5.98k|                    for (LoadUnloadResourceList::iterator l = resList.begin();
  905|   410k|                        l != resList.end(); ++ l)
  ------------------
  |  Branch (905:25): [True: 410k, False: 0]
  ------------------
  906|   410k|                    {
  907|   410k|                        if ((*l).get() == res.get())
  ------------------
  |  Branch (907:29): [True: 5.98k, False: 404k]
  ------------------
  908|  5.98k|                        {
  909|       |                            // this is the one
  910|  5.98k|                            resList.erase(l);
  911|  5.98k|                            break;
  912|  5.98k|                        }
  913|   410k|                    }
  914|  5.98k|                }
  915|  5.98k|            }
  916|  5.98k|        }
  917|  5.98k|    }
_ZNK4Ogre20ResourceGroupManager18addCreatedResourceERNS_9SharedPtrINS_8ResourceEEERNS0_13ResourceGroupE:
  990|  8.99k|    {
  991|  8.99k|            OGRE_LOCK_MUTEX(grp.OGRE_AUTO_MUTEX_NAME);
  992|  8.99k|        Real order = res->getCreator()->getLoadingOrder();
  993|       |
  994|  8.99k|        ResourceGroup::LoadResourceOrderMap::iterator i = grp.loadResourceOrderMap.find(order);
  995|  8.99k|        LoadUnloadResourceList& loadList =
  996|  8.99k|            i == grp.loadResourceOrderMap.end() ? grp.loadResourceOrderMap[order] : i->second;
  ------------------
  |  Branch (996:13): [True: 3, False: 8.98k]
  ------------------
  997|       |
  998|  8.99k|        loadList.push_back(res);
  999|  8.99k|    }
_ZNK4Ogre20ResourceGroupManager16getResourceGroupERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 1003|   173k|    {
 1004|   173k|        OGRE_LOCK_AUTO_MUTEX;
 1005|   173k|        ResourceGroupMap::const_iterator i = mResourceGroupMap.find(name);
 1006|       |
 1007|   173k|        if (i == mResourceGroupMap.end())
  ------------------
  |  Branch (1007:13): [True: 3, False: 173k]
  ------------------
 1008|      3|        {
 1009|      3|            if (throwOnFailure)
  ------------------
  |  Branch (1009:17): [True: 0, False: 3]
  ------------------
 1010|      3|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Cannot locate a resource group called '" + name + "'");
 1011|       |
 1012|      3|            return nullptr;
 1013|      3|        }
 1014|       |
 1015|   173k|        return i->second;
 1016|   173k|    }
_ZNK4Ogre20ResourceGroupManager19fireResourceCreatedERKNS_9SharedPtrINS_8ResourceEEE:
 1203|  8.99k|    {
 1204|  8.99k|        OGRE_LOCK_AUTO_MUTEX;
 1205|  8.99k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1205:21): [True: 0, False: 8.99k]
  ------------------
 1206|      0|        {
 1207|      0|            l->resourceCreated(resource);
 1208|      0|        }
 1209|  8.99k|    }
_ZNK4Ogre20ResourceGroupManager18fireResourceRemoveERKNS_9SharedPtrINS_8ResourceEEE:
 1212|  5.98k|    {
 1213|  5.98k|        OGRE_LOCK_AUTO_MUTEX;
 1214|  5.98k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1214:21): [True: 0, False: 5.98k]
  ------------------
 1215|      0|        {
 1216|      0|            l->resourceRemove(resource);
 1217|      0|        }
 1218|  5.98k|    }
_ZNK4Ogre20ResourceGroupManager14resourceExistsEPNS0_13ResourceGroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1317|  58.4k|    {
 1318|       |
 1319|  58.4k|            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
 1320|       |
 1321|       |        // Try indexes first
 1322|  58.4k|        ResourceLocationIndex::iterator rit = grp->resourceIndexCaseSensitive.find(resourceName);
 1323|  58.4k|        if (rit != grp->resourceIndexCaseSensitive.end())
  ------------------
  |  Branch (1323:13): [True: 0, False: 58.4k]
  ------------------
 1324|      0|        {
 1325|       |            // Found in the index
 1326|      0|            return rit->second;
 1327|      0|        }
 1328|       |
 1329|       |#if !OGRE_RESOURCEMANAGER_STRICT
 1330|       |        // try case insensitive
 1331|       |        String lcResourceName = resourceName;
 1332|       |        StringUtil::toLowerCase(lcResourceName);
 1333|       |        rit = grp->resourceIndexCaseInsensitive.find(lcResourceName);
 1334|       |        if (rit != grp->resourceIndexCaseInsensitive.end())
 1335|       |        {
 1336|       |            // Found in the index
 1337|       |            return rit->second;
 1338|       |        }
 1339|       |
 1340|       |        // Search the hard way
 1341|       |        for (auto& li : grp->locationList)
 1342|       |        {
 1343|       |            if (li.archive->exists(resourceName))
 1344|       |            {
 1345|       |                return li.archive;
 1346|       |            }
 1347|       |        }
 1348|       |#endif
 1349|       |
 1350|  58.4k|        return NULL;
 1351|       |
 1352|  58.4k|    }
_ZNK4Ogre20ResourceGroupManager28resourceExistsInAnyGroupImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1374|  14.6k|    {
 1375|  14.6k|        OgreAssert(!filename.empty(), "resourceName is empty string");
  ------------------
  |  Branch (1375:9): [True: 0, False: 14.6k]
  ------------------
 1376|  14.6k|            OGRE_LOCK_AUTO_MUTEX;
 1377|       |
 1378|       |            // Iterate over resource groups and find
 1379|  14.6k|        for (const auto & i : mResourceGroupMap)
  ------------------
  |  Branch (1379:29): [True: 43.8k, False: 14.6k]
  ------------------
 1380|  43.8k|        {
 1381|  43.8k|            Archive* arch = resourceExists(i.second, filename);
 1382|  43.8k|            if (arch)
  ------------------
  |  Branch (1382:17): [True: 0, False: 43.8k]
  ------------------
 1383|      0|                return std::make_pair(arch, i.second);
 1384|  43.8k|        }
 1385|       |        // Not found
 1386|  14.6k|        return std::pair<Archive*, ResourceGroup*>();
 1387|  14.6k|    }
_ZNK4Ogre20ResourceGroupManager27isResourceGroupInGlobalPoolERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1462|   144k|    {
 1463|   144k|        return getResourceGroup(name, true)->inGlobalPool;
 1464|   144k|    }
_ZNK4Ogre20ResourceGroupManager18getLoadingListenerEv:
 1495|  8.99k|    {
 1496|  8.99k|        return mLoadingListener;
 1497|  8.99k|    }

_ZN4Ogre15ResourceManagerC2Ev:
   35|      3|        : mNextHandle(1), mMemoryUsage(0), mVerbose(true), mLoadOrder(0)
   36|      3|    {
   37|       |        // Init memory limit & usage
   38|      3|        mMemoryBudget = std::numeric_limits<unsigned long>::max();
   39|      3|    }
_ZN4Ogre15ResourceManager14createResourceERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   53|  8.99k|    {
   54|  8.99k|        OgreAssert(!name.empty(), "resource name must not be empty");
  ------------------
  |  Branch (54:9): [True: 1, False: 8.99k]
  ------------------
   55|       |
   56|       |        // Call creation implementation
   57|  8.99k|        ResourcePtr ret = ResourcePtr(
   58|  8.99k|            createImpl(name, getNextHandle(), group, isManual, loader, params));
   59|  8.99k|        if (params)
  ------------------
  |  Branch (59:13): [True: 0, False: 8.99k]
  ------------------
   60|      0|            ret->setParameterList(*params);
   61|       |
   62|  8.99k|        addImpl(ret);
   63|       |        // Tell resource group manager
   64|  8.99k|        if(ret)
  ------------------
  |  Branch (64:12): [True: 8.99k, False: 0]
  ------------------
   65|  8.99k|            ResourceGroupManager::getSingleton()._notifyResourceCreated(ret);
   66|  8.99k|        return ret;
   67|       |
   68|  8.99k|    }
_ZN4Ogre15ResourceManager16createOrRetrieveERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   75|  14.6k|    {
   76|       |        // Lock for the whole get / insert
   77|  14.6k|            OGRE_LOCK_AUTO_MUTEX;
   78|       |
   79|  14.6k|        ResourcePtr res = getResourceByName(name, group);
   80|  14.6k|        bool created = false;
   81|  14.6k|        if (!res)
  ------------------
  |  Branch (81:13): [True: 3.00k, False: 11.6k]
  ------------------
   82|  3.00k|        {
   83|  3.00k|            created = true;
   84|  3.00k|            res = createResource(name, group, isManual, loader, params);
   85|  3.00k|        }
   86|       |
   87|  14.6k|        return ResourceCreateOrRetrieveResult(res, created);
   88|  14.6k|    }
_ZN4Ogre15ResourceManager7prepareERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
   93|    111|    {
   94|    111|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
   95|       |        // ensure prepared
   96|    111|        r->prepare(backgroundThread);
   97|    111|        return r;
   98|    111|    }
_ZN4Ogre15ResourceManager4loadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
  103|  14.4k|    {
  104|  14.4k|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
  105|       |        // ensure loaded
  106|  14.4k|        r->load(backgroundThread);
  107|       |
  108|  14.4k|        return r;
  109|  14.4k|    }
_ZN4Ogre15ResourceManager7addImplERNS_9SharedPtrINS_8ResourceEEE:
  112|  8.99k|    {
  113|  8.99k|            OGRE_LOCK_AUTO_MUTEX;
  114|       |
  115|  8.99k|            std::pair<ResourceMap::iterator, bool> result;
  116|  8.99k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (116:12): [True: 8.99k, False: 0]
  ------------------
  117|  8.99k|        {
  118|  8.99k|            result = mResources.emplace(res->getName(), res);
  119|  8.99k|        }
  120|      0|        else
  121|      0|        {
  122|       |            // we will create the group if it doesn't exists in our list
  123|      0|            auto resgroup = mResourcesWithGroup.emplace(res->getGroup(), ResourceMap()).first;
  124|      0|            result = resgroup->second.emplace(res->getName(), res);
  125|      0|        }
  126|       |
  127|       |        // Attempt to resolve the collision
  128|  8.99k|        ResourceLoadingListener* listener = ResourceGroupManager::getSingleton().getLoadingListener();
  129|  8.99k|        if (!result.second && listener)
  ------------------
  |  Branch (129:13): [True: 0, False: 8.99k]
  |  Branch (129:31): [True: 0, False: 0]
  ------------------
  130|      0|        {
  131|      0|            if(listener->resourceCollision(res.get(), this) == false)
  ------------------
  |  Branch (131:16): [True: 0, False: 0]
  ------------------
  132|      0|            {
  133|       |                // explicitly use previous instance and destroy current
  134|      0|                res.reset();
  135|      0|                return;
  136|      0|            }
  137|       |
  138|       |            // Try to do the addition again, no seconds attempts to resolve collisions are allowed
  139|      0|            if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (139:16): [True: 0, False: 0]
  ------------------
  140|      0|            {
  141|      0|                result = mResources.emplace(res->getName(), res);
  142|      0|            }
  143|      0|            else
  144|      0|            {
  145|      0|                auto resgroup = mResourcesWithGroup.emplace(res->getGroup(), ResourceMap()).first;
  146|      0|                result = resgroup->second.emplace(res->getName(), res);
  147|      0|            }
  148|      0|        }
  149|       |
  150|  8.99k|        if (!result.second)
  ------------------
  |  Branch (150:13): [True: 0, False: 8.99k]
  ------------------
  151|      0|        {
  152|      0|            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, getResourceType()+" with the name " + res->getName() +
  153|      0|                " already exists.", "ResourceManager::add");
  154|      0|        }
  155|       |
  156|       |        // Insert the handle
  157|  8.99k|        std::pair<ResourceHandleMap::iterator, bool> resultHandle = mResourcesByHandle.emplace(res->getHandle(), res);
  158|  8.99k|        if (!resultHandle.second)
  ------------------
  |  Branch (158:13): [True: 0, False: 8.99k]
  ------------------
  159|      0|        {
  160|       |            OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, getResourceType()+" with the handle " +
  161|      0|                StringConverter::toString((long) (res->getHandle())) +
  162|      0|                " already exists.", "ResourceManager::add");
  163|      0|        }
  164|  8.99k|    }
_ZN4Ogre15ResourceManager10removeImplERKNS_9SharedPtrINS_8ResourceEEE:
  167|  5.98k|    {
  168|  5.98k|        OgreAssert(res, "attempting to remove nullptr");
  ------------------
  |  Branch (168:9): [True: 0, False: 5.98k]
  ------------------
  169|       |
  170|  5.98k|#if OGRE_RESOURCEMANAGER_STRICT
  171|  5.98k|        if (res->getCreator() != this)
  ------------------
  |  Branch (171:13): [True: 0, False: 5.98k]
  ------------------
  172|  5.98k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Resource '" + res->getName() + "' was not created by the '" +
  173|  5.98k|                                                          getResourceType() + "' ResourceManager");
  174|  5.98k|#endif
  175|       |
  176|  5.98k|        OGRE_LOCK_AUTO_MUTEX;
  177|       |
  178|  5.98k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (178:12): [True: 5.98k, False: 0]
  ------------------
  179|  5.98k|        {
  180|  5.98k|            ResourceMap::iterator nameIt = mResources.find(res->getName());
  181|  5.98k|            if (nameIt != mResources.end())
  ------------------
  |  Branch (181:17): [True: 5.98k, False: 0]
  ------------------
  182|  5.98k|            {
  183|  5.98k|                mResources.erase(nameIt);
  184|  5.98k|            }
  185|  5.98k|        }
  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|  5.98k|        ResourceHandleMap::iterator handleIt = mResourcesByHandle.find(res->getHandle());
  205|  5.98k|        if (handleIt != mResourcesByHandle.end())
  ------------------
  |  Branch (205:13): [True: 5.98k, False: 0]
  ------------------
  206|  5.98k|        {
  207|  5.98k|            mResourcesByHandle.erase(handleIt);
  208|  5.98k|        }
  209|       |        // Tell resource group manager
  210|  5.98k|        ResourceGroupManager::getSingleton()._notifyResourceRemoved(res);
  211|  5.98k|    }
_ZN4Ogre15ResourceManager6removeERKNS_9SharedPtrINS_8ResourceEEE:
  298|  5.98k|    {
  299|  5.98k|        removeImpl(res);
  300|  5.98k|    }
_ZNK4Ogre15ResourceManager17getResourceByNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  368|   129k|    {
  369|   129k|        OGRE_LOCK_AUTO_MUTEX;
  370|       |
  371|       |        // resource should be in global pool
  372|   129k|        bool isGlobal = ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(groupName);
  373|       |
  374|   129k|        if(isGlobal)
  ------------------
  |  Branch (374:12): [True: 129k, False: 0]
  ------------------
  375|   129k|        {
  376|   129k|            auto it = mResources.find(name);
  377|   129k|            if( it != mResources.end())
  ------------------
  |  Branch (377:17): [True: 11.6k, False: 117k]
  ------------------
  378|  11.6k|            {
  379|  11.6k|                return it->second;
  380|  11.6k|            }
  381|   129k|        }
  382|       |
  383|       |        // look in all grouped pools
  384|   117k|        if (groupName == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (384:13): [True: 0, False: 117k]
  ------------------
  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|   117k|        else if (!isGlobal)
  ------------------
  |  Branch (396:18): [True: 0, False: 117k]
  ------------------
  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|   117k|        return ResourcePtr();
  421|   117k|    }
_ZN4Ogre15ResourceManager13getNextHandleEv:
  431|  8.99k|    {
  432|       |        // This is an atomic operation and hence needs no locking
  433|  8.99k|        return mNextHandle++;
  434|  8.99k|    }
_ZN4Ogre15ResourceManager10checkUsageEv:
  437|  4.92k|    {
  438|  4.92k|        if (getMemoryUsage() > mMemoryBudget)
  ------------------
  |  Branch (438:13): [True: 0, False: 4.92k]
  ------------------
  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.92k|    }
_ZN4Ogre15ResourceManager21_notifyResourceLoadedEPNS_8ResourceE:
  466|  4.92k|    {
  467|  4.92k|        mMemoryUsage += res->getSize();
  468|  4.92k|        checkUsage();
  469|  4.92k|    }
_ZN4Ogre15ResourceManager23_notifyResourceUnloadedEPNS_8ResourceE:
  472|  4.92k|    {
  473|  4.92k|        mMemoryUsage -= res->getSize();
  474|  4.92k|    }

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

_ZN4Ogre10SerializerC2Ev:
   36|  30.4k|        mVersion("[Serializer_v1.00]"), // Version number
   37|  30.4k|        mFlipEndian(false),
   38|  30.4k|        mReportChunkErrors(true)
   39|  30.4k|    {
   40|  30.4k|    }
_ZN4Ogre10SerializerD2Ev:
   44|  30.4k|    {
   45|  30.4k|    }
_ZN4Ogre10Serializer19determineEndiannessERKNS_9SharedPtrINS_10DataStreamEEE:
   48|  10.7k|    {
   49|  10.7k|        if (stream->tell() != 0)
  ------------------
  |  Branch (49:13): [True: 0, False: 10.7k]
  ------------------
   50|      0|        {
   51|      0|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   52|      0|                "Can only determine the endianness of the input stream if it "
   53|      0|                "is at the start", "Serializer::determineEndianness");
   54|      0|        }
   55|       |                
   56|  10.7k|        uint16 dest;
   57|       |        // read header id manually (no conversion)
   58|  10.7k|        size_t actually_read = stream->read(&dest, sizeof(uint16));
   59|       |        // skip back
   60|  10.7k|        stream->skip(0 - (long)actually_read);
   61|  10.7k|        if (actually_read != sizeof(uint16))
  ------------------
  |  Branch (61:13): [True: 4, False: 10.7k]
  ------------------
   62|      4|        {
   63|       |            // end of file?
   64|      4|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   65|      4|                        "Couldn't read 16 bit header value from input stream.",
   66|      4|                        "Serializer::determineEndianness");
   67|      4|        }
   68|  10.7k|        if (dest == HEADER_STREAM_ID)
  ------------------
  |  Branch (68:13): [True: 2.78k, False: 7.99k]
  ------------------
   69|  2.78k|        {
   70|  2.78k|            mFlipEndian = false;
   71|  2.78k|        }
   72|  7.99k|        else if (dest == OTHER_ENDIAN_HEADER_STREAM_ID)
  ------------------
  |  Branch (72:18): [True: 7.95k, False: 44]
  ------------------
   73|  7.95k|        {
   74|  7.95k|            mFlipEndian = true;
   75|  7.95k|        }
   76|     44|        else
   77|     44|        {
   78|       |            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   79|     44|                "Header chunk didn't match either endian: Corrupted stream?",
   80|     44|                "Serializer::determineEndianness");
   81|     44|        }
   82|  10.7k|    }
_ZN4Ogre10Serializer14readFileHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  233|  4.80k|    {
  234|  4.80k|        unsigned short headerID;
  235|       |        
  236|       |        // Read header ID
  237|  4.80k|        readShorts(stream, &headerID, 1);
  238|       |        
  239|  4.80k|        if (headerID == HEADER_STREAM_ID)
  ------------------
  |  Branch (239:13): [True: 4.80k, False: 0]
  ------------------
  240|  4.80k|        {
  241|       |            // Read version
  242|  4.80k|            String ver = readString(stream);
  243|  4.80k|            if (ver != mVersion)
  ------------------
  |  Branch (243:17): [True: 0, False: 4.80k]
  ------------------
  244|      0|            {
  245|      0|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, 
  246|      0|                    "Invalid file: version incompatible, file reports " + String(ver) +
  247|      0|                    " Serializer is version " + mVersion,
  248|      0|                    "Serializer::readFileHeader");
  249|      0|            }
  250|  4.80k|        }
  251|      0|        else
  252|      0|        {
  253|      0|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid file: no header", 
  254|      0|                "Serializer::readFileHeader");
  255|      0|        }
  256|       |
  257|  4.80k|    }
_ZN4Ogre10Serializer9readChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  260|   711k|    {
  261|   711k|        size_t pos = stream->tell();
  262|   711k|        unsigned short id;
  263|   711k|        readShorts(stream, &id, 1);
  264|       |        
  265|   711k|        readInts(stream, &mCurrentstreamLen, 1);
  266|       |
  267|   711k|        if (!stream->eof())
  ------------------
  |  Branch (267:13): [True: 706k, False: 4.47k]
  ------------------
  268|   706k|        {
  269|       |            // chunk size cant be smaller than the header size, and must fit within the stream
  270|   706k|            if (mCurrentstreamLen < calcChunkHeaderSize())
  ------------------
  |  Branch (270:17): [True: 663, False: 706k]
  ------------------
  271|   706k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Corrupt chunk length");
  272|       |
  273|   706k|            if (pos + mCurrentstreamLen > stream->size())
  ------------------
  |  Branch (273:17): [True: 20.2k, False: 685k]
  ------------------
  274|  20.2k|            {
  275|  20.2k|                if (mReportChunkErrors)
  ------------------
  |  Branch (275:21): [True: 750, False: 19.5k]
  ------------------
  276|  20.2k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Corrupt chunk length");
  277|       |
  278|       |                // legacy exporters wrote chunk sizes that do not match the data they wrote.
  279|       |                // all reads are still bounded by the stream, so just clamp the chunk end.
  280|  19.5k|                LogManager::getSingleton().stream(LML_WARNING)
  281|  19.5k|                    << "Chunk " << id << " in '" << stream->getName()
  282|  19.5k|                    << "' extends past the end of the stream, clamping to stream size";
  283|  19.5k|                mCurrentstreamLen = static_cast<uint32>(stream->size() - pos);
  284|  19.5k|            }
  285|   706k|        }
  286|       |
  287|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  288|       |        if (!mChunkSizeStack.empty() && !stream->eof()){
  289|       |            if (pos != static_cast<size_t>(mChunkSizeStack.back()) && mReportChunkErrors){
  290|       |                LogManager::getSingleton().logMessage("Corrupted chunk detected! Stream name: '" + stream->getName() + "' Chunk id: " + StringConverter::toString(id));
  291|       |            }
  292|       |            mChunkSizeStack.back() = pos + mCurrentstreamLen;
  293|       |        }
  294|       |#endif
  295|   709k|        return id;
  296|   711k|    }
_ZN4Ogre10Serializer9readBoolsERKNS_9SharedPtrINS_10DataStreamEEEPbm:
  299|   307k|    {
  300|   307k|        static_assert(sizeof(bool) == 1, "add conversion to char for your platform");
  301|   307k|        stream->read(pDest, sizeof(bool) * count);
  302|       |        // Normalize raw bytes to canonical bool values (0 or 1).
  303|       |        // A non-zero byte that is not exactly 1 can cause miscompile bugs later
  304|   615k|        for (size_t i = 0; i < count; ++i)
  ------------------
  |  Branch (304:28): [True: 307k, False: 307k]
  ------------------
  305|   307k|        {
  306|   307k|            uint8_t raw;
  307|   307k|            memcpy(&raw, &pDest[i], 1);
  308|   307k|            pDest[i] = (raw != 0);
  309|   307k|        }
  310|   307k|    }
_ZN4Ogre10Serializer10readFloatsERKNS_9SharedPtrINS_10DataStreamEEEPfm:
  313|  49.3k|    {
  314|  49.3k|        stream->read(pDest, sizeof(float) * count);
  315|  49.3k|        flipFromLittleEndian(pDest, sizeof(float), count);
  316|  49.3k|    }
_ZN4Ogre10Serializer10readShortsERKNS_9SharedPtrINS_10DataStreamEEEPtm:
  334|  1.01M|    {
  335|  1.01M|        stream->read(pDest, sizeof(unsigned short) * count);
  336|  1.01M|        flipFromLittleEndian(pDest, sizeof(unsigned short), count);
  337|  1.01M|    }
_ZN4Ogre10Serializer8readIntsERKNS_9SharedPtrINS_10DataStreamEEEPjm:
  340|  1.08M|    {
  341|  1.08M|        stream->read(pDest, sizeof(uint32) * count);
  342|  1.08M|        flipFromLittleEndian(pDest, sizeof(uint32), count);
  343|  1.08M|    }
_ZN4Ogre10Serializer10readStringERKNS_9SharedPtrINS_10DataStreamEEE:
  346|   180k|    {
  347|   180k|        return stream->getLine(false);
  348|   180k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_6VectorILi3EfEE:
  367|  1.83k|    {
  368|  1.83k|        readFloats(stream, pDest.ptr(), 3);
  369|  1.83k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_10QuaternionE:
  372|  1.56k|    {
  373|  1.56k|        float tmp[4];
  374|  1.56k|        readFloats(stream, tmp, 4);
  375|  1.56k|        pDest.x = tmp[0];
  376|  1.56k|        pDest.y = tmp[1];
  377|  1.56k|        pDest.z = tmp[2];
  378|  1.56k|        pDest.w = tmp[3];
  379|  1.56k|    }
_ZN4Ogre10Serializer20flipFromLittleEndianEPvmm:
  392|  2.15M|    {
  393|  2.15M|        if(mFlipEndian)
  ------------------
  |  Branch (393:12): [True: 1.89M, False: 253k]
  ------------------
  394|  1.89M|        {
  395|  1.89M|	        Bitwise::bswapChunks(pData, size, count);
  396|  1.89M|        }
  397|  2.15M|    }
_ZN4Ogre10Serializer14pushInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  400|   319k|    {
  401|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  402|       |        mChunkSizeStack.push_back(stream->tell());
  403|       |#endif
  404|   319k|    }
_ZN4Ogre10Serializer20backpedalChunkHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  406|   285k|    {
  407|   285k|        if (!stream->eof()){
  ------------------
  |  Branch (407:13): [True: 285k, False: 0]
  ------------------
  408|   285k|            stream->skip(-(int)calcChunkHeaderSize());
  409|   285k|        }
  410|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  411|       |        mChunkSizeStack.back() = stream->tell();
  412|       |#endif
  413|   285k|    }
_ZN4Ogre10Serializer13popInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  415|   308k|    {
  416|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  417|       |        if (!mChunkSizeStack.empty()){
  418|       |            size_t pos = stream->tell();
  419|       |            if (pos != static_cast<size_t>(mChunkSizeStack.back()) && !stream->eof() && mReportChunkErrors){
  420|       |                LogManager::getSingleton().logMessage("Corrupted chunk detected! Stream name: " + stream->getName());
  421|       |            }
  422|       |
  423|       |            mChunkSizeStack.pop_back();
  424|       |        }
  425|       |#endif
  426|   308k|    }

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

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

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

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

_ZN4Ogre10StringUtil4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbb:
   42|  64.2k|    {
   43|       |        /*
   44|       |        size_t lspaces, rspaces, len = length(), i;
   45|       |
   46|       |        lspaces = rspaces = 0;
   47|       |
   48|       |        if( left )
   49|       |        {
   50|       |            // Find spaces / tabs on the left
   51|       |            for( i = 0;
   52|       |                i < len && ( at(i) == ' ' || at(i) == '\t' || at(i) == '\r');
   53|       |                ++lspaces, ++i );
   54|       |        }
   55|       |        
   56|       |        if( right && lspaces < len )
   57|       |        {
   58|       |            // Find spaces / tabs on the right
   59|       |            for( i = len - 1;
   60|       |                i >= 0 && ( at(i) == ' ' || at(i) == '\t' || at(i) == '\r');
   61|       |                rspaces++, i-- );
   62|       |        }
   63|       |
   64|       |        *this = substr(lspaces, len-lspaces-rspaces);
   65|       |        */
   66|  64.2k|        static const String delims = " \t\r\n";
   67|  64.2k|        if(right)
  ------------------
  |  Branch (67:12): [True: 64.2k, False: 0]
  ------------------
   68|  64.2k|            str.erase(str.find_last_not_of(delims)+1); // trim right
   69|  64.2k|        if(left)
  ------------------
  |  Branch (69:12): [True: 64.2k, False: 0]
  ------------------
   70|  64.2k|            str.erase(0, str.find_first_not_of(delims)); // trim left
   71|  64.2k|    }
_ZN4Ogre10StringUtil6formatEPKcz:
  467|   114k|    {
  468|       |        // try to use a stack buffer and fall back to heap for large strings
  469|   114k|        char sbuf[1024];
  470|   114k|        size_t bsize = sizeof(sbuf);
  471|   114k|        std::vector<char> hbuf;
  472|   114k|        char* pbuf = sbuf;
  473|       |
  474|   114k|        while (true)
  ------------------
  |  Branch (474:16): [True: 114k, Folded]
  ------------------
  475|   114k|        {
  476|   114k|            va_list va;
  477|   114k|            va_start(va, fmt);
  478|   114k|            int len = vsnprintf(pbuf, bsize, fmt, va);
  479|   114k|            va_end(va);
  480|       |
  481|   114k|            OgreAssert(len >= 0, "Check format string for errors");
  ------------------
  |  Branch (481:13): [True: 0, False: 114k]
  ------------------
  482|   114k|            if (size_t(len) >= bsize)
  ------------------
  |  Branch (482:17): [True: 229, False: 114k]
  ------------------
  483|    229|            {
  484|    229|                hbuf.resize(len + 1);
  485|    229|                pbuf = hbuf.data();
  486|    229|                bsize = hbuf.size();
  487|    229|                continue;
  488|    229|            }
  489|   114k|            pbuf[bsize - 1] = 0;
  490|   114k|            return String(pbuf, len);
  491|   114k|        }
  492|   114k|    }

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

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

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

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

