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

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

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

_ZN4Ogre8KeyFrameD2Ev:
   62|  5.62k|        virtual ~KeyFrame() {}
_ZNK4Ogre8KeyFrame7getTimeEv:
   65|  34.2k|        Real getTime(void) const { return mTime; }
_ZN4Ogre19VertexMorphKeyFrameD2Ev:
  158|  2.68k|        ~VertexMorphKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrameD2Ev:
  187|  1.72k|        ~VertexPoseKeyFrame() {}
_ZN4Ogre18VertexPoseKeyFrame7PoseRefC2Etf:
  208|  2.20k|            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|  5.56k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_10DataStreamEEC2INS_16MemoryDataStreamEEEPT_:
   50|  8.11k|        explicit SharedPtr(Y* ptr) : shared_ptr<T>(ptr) {}
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_4MeshEEERKNS0_IT_EE:
   55|  5.56k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}
_ZNK4Ogre9SharedPtrINS_8SkeletonEEptEv:
   63|  1.12k|        T* operator->() const { return shared_ptr<T>::operator->(); }
_ZN4Ogre9SharedPtrINS_8ResourceEEC2INS_8SkeletonEEERKNS0_IT_EE:
   55|  1.12k|        SharedPtr(const SharedPtr<Y>& r) : shared_ptr<T>(r) {}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmhb:
   39|  12.7k|        : HardwareBuffer(usage, useShadowBuffer),
   40|  12.7k|          mIsInstanceData(false),
   41|  12.7k|          mMgr(mgr),
   42|  12.7k|          mNumVertices(numVertices),
   43|  12.7k|          mVertexSize(vertexSize),
   44|  12.7k|          mInstanceDataStepRate(1)
   45|  12.7k|    {
   46|       |        // Calculate the size of the vertices
   47|  12.7k|        mSizeInBytes = mVertexSize * numVertices;
   48|       |
   49|       |        // Create a shadow buffer if required
   50|  12.7k|        if (useShadowBuffer)
  ------------------
  |  Branch (50:13): [True: 0, False: 12.7k]
  ------------------
   51|      0|        {
   52|      0|            mShadowBuffer = std::make_unique<DefaultHardwareBuffer>(mSizeInBytes);
   53|      0|        }
   54|       |
   55|  12.7k|    }
_ZN4Ogre20HardwareVertexBufferC2EPNS_25HardwareBufferManagerBaseEmmPNS_14HardwareBufferE:
   58|  12.7k|        : HardwareVertexBuffer(mgr, vertexSize, numVertices, delegate->getUsage(), false)
   59|  12.7k|    {
   60|  12.7k|        mDelegate.reset(delegate);
   61|  12.7k|    }
_ZN4Ogre20HardwareVertexBufferD2Ev:
   64|  12.7k|    {
   65|  12.7k|        if (mMgr)
  ------------------
  |  Branch (65:13): [True: 12.7k, False: 0]
  ------------------
   66|  12.7k|        {
   67|  12.7k|            mMgr->_notifyVertexBufferDestroyed(this);
   68|  12.7k|        }
   69|  12.7k|    }
_ZN4Ogre13VertexElementC2EtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  104|  30.6k|        : mOffset(offset), mSource(source), mIndex(index), mType(theType), mSemantic(semantic)
  105|  30.6k|    {
  106|  30.6k|    }
_ZNK4Ogre13VertexElement7getSizeEv:
  109|  46.4k|    {
  110|  46.4k|        return getTypeSize(mType);
  111|  46.4k|    }
_ZN4Ogre13VertexElement11getTypeSizeENS_17VertexElementTypeE:
  114|  49.0k|    {
  115|  49.0k|        switch(etype)
  ------------------
  |  Branch (115:16): [True: 48.1k, False: 940]
  ------------------
  116|  49.0k|        {
  117|    587|        case VET_FLOAT1:
  ------------------
  |  Branch (117:9): [True: 587, False: 48.4k]
  ------------------
  118|    587|            return sizeof(float);
  119|  5.51k|        case VET_FLOAT2:
  ------------------
  |  Branch (119:9): [True: 5.51k, False: 43.5k]
  ------------------
  120|  5.51k|            return sizeof(float)*2;
  121|  1.72k|        case VET_FLOAT3:
  ------------------
  |  Branch (121:9): [True: 1.72k, False: 47.3k]
  ------------------
  122|  1.72k|            return sizeof(float)*3;
  123|  1.39k|        case VET_FLOAT4:
  ------------------
  |  Branch (123:9): [True: 1.39k, False: 47.6k]
  ------------------
  124|  1.39k|            return sizeof(float)*4;
  125|     62|        case VET_DOUBLE1:
  ------------------
  |  Branch (125:9): [True: 62, False: 48.9k]
  ------------------
  126|     62|            return sizeof(double);
  127|     86|        case VET_DOUBLE2:
  ------------------
  |  Branch (127:9): [True: 86, False: 48.9k]
  ------------------
  128|     86|            return sizeof(double)*2;
  129|     58|        case VET_DOUBLE3:
  ------------------
  |  Branch (129:9): [True: 58, False: 49.0k]
  ------------------
  130|     58|            return sizeof(double)*3;
  131|    794|        case VET_DOUBLE4:
  ------------------
  |  Branch (131:9): [True: 794, False: 48.2k]
  ------------------
  132|    794|            return sizeof(double)*4;
  133|     96|        case VET_SHORT1:
  ------------------
  |  Branch (133:9): [True: 96, False: 48.9k]
  ------------------
  134|    392|        case VET_USHORT1:
  ------------------
  |  Branch (134:9): [True: 296, False: 48.7k]
  ------------------
  135|    964|        case VET_HALF1:
  ------------------
  |  Branch (135:9): [True: 572, False: 48.4k]
  ------------------
  136|    964|            return sizeof( short );
  137|     49|        case VET_SHORT2:
  ------------------
  |  Branch (137:9): [True: 49, False: 49.0k]
  ------------------
  138|    272|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (138:9): [True: 223, False: 48.8k]
  ------------------
  139|    303|        case VET_USHORT2:
  ------------------
  |  Branch (139:9): [True: 31, False: 49.0k]
  ------------------
  140|    381|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (140:9): [True: 78, False: 48.9k]
  ------------------
  141|    414|        case VET_HALF2:
  ------------------
  |  Branch (141:9): [True: 33, False: 49.0k]
  ------------------
  142|    414|            return sizeof( short ) * 2;
  143|     42|        case VET_SHORT3:
  ------------------
  |  Branch (143:9): [True: 42, False: 49.0k]
  ------------------
  144|    338|        case VET_USHORT3:
  ------------------
  |  Branch (144:9): [True: 296, False: 48.7k]
  ------------------
  145|    440|        case VET_HALF3:
  ------------------
  |  Branch (145:9): [True: 102, False: 48.9k]
  ------------------
  146|    440|            return sizeof( short ) * 3;
  147|    291|        case VET_SHORT4:
  ------------------
  |  Branch (147:9): [True: 291, False: 48.7k]
  ------------------
  148|  1.09k|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (148:9): [True: 799, False: 48.2k]
  ------------------
  149|  1.93k|        case VET_USHORT4:
  ------------------
  |  Branch (149:9): [True: 843, False: 48.2k]
  ------------------
  150|  6.25k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (150:9): [True: 4.32k, False: 44.7k]
  ------------------
  151|  9.44k|        case VET_HALF4:
  ------------------
  |  Branch (151:9): [True: 3.18k, False: 45.8k]
  ------------------
  152|  9.44k|            return sizeof( short ) * 4;
  153|    371|        case VET_INT1:
  ------------------
  |  Branch (153:9): [True: 371, False: 48.6k]
  ------------------
  154|    413|        case VET_UINT1:
  ------------------
  |  Branch (154:9): [True: 42, False: 49.0k]
  ------------------
  155|    413|            return sizeof( int );
  156|    625|        case VET_INT2:
  ------------------
  |  Branch (156:9): [True: 625, False: 48.4k]
  ------------------
  157|  4.43k|        case VET_UINT2:
  ------------------
  |  Branch (157:9): [True: 3.81k, False: 45.2k]
  ------------------
  158|  4.43k|            return sizeof( int ) * 2;
  159|    339|        case VET_INT3:
  ------------------
  |  Branch (159:9): [True: 339, False: 48.7k]
  ------------------
  160|    431|        case VET_UINT3:
  ------------------
  |  Branch (160:9): [True: 92, False: 48.9k]
  ------------------
  161|    431|            return sizeof( int ) * 3;
  162|     24|        case VET_INT4:
  ------------------
  |  Branch (162:9): [True: 24, False: 49.0k]
  ------------------
  163|    291|        case VET_UINT4:
  ------------------
  |  Branch (163:9): [True: 267, False: 48.7k]
  ------------------
  164|    291|            return sizeof( int ) * 4;
  165|  4.71k|        case VET_BYTE4:
  ------------------
  |  Branch (165:9): [True: 4.71k, False: 44.3k]
  ------------------
  166|  5.14k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (166:9): [True: 434, False: 48.6k]
  ------------------
  167|  5.50k|        case VET_UBYTE4:
  ------------------
  |  Branch (167:9): [True: 356, False: 48.7k]
  ------------------
  168|  6.02k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (168:9): [True: 526, False: 48.5k]
  ------------------
  169|  10.6k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (169:9): [True: 4.63k, False: 44.4k]
  ------------------
  170|  10.6k|            return sizeof(char)*4;
  171|  10.4k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (171:9): [True: 10.4k, False: 38.6k]
  ------------------
  172|  10.4k|            return 4;
  173|  49.0k|        }
  174|    940|        return 0;
  175|  49.0k|    }
_ZN4Ogre13VertexElement12getTypeCountENS_17VertexElementTypeE:
  178|  35.4k|    {
  179|  35.4k|        switch (etype)
  ------------------
  |  Branch (179:17): [True: 35.4k, False: 0]
  ------------------
  180|  35.4k|        {
  181|    694|        case VET_FLOAT1:
  ------------------
  |  Branch (181:9): [True: 694, False: 34.7k]
  ------------------
  182|    840|        case VET_SHORT1:
  ------------------
  |  Branch (182:9): [True: 146, False: 35.2k]
  ------------------
  183|  1.12k|        case VET_USHORT1:
  ------------------
  |  Branch (183:9): [True: 282, False: 35.1k]
  ------------------
  184|  1.45k|        case VET_UINT1:
  ------------------
  |  Branch (184:9): [True: 336, False: 35.0k]
  ------------------
  185|  1.58k|        case VET_INT1:
  ------------------
  |  Branch (185:9): [True: 125, False: 35.2k]
  ------------------
  186|  1.82k|        case VET_DOUBLE1:
  ------------------
  |  Branch (186:9): [True: 244, False: 35.1k]
  ------------------
  187|  2.12k|        case VET_HALF1:
  ------------------
  |  Branch (187:9): [True: 297, False: 35.1k]
  ------------------
  188|  2.12k|            return 1;
  189|  1.96k|        case VET_FLOAT2:
  ------------------
  |  Branch (189:9): [True: 1.96k, False: 33.4k]
  ------------------
  190|  2.98k|        case VET_SHORT2:
  ------------------
  |  Branch (190:9): [True: 1.01k, False: 34.3k]
  ------------------
  191|  3.39k|        case VET_SHORT2_NORM:
  ------------------
  |  Branch (191:9): [True: 412, False: 34.9k]
  ------------------
  192|  3.46k|        case VET_USHORT2:
  ------------------
  |  Branch (192:9): [True: 73, False: 35.3k]
  ------------------
  193|  3.57k|        case VET_USHORT2_NORM:
  ------------------
  |  Branch (193:9): [True: 112, False: 35.2k]
  ------------------
  194|  4.35k|        case VET_UINT2:
  ------------------
  |  Branch (194:9): [True: 771, False: 34.6k]
  ------------------
  195|  4.61k|        case VET_INT2:
  ------------------
  |  Branch (195:9): [True: 267, False: 35.1k]
  ------------------
  196|  4.68k|        case VET_DOUBLE2:
  ------------------
  |  Branch (196:9): [True: 63, False: 35.3k]
  ------------------
  197|  5.15k|        case VET_HALF2:
  ------------------
  |  Branch (197:9): [True: 473, False: 34.9k]
  ------------------
  198|  5.15k|            return 2;
  199|  1.65k|        case VET_FLOAT3:
  ------------------
  |  Branch (199:9): [True: 1.65k, False: 33.7k]
  ------------------
  200|  1.87k|        case VET_SHORT3:
  ------------------
  |  Branch (200:9): [True: 219, False: 35.1k]
  ------------------
  201|  2.19k|        case VET_USHORT3:
  ------------------
  |  Branch (201:9): [True: 326, False: 35.0k]
  ------------------
  202|  2.30k|        case VET_UINT3:
  ------------------
  |  Branch (202:9): [True: 104, False: 35.2k]
  ------------------
  203|  2.40k|        case VET_INT3:
  ------------------
  |  Branch (203:9): [True: 105, False: 35.2k]
  ------------------
  204|  2.48k|        case VET_DOUBLE3:
  ------------------
  |  Branch (204:9): [True: 79, False: 35.3k]
  ------------------
  205|  2.62k|        case VET_HALF3:
  ------------------
  |  Branch (205:9): [True: 142, False: 35.2k]
  ------------------
  206|  2.62k|            return 3;
  207|    202|        case VET_FLOAT4:
  ------------------
  |  Branch (207:9): [True: 202, False: 35.1k]
  ------------------
  208|  2.05k|        case VET_SHORT4:
  ------------------
  |  Branch (208:9): [True: 1.85k, False: 33.5k]
  ------------------
  209|  2.44k|        case VET_SHORT4_NORM:
  ------------------
  |  Branch (209:9): [True: 385, False: 35.0k]
  ------------------
  210|  3.03k|        case VET_USHORT4:
  ------------------
  |  Branch (210:9): [True: 597, False: 34.8k]
  ------------------
  211|  4.47k|        case VET_USHORT4_NORM:
  ------------------
  |  Branch (211:9): [True: 1.43k, False: 33.9k]
  ------------------
  212|  4.76k|        case VET_UINT4:
  ------------------
  |  Branch (212:9): [True: 290, False: 35.1k]
  ------------------
  213|  4.91k|        case VET_INT4:
  ------------------
  |  Branch (213:9): [True: 154, False: 35.2k]
  ------------------
  214|  5.21k|        case VET_DOUBLE4:
  ------------------
  |  Branch (214:9): [True: 299, False: 35.1k]
  ------------------
  215|  6.33k|        case VET_BYTE4:
  ------------------
  |  Branch (215:9): [True: 1.12k, False: 34.2k]
  ------------------
  216|  6.77k|        case VET_UBYTE4:
  ------------------
  |  Branch (216:9): [True: 446, False: 34.9k]
  ------------------
  217|  8.54k|        case VET_BYTE4_NORM:
  ------------------
  |  Branch (217:9): [True: 1.76k, False: 33.6k]
  ------------------
  218|  8.91k|        case VET_UBYTE4_NORM:
  ------------------
  |  Branch (218:9): [True: 364, False: 35.0k]
  ------------------
  219|  15.8k|        case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (219:9): [True: 6.97k, False: 28.4k]
  ------------------
  220|  23.5k|        case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (220:9): [True: 7.65k, False: 27.7k]
  ------------------
  221|  25.4k|        case VET_HALF4:
  ------------------
  |  Branch (221:9): [True: 1.96k, False: 33.4k]
  ------------------
  222|  25.4k|            return 4;
  223|  35.4k|        }
  224|  35.4k|        OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid type", 
  225|  35.4k|            "VertexElement::getTypeCount");
  226|  35.4k|    }
_ZN4Ogre13VertexElement11getBaseTypeENS_17VertexElementTypeE:
  296|  37.2k|    {
  297|  37.2k|        switch (multiType)
  ------------------
  |  Branch (297:17): [True: 37.0k, False: 195]
  ------------------
  298|  37.2k|        {
  299|    706|            case VET_FLOAT1:
  ------------------
  |  Branch (299:13): [True: 706, False: 36.5k]
  ------------------
  300|  2.67k|            case VET_FLOAT2:
  ------------------
  |  Branch (300:13): [True: 1.97k, False: 35.2k]
  ------------------
  301|  4.42k|            case VET_FLOAT3:
  ------------------
  |  Branch (301:13): [True: 1.75k, False: 35.4k]
  ------------------
  302|  4.73k|            case VET_FLOAT4:
  ------------------
  |  Branch (302:13): [True: 308, False: 36.8k]
  ------------------
  303|  4.73k|                return VET_FLOAT1;
  304|    298|            case VET_HALF1:
  ------------------
  |  Branch (304:13): [True: 298, False: 36.9k]
  ------------------
  305|    771|            case VET_HALF2:
  ------------------
  |  Branch (305:13): [True: 473, False: 36.7k]
  ------------------
  306|    915|            case VET_HALF3:
  ------------------
  |  Branch (306:13): [True: 144, False: 37.0k]
  ------------------
  307|  2.87k|            case VET_HALF4:
  ------------------
  |  Branch (307:13): [True: 1.96k, False: 35.2k]
  ------------------
  308|  2.87k|                return VET_HALF1;
  309|    247|            case VET_DOUBLE1:
  ------------------
  |  Branch (309:13): [True: 247, False: 36.9k]
  ------------------
  310|    313|            case VET_DOUBLE2:
  ------------------
  |  Branch (310:13): [True: 66, False: 37.1k]
  ------------------
  311|    399|            case VET_DOUBLE3:
  ------------------
  |  Branch (311:13): [True: 86, False: 37.1k]
  ------------------
  312|    703|            case VET_DOUBLE4:
  ------------------
  |  Branch (312:13): [True: 304, False: 36.9k]
  ------------------
  313|    703|                return VET_DOUBLE1;
  314|    128|            case VET_INT1:
  ------------------
  |  Branch (314:13): [True: 128, False: 37.0k]
  ------------------
  315|    396|            case VET_INT2:
  ------------------
  |  Branch (315:13): [True: 268, False: 36.9k]
  ------------------
  316|    501|            case VET_INT3:
  ------------------
  |  Branch (316:13): [True: 105, False: 37.1k]
  ------------------
  317|    656|            case VET_INT4:
  ------------------
  |  Branch (317:13): [True: 155, False: 37.0k]
  ------------------
  318|    656|                return VET_INT1;
  319|    339|            case VET_UINT1:
  ------------------
  |  Branch (319:13): [True: 339, False: 36.8k]
  ------------------
  320|  1.11k|            case VET_UINT2:
  ------------------
  |  Branch (320:13): [True: 774, False: 36.4k]
  ------------------
  321|  1.22k|            case VET_UINT3:
  ------------------
  |  Branch (321:13): [True: 108, False: 37.0k]
  ------------------
  322|  1.51k|            case VET_UINT4:
  ------------------
  |  Branch (322:13): [True: 291, False: 36.9k]
  ------------------
  323|  1.51k|                return VET_UINT1;
  324|    147|            case VET_SHORT1:
  ------------------
  |  Branch (324:13): [True: 147, False: 37.0k]
  ------------------
  325|  1.16k|            case VET_SHORT2:
  ------------------
  |  Branch (325:13): [True: 1.01k, False: 36.1k]
  ------------------
  326|  1.38k|            case VET_SHORT3:
  ------------------
  |  Branch (326:13): [True: 220, False: 36.9k]
  ------------------
  327|  3.24k|            case VET_SHORT4:
  ------------------
  |  Branch (327:13): [True: 1.85k, False: 35.3k]
  ------------------
  328|  3.24k|                return VET_SHORT1;
  329|    286|            case VET_USHORT1:
  ------------------
  |  Branch (329:13): [True: 286, False: 36.9k]
  ------------------
  330|    360|            case VET_USHORT2:
  ------------------
  |  Branch (330:13): [True: 74, False: 37.1k]
  ------------------
  331|    689|            case VET_USHORT3:
  ------------------
  |  Branch (331:13): [True: 329, False: 36.8k]
  ------------------
  332|  1.28k|            case VET_USHORT4:
  ------------------
  |  Branch (332:13): [True: 599, False: 36.6k]
  ------------------
  333|  1.28k|                return VET_USHORT1;
  334|    413|            case VET_SHORT2_NORM:
  ------------------
  |  Branch (334:13): [True: 413, False: 36.7k]
  ------------------
  335|    799|            case VET_SHORT4_NORM:
  ------------------
  |  Branch (335:13): [True: 386, False: 36.8k]
  ------------------
  336|    799|                return VET_SHORT2_NORM;
  337|    113|            case VET_USHORT2_NORM:
  ------------------
  |  Branch (337:13): [True: 113, False: 37.0k]
  ------------------
  338|  1.54k|            case VET_USHORT4_NORM:
  ------------------
  |  Branch (338:13): [True: 1.43k, False: 35.7k]
  ------------------
  339|  1.54k|                return VET_USHORT2_NORM;
  340|  1.12k|            case VET_BYTE4:
  ------------------
  |  Branch (340:13): [True: 1.12k, False: 36.0k]
  ------------------
  341|  1.12k|                return VET_BYTE4;
  342|  1.77k|            case VET_BYTE4_NORM:
  ------------------
  |  Branch (342:13): [True: 1.77k, False: 35.4k]
  ------------------
  343|  1.77k|                return VET_BYTE4_NORM;
  344|    448|            case VET_UBYTE4:
  ------------------
  |  Branch (344:13): [True: 448, False: 36.7k]
  ------------------
  345|    448|                return VET_UBYTE4;
  346|    376|            case VET_UBYTE4_NORM:
  ------------------
  |  Branch (346:13): [True: 376, False: 36.8k]
  ------------------
  347|  7.34k|            case _DETAIL_SWAP_RB:
  ------------------
  |  Branch (347:13): [True: 6.97k, False: 30.2k]
  ------------------
  348|  7.34k|                return VET_UBYTE4_NORM;
  349|  8.96k|            case VET_INT_10_10_10_2_NORM:
  ------------------
  |  Branch (349:13): [True: 8.96k, False: 28.2k]
  ------------------
  350|  8.96k|                return VET_INT_10_10_10_2_NORM;
  351|  37.2k|        };
  352|       |        // To keep compiler happy
  353|    195|        return VET_FLOAT1;
  354|  37.2k|    }
_ZN4Ogre17VertexDeclarationC2Ev:
  357|   143k|    {
  358|   143k|    }
_ZN4Ogre17VertexDeclarationD2Ev:
  361|   143k|    {
  362|   143k|    }
_ZNK4Ogre17VertexDeclaration11getElementsEv:
  365|  2.56k|    {
  366|  2.56k|        return mElementList;
  367|  2.56k|    }
_ZN4Ogre17VertexDeclaration10addElementEtmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  372|  25.3k|    {
  373|  25.3k|        mElementList.push_back(VertexElement(source, offset, theType, semantic, index));
  374|  25.3k|        notifyChanged();
  375|  25.3k|        return mElementList.back();
  376|  25.3k|    }
_ZN4Ogre17VertexDeclaration13modifyElementEttmNS_17VertexElementTypeENS_21VertexElementSemanticEt:
  444|  5.33k|    {
  445|       |        assert(elem_index < mElementList.size() && "Index out of bounds");
  446|  5.33k|        VertexElementList::iterator i = mElementList.begin();
  447|  5.33k|        std::advance(i, elem_index);
  448|  5.33k|        (*i) = VertexElement(source, offset, theType, semantic, index);
  449|  5.33k|        notifyChanged();
  450|  5.33k|    }
_ZNK4Ogre17VertexDeclaration21findElementBySemanticENS_21VertexElementSemanticEt:
  454|  87.5k|    {
  455|  87.5k|        for (auto& e : mElementList)
  ------------------
  |  Branch (455:22): [True: 10.9k, False: 85.9k]
  ------------------
  456|  10.9k|        {
  457|  10.9k|            if (e.getSemantic() == sem && e.getIndex() == index)
  ------------------
  |  Branch (457:17): [True: 2.21k, False: 8.69k]
  |  Branch (457:43): [True: 1.59k, False: 621]
  ------------------
  458|  1.59k|            {
  459|  1.59k|                return &e;
  460|  1.59k|            }
  461|  10.9k|        }
  462|       |
  463|  85.9k|        return NULL;
  464|  87.5k|    }
_ZNK4Ogre17VertexDeclaration20findElementsBySourceEt:
  468|  16.3k|    {
  469|  16.3k|        VertexElementList retList;
  470|  16.3k|        for (auto& e : mElementList)
  ------------------
  |  Branch (470:22): [True: 47.6k, False: 16.3k]
  ------------------
  471|  47.6k|        {
  472|  47.6k|            if (e.getSource() == source)
  ------------------
  |  Branch (472:17): [True: 25.3k, False: 22.2k]
  ------------------
  473|  25.3k|            {
  474|  25.3k|                retList.push_back(e);
  475|  25.3k|            }
  476|  47.6k|        }
  477|  16.3k|        return retList;
  478|  16.3k|    }
_ZNK4Ogre17VertexDeclaration13getVertexSizeEt:
  482|  9.99k|    {
  483|  9.99k|        size_t sz = 0;
  484|  9.99k|        for (auto& e : mElementList)
  ------------------
  |  Branch (484:22): [True: 27.8k, False: 9.99k]
  ------------------
  485|  27.8k|        {
  486|  27.8k|            if (e.getSource() == source)
  ------------------
  |  Branch (486:17): [True: 15.9k, False: 11.8k]
  ------------------
  487|  15.9k|            {
  488|  15.9k|                sz += e.getSize();
  489|       |
  490|  15.9k|            }
  491|  27.8k|        }
  492|  9.99k|        return sz;
  493|  9.99k|    }
_ZN4Ogre19VertexBufferBindingC2Ev:
  676|   143k|    VertexBufferBinding::VertexBufferBinding() : mHighIndex(0)
  677|   143k|    {
  678|   143k|    }
_ZN4Ogre19VertexBufferBindingD2Ev:
  681|   143k|    {
  682|   143k|        unsetAllBindings();
  683|   143k|    }
_ZN4Ogre19VertexBufferBinding10setBindingEtRKNS_9SharedPtrINS_20HardwareVertexBufferEEE:
  686|  9.41k|    {
  687|       |        // NB will replace any existing buffer ptr at this index, and will thus cause
  688|       |        // reference count to decrement on that buffer (possibly destroying it)
  689|  9.41k|        mBindingMap[index] = buffer;
  690|  9.41k|        mHighIndex = std::max(mHighIndex, (unsigned short)(index+1));
  691|  9.41k|    }
_ZN4Ogre19VertexBufferBinding16unsetAllBindingsEv:
  706|   143k|    {
  707|   143k|        mBindingMap.clear();
  708|   143k|        mHighIndex = 0;
  709|   143k|    }
_ZNK4Ogre19VertexBufferBinding11getBindingsEv:
  713|   139k|    {
  714|   139k|        return mBindingMap;
  715|   139k|    }
_ZNK4Ogre19VertexBufferBinding9getBufferEt:
  718|  1.38k|    {
  719|  1.38k|        VertexBufferBindingMap::const_iterator i = mBindingMap.find(index);
  720|  1.38k|        if (i == mBindingMap.end())
  ------------------
  |  Branch (720:13): [True: 47, False: 1.34k]
  ------------------
  721|     47|        {
  722|     47|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "No buffer is bound to that index.",
  723|     47|                "VertexBufferBinding::getBuffer");
  724|     47|        }
  725|  1.34k|        return i->second;
  726|  1.38k|    }
_ZNK4Ogre19VertexBufferBinding13isBufferBoundEt:
  729|  36.1k|    {
  730|  36.1k|        return mBindingMap.find(index) != mBindingMap.end();
  731|  36.1k|    }

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

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

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

_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|   312k|    {
   95|   312k|        OGRE_LOCK_AUTO_MUTEX;
   96|   312k|        if (lml >= mLogLevel)
  ------------------
  |  Branch (96:13): [True: 13.8k, False: 298k]
  ------------------
   97|  13.8k|        {
   98|  13.8k|            bool skipThisMessage = false;
   99|  13.8k|            for(auto & l : mListeners)
  ------------------
  |  Branch (99:26): [True: 0, False: 13.8k]
  ------------------
  100|      0|                l->messageLogged( message, lml, maskDebug, mLogName, skipThisMessage);
  101|       |            
  102|  13.8k|            if (!skipThisMessage)
  ------------------
  |  Branch (102:17): [True: 13.8k, False: 0]
  ------------------
  103|  13.8k|            {
  104|  13.8k|                if (mDebugOut && !maskDebug)
  ------------------
  |  Branch (104:21): [True: 0, False: 13.8k]
  |  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|  13.8k|                if (!mSuppressFile)
  ------------------
  |  Branch (131:21): [True: 0, False: 13.8k]
  ------------------
  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|  13.8k|            }
  145|  13.8k|        }
  146|   312k|    }
_ZN4Ogre3Log14setMinLogLevelENS_15LogMessageLevelE:
  170|      1|    {
  171|      1|        OGRE_LOCK_AUTO_MUTEX;
  172|      1|        mLogLevel = lml;
  173|      1|    }
_ZN4Ogre3Log6streamENS_15LogMessageLevelEb:
  193|   100k|    {
  194|   100k|        return Stream(this, lml, maskDebug);
  195|       |
  196|   100k|    }

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

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

_ZN4Ogre4MeshC2EPNS_15ResourceManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEmSB_bPNS_20ManualResourceLoaderE:
   45|  5.56k|        : Resource(creator, name, handle, group, isManual, loader),
   46|  5.56k|        mBoundRadius(0.0f),
   47|  5.56k|        mBoneBoundingRadius(0.0f),
   48|  5.56k|        mBoneAssignmentsOutOfDate(false),
   49|  5.56k|        mHasManualLodLevel(false),
   50|  5.56k|        mLodStrategy(LodStrategyManager::getSingleton().getDefaultStrategy()),
   51|  5.56k|        mBufferManager(0),
   52|  5.56k|        mVertexBufferUsage(HBU_GPU_ONLY),
   53|  5.56k|        mIndexBufferUsage(HBU_GPU_ONLY),
   54|  5.56k|        mVertexBufferShadowBuffer(false),
   55|  5.56k|        mIndexBufferShadowBuffer(false),
   56|  5.56k|        mPreparedForShadowVolumes(false),
   57|  5.56k|        mEdgeListsBuilt(false),
   58|  5.56k|        mAutoBuildEdgeLists(false), // will be set to true by serializers of 1.20 and below
   59|  5.56k|        mSharedVertexDataAnimationType(VAT_NONE),
   60|  5.56k|        mSharedVertexDataAnimationIncludesNormals(false),
   61|  5.56k|        mAnimationTypesDirty(true),
   62|  5.56k|        mPosesIncludeNormals(false),
   63|  5.56k|        sharedVertexData(0)
   64|  5.56k|    {
   65|       |        // Init first (manual) lod
   66|  5.56k|        MeshLodUsage lod;
   67|  5.56k|        lod.userValue = 0; // User value not used for base LOD level
   68|  5.56k|        lod.value = getLodStrategy()->getBaseValue();
   69|  5.56k|        mMeshLodUsageList.push_back(lod);
   70|  5.56k|    }
_ZN4Ogre4MeshD2Ev:
   73|  5.56k|    {
   74|  5.56k|        if (!HardwareBufferManager::getSingletonPtr()) // LogManager might be also gone already
  ------------------
  |  Branch (74:13): [True: 0, False: 5.56k]
  ------------------
   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|  5.56k|        unload();
   83|  5.56k|    }
_ZN4Ogre4Mesh24getHardwareBufferManagerEv:
   86|   144k|    {
   87|   144k|        return mBufferManager ? mBufferManager : HardwareBufferManager::getSingletonPtr();
  ------------------
  |  Branch (87:16): [True: 0, False: 144k]
  ------------------
   88|   144k|    }
_ZN4Ogre4Mesh13createSubMeshEv:
   91|   212k|    {
   92|   212k|        SubMesh* sub = OGRE_NEW SubMesh();
   93|   212k|        sub->parent = this;
   94|       |
   95|   212k|        mSubMeshList.push_back(sub);
   96|       |
   97|   212k|        if (isLoaded())
  ------------------
  |  Branch (97:13): [True: 212k, False: 0]
  ------------------
   98|   212k|            _dirtyState();
   99|       |
  100|   212k|        return sub;
  101|   212k|    }
_ZN4Ogre4Mesh11nameSubMeshERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEt:
  155|  9.14k|    {
  156|  9.14k|        mSubMeshNameMap[name] = index ;
  157|  9.14k|    }
_ZN4Ogre4Mesh12postLoadImplEv:
  174|  5.56k|    {
  175|       |        // Prepare for shadow volumes?
  176|  5.56k|        if (MeshManager::getSingleton().getPrepareAllMeshesForShadowVolumes())
  ------------------
  |  Branch (176:13): [True: 0, False: 5.56k]
  ------------------
  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|  5.56k|#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|  5.56k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (193:22): [True: 5.56k, False: 5.56k]
  ------------------
  194|  5.56k|            m.value = mLodStrategy->transformUserValue(m.userValue);
  195|       |        // Rewrite first value
  196|  5.56k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
  197|  5.56k|#endif
  198|  5.56k|    }
_ZN4Ogre4Mesh10unloadImplEv:
  241|  5.56k|    {
  242|       |        // Teardown submeshes
  243|  5.56k|        for (auto & i : mSubMeshList)
  ------------------
  |  Branch (243:23): [True: 212k, False: 5.56k]
  ------------------
  244|   212k|        {
  245|   212k|            OGRE_DELETE i;
  246|   212k|        }
  247|  5.56k|        if (sharedVertexData)
  ------------------
  |  Branch (247:13): [True: 1.31k, False: 4.24k]
  ------------------
  248|  1.31k|        {
  249|  1.31k|            resetVertexData();
  250|  1.31k|        }
  251|       |        // Clear SubMesh lists
  252|  5.56k|        mSubMeshList.clear();
  253|  5.56k|        mSubMeshNameMap.clear();
  254|       |
  255|  5.56k|        freeEdgeList();
  256|  5.56k|#if !OGRE_NO_MESHLOD
  257|       |        // Removes all LOD data
  258|  5.56k|        removeLodLevels();
  259|  5.56k|#endif
  260|  5.56k|        mPreparedForShadowVolumes = false;
  261|       |
  262|       |        // remove all poses & animations
  263|  5.56k|        removeAllAnimations();
  264|  5.56k|        removeAllPoses();
  265|       |
  266|       |        // Clear bone assignments
  267|  5.56k|        mBoneAssignments.clear();
  268|  5.56k|        mBoneAssignmentsOutOfDate = false;
  269|       |
  270|       |        // Removes reference to skeleton
  271|  5.56k|        mSkeleton.reset();
  272|  5.56k|    }
_ZN4Ogre4Mesh10_setBoundsERKNS_14AxisAlignedBoxEb:
  388|  2.68k|    {
  389|  2.68k|        mAABB = bounds;
  390|  2.68k|        mBoundRadius = Math::boundingRadiusFromAABB(mAABB);
  391|       |
  392|  2.68k|        if( mAABB.isFinite() )
  ------------------
  |  Branch (392:13): [True: 2.68k, False: 0]
  ------------------
  393|  2.68k|        {
  394|  2.68k|            Vector3 max = mAABB.getMaximum();
  395|  2.68k|            Vector3 min = mAABB.getMinimum();
  396|       |
  397|  2.68k|            if (pad)
  ------------------
  |  Branch (397:17): [True: 0, False: 2.68k]
  ------------------
  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|  2.68k|        }
  406|  2.68k|    }
_ZN4Ogre4Mesh24_setBoundingSphereRadiusEf:
  409|  2.68k|    {
  410|  2.68k|        mBoundRadius = radius;
  411|  2.68k|    }
_ZN4Ogre4Mesh15setSkeletonNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  480|  13.8k|    {
  481|  13.8k|        if (skelName != getSkeletonName())
  ------------------
  |  Branch (481:13): [True: 13.1k, False: 693]
  ------------------
  482|  13.1k|        {
  483|  13.1k|            if (skelName.empty())
  ------------------
  |  Branch (483:17): [True: 0, False: 13.1k]
  ------------------
  484|      0|            {
  485|       |                // No skeleton
  486|      0|                mSkeleton.reset();
  487|      0|            }
  488|  13.1k|            else
  489|  13.1k|            {
  490|       |                // Load skeleton
  491|  13.1k|                try {
  492|  13.1k|                    mSkeleton = static_pointer_cast<Skeleton>(SkeletonManager::getSingleton().load(skelName, mGroup));
  493|  13.1k|                }
  494|  13.1k|                catch (...)
  495|  13.1k|                {
  496|  13.1k|                    mSkeleton.reset();
  497|       |                    // Log this error
  498|  13.1k|                    String msg = "Unable to load skeleton '";
  499|  13.1k|                    msg += skelName + "' for Mesh '" + mName + "'. This Mesh will not be animated.";
  500|  13.1k|                    LogManager::getSingleton().logError(msg);
  501|       |
  502|  13.1k|                }
  503|       |
  504|       |
  505|  13.1k|            }
  506|  13.1k|            if (isLoaded())
  ------------------
  |  Branch (506:17): [True: 13.1k, False: 0]
  ------------------
  507|  13.1k|                _dirtyState();
  508|  13.1k|        }
  509|  13.8k|    }
_ZN4Ogre4Mesh17addBoneAssignmentERKNS_20VertexBoneAssignmentE:
  512|  1.96k|    {
  513|  1.96k|        mBoneAssignments.emplace(vertBoneAssign.vertexIndex, vertBoneAssign);
  514|  1.96k|        mBoneAssignmentsOutOfDate = true;
  515|  1.96k|    }
_ZNK4Ogre4Mesh15getSkeletonNameEv:
 1079|  13.8k|    {
 1080|  13.8k|        return mSkeleton ? mSkeleton->getName() : BLANKSTRING;
  ------------------
  |  Branch (1080:16): [True: 0, False: 13.8k]
  ------------------
 1081|  13.8k|    }
_ZN4Ogre4Mesh11_setLodInfoEt:
 1145|  3.91k|    {
 1146|  3.91k|        assert(!mEdgeListsBuilt && "Can't modify LOD after edge lists built");
 1147|       |
 1148|       |        // Basic prerequisites
 1149|  3.91k|        OgreAssert(numLevels > 0,  "Must be at least one level (full detail level must exist)");
  ------------------
  |  Branch (1149:9): [True: 0, False: 3.91k]
  ------------------
 1150|       |
 1151|  3.91k|        mMeshLodUsageList.resize(numLevels);
 1152|       |        // Resize submesh face data lists too
 1153|  3.91k|        for (auto & i : mSubMeshList)
  ------------------
  |  Branch (1153:23): [True: 2.20k, False: 3.91k]
  ------------------
 1154|  2.20k|        {
 1155|  2.20k|            i->mLodFaceList.resize(numLevels - 1);
 1156|  2.20k|        }
 1157|  3.91k|    }
_ZN4Ogre4Mesh15removeLodLevelsEv:
 1209|  5.56k|    {
 1210|  5.56k|#if !OGRE_NO_MESHLOD
 1211|       |        // Remove data from SubMeshes
 1212|  5.56k|        for (auto *isub : mSubMeshList)
  ------------------
  |  Branch (1212:25): [True: 0, False: 5.56k]
  ------------------
 1213|      0|        {
 1214|      0|            isub->removeLodLevels();
 1215|      0|        }
 1216|       |
 1217|  5.56k|        bool edgeListWasBuilt = isEdgeListBuilt();
 1218|  5.56k|        freeEdgeList();
 1219|       |
 1220|       |        // Reinitialise
 1221|  5.56k|        mMeshLodUsageList.resize(1);
 1222|  5.56k|        mMeshLodUsageList[0].edgeData = NULL;
 1223|       |
 1224|  5.56k|        if(edgeListWasBuilt)
  ------------------
  |  Branch (1224:12): [True: 0, False: 5.56k]
  ------------------
 1225|      0|            buildEdgeList();
 1226|  5.56k|#endif
 1227|  5.56k|    }
_ZN4Ogre4Mesh12freeEdgeListEv:
 1712|  11.1k|    {
 1713|  11.1k|        if (!mEdgeListsBuilt)
  ------------------
  |  Branch (1713:13): [True: 10.5k, False: 574]
  ------------------
 1714|  10.5k|            return;
 1715|    574|#if !OGRE_NO_MESHLOD
 1716|       |        // Loop over LODs
 1717|    574|        unsigned short index = 0;
 1718|    574|        for (auto& usage : mMeshLodUsageList)
  ------------------
  |  Branch (1718:26): [True: 34.7k, False: 574]
  ------------------
 1719|  34.7k|        {
 1720|  34.7k|            if (usage.manualName.empty() || index == 0)
  ------------------
  |  Branch (1720:17): [True: 34.6k, False: 87]
  |  Branch (1720:45): [True: 0, False: 87]
  ------------------
 1721|  34.6k|            {
 1722|       |                // Only delete if we own this data
 1723|       |                // Manual LODs > 0 own their own
 1724|  34.6k|                OGRE_DELETE usage.edgeData;
 1725|  34.6k|            }
 1726|  34.7k|            usage.edgeData = NULL;
 1727|  34.7k|            ++index;
 1728|  34.7k|        }
 1729|       |#else
 1730|       |        OGRE_DELETE mMeshLodUsageList[0].edgeData;
 1731|       |        mMeshLodUsageList[0].edgeData = NULL;
 1732|       |#endif
 1733|    574|        mEdgeListsBuilt = false;
 1734|    574|    }
_ZNK4Ogre4Mesh13calculateSizeEv:
 2018|  5.56k|    {
 2019|       |        // calculate GPU size
 2020|  5.56k|        size_t ret = 0;
 2021|  5.56k|        unsigned short i;
 2022|       |        // Shared vertices
 2023|  5.56k|        if (sharedVertexData)
  ------------------
  |  Branch (2023:13): [True: 0, False: 5.56k]
  ------------------
 2024|      0|        {
 2025|      0|            for (i = 0;
 2026|      0|                i < sharedVertexData->vertexBufferBinding->getBufferCount();
  ------------------
  |  Branch (2026:17): [True: 0, False: 0]
  ------------------
 2027|      0|                ++i)
 2028|      0|            {
 2029|      0|                ret += sharedVertexData->vertexBufferBinding
 2030|      0|                    ->getBuffer(i)->getSizeInBytes();
 2031|      0|            }
 2032|      0|        }
 2033|       |
 2034|  5.56k|        for (auto *s : mSubMeshList)
  ------------------
  |  Branch (2034:22): [True: 0, False: 5.56k]
  ------------------
 2035|      0|        {
 2036|       |            // Dedicated vertices
 2037|      0|            if (!s->useSharedVertices)
  ------------------
  |  Branch (2037:17): [True: 0, False: 0]
  ------------------
 2038|      0|            {
 2039|      0|                for (i = 0;
 2040|      0|                    i < s->vertexData->vertexBufferBinding->getBufferCount();
  ------------------
  |  Branch (2040:21): [True: 0, False: 0]
  ------------------
 2041|      0|                    ++i)
 2042|      0|                {
 2043|      0|                    ret += s->vertexData->vertexBufferBinding
 2044|      0|                        ->getBuffer(i)->getSizeInBytes();
 2045|      0|                }
 2046|      0|            }
 2047|      0|            if (s->indexData->indexBuffer)
  ------------------
  |  Branch (2047:17): [True: 0, False: 0]
  ------------------
 2048|      0|            {
 2049|       |                // Index data
 2050|      0|                ret += s->indexData->indexBuffer->getSizeInBytes();
 2051|      0|            }
 2052|       |
 2053|      0|        }
 2054|  5.56k|        return ret;
 2055|  5.56k|    }
_ZN4Ogre4Mesh15createAnimationERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEf:
 2151|  3.38k|    {
 2152|       |        // Check name not used
 2153|  3.38k|        if (mAnimationsList.find(name) != mAnimationsList.end())
  ------------------
  |  Branch (2153:13): [True: 5, False: 3.37k]
  ------------------
 2154|      5|        {
 2155|      5|            OGRE_EXCEPT(
 2156|      5|                Exception::ERR_DUPLICATE_ITEM,
 2157|      5|                "An animation with the name " + name + " already exists");
 2158|      5|        }
 2159|       |
 2160|  3.37k|        Animation* ret = OGRE_NEW Animation(name, length);
 2161|  3.37k|        ret->_notifyContainer(this);
 2162|       |
 2163|       |        // Add to list
 2164|  3.37k|        mAnimationsList[name] = ret;
 2165|       |
 2166|       |        // Mark animation types dirty
 2167|  3.37k|        mAnimationTypesDirty = true;
 2168|       |
 2169|  3.37k|        return ret;
 2170|       |
 2171|  3.38k|    }
_ZN4Ogre4Mesh19removeAllAnimationsEv:
 2239|  5.56k|    {
 2240|  5.56k|        for (auto& a : mAnimationsList)
  ------------------
  |  Branch (2240:22): [True: 3.37k, False: 5.56k]
  ------------------
 2241|  3.37k|        {
 2242|       |            OGRE_DELETE a.second;
 2243|  3.37k|        }
 2244|  5.56k|        mAnimationsList.clear();
 2245|  5.56k|        mAnimationTypesDirty = true;
 2246|  5.56k|    }
_ZN4Ogre4Mesh26getVertexDataByTrackHandleEt:
 2249|  3.49k|    {
 2250|  3.49k|        if (handle == 0)
  ------------------
  |  Branch (2250:13): [True: 1.13k, False: 2.36k]
  ------------------
 2251|  1.13k|        {
 2252|  1.13k|            return sharedVertexData;
 2253|  1.13k|        }
 2254|  2.36k|        else
 2255|  2.36k|        {
 2256|  2.36k|            return getSubMesh(handle-1)->vertexData;
 2257|  2.36k|        }
 2258|  3.49k|    }
_ZN4Ogre4Mesh10createPoseEtRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2261|  19.3k|    {
 2262|       |        Pose* retPose = OGRE_NEW Pose(target, name);
 2263|  19.3k|        mPoseList.push_back(retPose);
 2264|  19.3k|        return retPose;
 2265|  19.3k|    }
_ZN4Ogre4Mesh14removeAllPosesEv:
 2326|  5.56k|    {
 2327|  5.56k|        for (auto & i : mPoseList)
  ------------------
  |  Branch (2327:23): [True: 19.3k, False: 5.56k]
  ------------------
 2328|  19.3k|        {
 2329|       |            OGRE_DELETE i;
 2330|  19.3k|        }
 2331|  5.56k|        mPoseList.clear();
 2332|  5.56k|    }
_ZNK4Ogre4Mesh14getLodStrategyEv:
 2350|  5.56k|    {
 2351|  5.56k|        return mLodStrategy;
 2352|  5.56k|    }
_ZN4Ogre4Mesh14setLodStrategyEPNS_11LodStrategyE:
 2356|  4.70k|    {
 2357|  4.70k|        mLodStrategy = lodStrategy;
 2358|       |
 2359|  4.70k|        assert(mMeshLodUsageList.size());
 2360|       |
 2361|       |        // Re-transform user LOD values (starting at index 1, no need to transform base value)
 2362|  4.70k|        for (auto& m : mMeshLodUsageList)
  ------------------
  |  Branch (2362:22): [True: 4.74k, False: 4.70k]
  ------------------
 2363|  4.74k|            m.value = mLodStrategy->transformUserValue(m.userValue);
 2364|       |
 2365|       |        // Rewrite first value
 2366|  4.70k|        mMeshLodUsageList[0].value = mLodStrategy->getBaseValue();
 2367|  4.70k|    }
_ZN4Ogre4Mesh21_convertVertexElementENS_21VertexElementSemanticENS_17VertexElementTypeE:
 2371|  7.30k|    {
 2372|  7.30k|        if (sharedVertexData)
  ------------------
  |  Branch (2372:13): [True: 1.89k, False: 5.40k]
  ------------------
 2373|  1.89k|            sharedVertexData->convertVertexElement(semantic, dstType);
 2374|       |
 2375|  7.30k|        for (auto s : getSubMeshes())
  ------------------
  |  Branch (2375:21): [True: 92.0k, False: 7.30k]
  ------------------
 2376|  92.0k|            if (s->vertexData)
  ------------------
  |  Branch (2376:17): [True: 85.6k, False: 6.41k]
  ------------------
 2377|  85.6k|                s->vertexData->convertVertexElement(semantic, dstType);
 2378|  7.30k|    }

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

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

_ZN4Ogre18MeshSerializerImplC2Ev:
  138|  11.1k|    {
  139|       |        // Version number
  140|  11.1k|        mVersion = "[MeshSerializer_v1.100]";
  141|  11.1k|        exportedLodCount = 0;
  142|  11.1k|    }
_ZN4Ogre18MeshSerializerImplD2Ev:
  145|  11.1k|    {
  146|  11.1k|    }
_ZN4Ogre18MeshSerializerImpl10importMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  185|  5.44k|    {
  186|       |        // Determine endianness (must be the first thing we do!)
  187|  5.44k|        determineEndianness(stream);
  188|       |
  189|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  190|       |        enableValidation();
  191|       |#endif
  192|       |        // Check header
  193|  5.44k|        readFileHeader(stream);
  194|  5.44k|        pushInnerChunk(stream);
  195|  5.44k|        unsigned short streamID = readChunk(stream);
  196|       |
  197|  46.9k|        while(!stream->eof())
  ------------------
  |  Branch (197:15): [True: 43.0k, False: 3.81k]
  ------------------
  198|  43.0k|        {
  199|  43.0k|            switch (streamID)
  ------------------
  |  Branch (199:21): [True: 18.2k, False: 24.8k]
  ------------------
  200|  43.0k|            {
  201|  18.2k|            case M_MESH:
  ------------------
  |  Branch (201:13): [True: 18.2k, False: 24.8k]
  ------------------
  202|  18.2k|                readMesh(stream, pMesh, listener);
  203|  18.2k|                break;
  204|  43.0k|            }
  205|       |
  206|  41.4k|            streamID = readChunk(stream);
  207|  41.4k|        }
  208|  3.81k|        popInnerChunk(stream);
  209|  3.81k|    }
_ZN4Ogre18MeshSerializerImpl12readGeometryERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  681|   143k|    {
  682|       |
  683|   143k|        dest->vertexStart = 0;
  684|       |
  685|   143k|        unsigned int vertexCount = 0;
  686|   143k|        readInts(stream, &vertexCount, 1);
  687|   143k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vertexCount, 1))
  ------------------
  |  Branch (687:13): [True: 1.62k, False: 142k]
  ------------------
  688|   143k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex count exceeds remaining chunk data");
  689|   142k|        dest->vertexCount = vertexCount;
  690|       |        // Find optional geometry streams
  691|   142k|        if (!stream->eof())
  ------------------
  |  Branch (691:13): [True: 142k, False: 64]
  ------------------
  692|   142k|        {
  693|   142k|            pushInnerChunk(stream);
  694|   142k|            unsigned short streamID = readChunk(stream);
  695|   164k|            while(!stream->eof() &&
  ------------------
  |  Branch (695:19): [True: 163k, False: 791]
  ------------------
  696|   163k|                (streamID == M_GEOMETRY_VERTEX_DECLARATION ||
  ------------------
  |  Branch (696:18): [True: 14.2k, False: 149k]
  ------------------
  697|   149k|                 streamID == M_GEOMETRY_VERTEX_BUFFER ))
  ------------------
  |  Branch (697:18): [True: 10.5k, False: 138k]
  ------------------
  698|  24.8k|            {
  699|  24.8k|                switch (streamID)
  ------------------
  |  Branch (699:25): [True: 24.8k, False: 0]
  ------------------
  700|  24.8k|                {
  701|  14.2k|                case M_GEOMETRY_VERTEX_DECLARATION:
  ------------------
  |  Branch (701:17): [True: 14.2k, False: 10.5k]
  ------------------
  702|  14.2k|                    readGeometryVertexDeclaration(stream, pMesh, dest);
  703|  14.2k|                    break;
  704|  10.5k|                case M_GEOMETRY_VERTEX_BUFFER:
  ------------------
  |  Branch (704:17): [True: 10.5k, False: 14.2k]
  ------------------
  705|  10.5k|                    readGeometryVertexBuffer(stream, pMesh, dest);
  706|  10.5k|                    break;
  707|  24.8k|                }
  708|       |                // Get next stream
  709|  22.0k|                if (!stream->eof())
  ------------------
  |  Branch (709:21): [True: 21.6k, False: 427]
  ------------------
  710|  21.6k|                {
  711|  21.6k|                    streamID = readChunk(stream);
  712|  21.6k|                }
  713|  22.0k|            }
  714|   139k|            if (!stream->eof())
  ------------------
  |  Branch (714:17): [True: 138k, False: 791]
  ------------------
  715|   138k|            {
  716|       |                // Backpedal back to start of non-submesh stream
  717|   138k|                backpedalChunkHeader(stream);
  718|   138k|            }
  719|   139k|            popInnerChunk(stream);
  720|   139k|        }
  721|       |
  722|       |        // Perform any necessary colour conversions from ARGB to ABGR (UBYTE4)
  723|   139k|        dest->convertPackedColour(_DETAIL_SWAP_RB, VET_UBYTE4_NORM);
  724|       |
  725|   139k|        auto rs = Root::getSingletonPtr() ? Root::getSingleton().getRenderSystem() : NULL;
  ------------------
  |  Branch (725:19): [True: 0, False: 139k]
  ------------------
  726|   139k|        if(!rs || rs->getCapabilities()->hasCapability(RSC_VERTEX_FORMAT_16X3))
  ------------------
  |  Branch (726:12): [True: 139k, False: 0]
  |  Branch (726:19): [True: 0, False: 0]
  ------------------
  727|   139k|            return;
  728|       |
  729|    327|        for(auto& elem : dest->vertexDeclaration->getElements())
  ------------------
  |  Branch (729:24): [True: 0, False: 327]
  ------------------
  730|      0|        {
  731|      0|            if (elem.getType() == VET_HALF3 || elem.getType() == VET_SHORT3 || elem.getType() == VET_USHORT3)
  ------------------
  |  Branch (731:17): [True: 0, False: 0]
  |  Branch (731:48): [True: 0, False: 0]
  |  Branch (731:80): [True: 0, False: 0]
  ------------------
  732|      0|            {
  733|      0|                auto dstType = VertexElement::multiplyTypeCount(VertexElement::getBaseType(elem.getType()), 4);
  734|      0|                dest->convertVertexElement(elem.getSemantic(), dstType, elem.getIndex());
  735|      0|            }
  736|      0|        }
  737|    327|    }
_ZN4Ogre18MeshSerializerImpl29readGeometryVertexDeclarationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  741|  14.2k|    {
  742|       |        // Find optional geometry streams
  743|  14.2k|        if (!stream->eof())
  ------------------
  |  Branch (743:13): [True: 14.2k, False: 0]
  ------------------
  744|  14.2k|        {
  745|  14.2k|            pushInnerChunk(stream);
  746|  14.2k|            unsigned short streamID = readChunk(stream);
  747|  39.5k|            while(!stream->eof() &&
  ------------------
  |  Branch (747:19): [True: 39.3k, False: 270]
  ------------------
  748|  39.3k|                (streamID == M_GEOMETRY_VERTEX_ELEMENT ))
  ------------------
  |  Branch (748:17): [True: 25.5k, False: 13.7k]
  ------------------
  749|  25.5k|            {
  750|  25.5k|                switch (streamID)
  ------------------
  |  Branch (750:25): [True: 25.5k, False: 0]
  ------------------
  751|  25.5k|                {
  752|  25.5k|                case M_GEOMETRY_VERTEX_ELEMENT:
  ------------------
  |  Branch (752:17): [True: 25.5k, False: 0]
  ------------------
  753|  25.5k|                    readGeometryVertexElement(stream, pMesh, dest);
  754|  25.5k|                    break;
  755|  25.5k|                }
  756|       |                // Get next stream
  757|  25.3k|                if (!stream->eof())
  ------------------
  |  Branch (757:21): [True: 25.2k, False: 106]
  ------------------
  758|  25.2k|                {
  759|  25.2k|                    streamID = readChunk(stream);
  760|  25.2k|                }
  761|  25.3k|            }
  762|  14.0k|            if (!stream->eof())
  ------------------
  |  Branch (762:17): [True: 13.7k, False: 270]
  ------------------
  763|  13.7k|            {
  764|       |                // Backpedal back to start of non-submesh stream
  765|  13.7k|                backpedalChunkHeader(stream);
  766|  13.7k|            }
  767|  14.0k|            popInnerChunk(stream);
  768|  14.0k|        }
  769|       |
  770|  14.2k|    }
_ZN4Ogre18MeshSerializerImpl25readGeometryVertexElementERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  774|  25.5k|    {
  775|  25.5k|        unsigned short source, offset, index, tmp;
  776|  25.5k|        VertexElementType vType;
  777|  25.5k|        VertexElementSemantic vSemantic;
  778|       |        // unsigned short source;   // buffer bind source
  779|  25.5k|        readShorts(stream, &source, 1);
  780|       |        // unsigned short type;     // VertexElementType
  781|  25.5k|        readShorts(stream, &tmp, 1);
  782|  25.5k|        if(tmp == 4 || tmp == 11)
  ------------------
  |  Branch (782:12): [True: 347, False: 25.1k]
  |  Branch (782:24): [True: 1.32k, False: 23.8k]
  ------------------
  783|  1.67k|            vType = VET_UBYTE4_NORM;
  784|  23.8k|        else
  785|  23.8k|            vType = static_cast<VertexElementType>(tmp);
  786|       |        // unsigned short semantic; // VertexElementSemantic
  787|  25.5k|        readShorts(stream, &tmp, 1);
  788|  25.5k|        vSemantic = static_cast<VertexElementSemantic>(tmp);
  789|       |        // unsigned short offset;   // start offset in buffer in bytes
  790|  25.5k|        readShorts(stream, &offset, 1);
  791|       |        // unsigned short index;    // index of the semantic
  792|  25.5k|        readShorts(stream, &index, 1);
  793|       |
  794|  25.5k|        if (dest->vertexBufferBinding->isBufferBound(source))
  ------------------
  |  Branch (794:13): [True: 200, False: 25.3k]
  ------------------
  795|  25.5k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "Cannot add vertex element after reading buffer");
  796|       |
  797|  25.3k|        dest->vertexDeclaration->addElement(source, offset, vType, vSemantic, index);
  798|       |
  799|  25.3k|        if (vType == _DETAIL_SWAP_RB)
  ------------------
  |  Branch (799:13): [True: 4.00k, False: 21.3k]
  ------------------
  800|  4.00k|        {
  801|  4.00k|            LogManager::getSingleton().stream(LML_WARNING)
  802|  4.00k|                << "Warning: VET_COLOUR_ARGB element type is deprecated and incurs conversion on load. "
  803|  4.00k|                << "Use OgreMeshUpgrader on '" << pMesh->getName() << "' as soon as possible.";
  804|  4.00k|        }
  805|       |
  806|  25.3k|    }
_ZN4Ogre18MeshSerializerImpl24readGeometryVertexBufferERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_10VertexDataE:
  810|  10.5k|    {
  811|  10.5k|        unsigned short bindIndex, vertexSize;
  812|       |        // unsigned short bindIndex;    // Index to bind this buffer to
  813|  10.5k|        readShorts(stream, &bindIndex, 1);
  814|       |        // unsigned short vertexSize;   // Per-vertex size, must agree with declaration at this index
  815|  10.5k|        readShorts(stream, &vertexSize, 1);
  816|  10.5k|        if (dest->vertexBufferBinding->isBufferBound(bindIndex))
  ------------------
  |  Branch (816:13): [True: 196, False: 10.3k]
  ------------------
  817|  10.5k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate vertex buffer binding");
  818|  10.3k|        pushInnerChunk(stream);
  819|  10.3k|        {
  820|       |        // Check for vertex data header
  821|  10.3k|        unsigned short headerID;
  822|  10.3k|        headerID = readChunk(stream);
  823|  10.3k|        if (headerID != M_GEOMETRY_VERTEX_BUFFER_DATA)
  ------------------
  |  Branch (823:13): [True: 389, False: 9.99k]
  ------------------
  824|    389|        {
  825|    389|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Can't find vertex buffer data area",
  826|    389|                "MeshSerializerImpl::readGeometryVertexBuffer");
  827|    389|        }
  828|  9.99k|        size_t declaredVertexSize = dest->vertexDeclaration->getVertexSize(bindIndex);
  829|  9.99k|        if (declaredVertexSize == 0)
  ------------------
  |  Branch (829:13): [True: 474, False: 9.52k]
  ------------------
  830|    474|        {
  831|    474|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Missing vertex declaration for buffer bind index");
  832|    474|        }
  833|       |        // Check that vertex size agrees
  834|  9.52k|        if (declaredVertexSize != vertexSize)
  ------------------
  |  Branch (834:13): [True: 407, False: 9.11k]
  ------------------
  835|    407|        {
  836|    407|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer vertex size does not agree with vertex declaration");
  837|    407|        }
  838|       |
  839|       |        // Create / populate vertex buffer
  840|  9.11k|        size_t vbufBytes = dest->vertexCount * (size_t)vertexSize;
  841|  9.11k|        if (!checkChunkRemainingSize(mCurrentstreamLen, vbufBytes, 1))
  ------------------
  |  Branch (841:13): [True: 396, False: 8.72k]
  ------------------
  842|  9.11k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Vertex buffer size exceeds remaining chunk data");
  843|  8.72k|        HardwareVertexBufferSharedPtr vbuf;
  844|  8.72k|        vbuf = pMesh->getHardwareBufferManager()->createVertexBuffer(
  845|  8.72k|            vertexSize,
  846|  8.72k|            dest->vertexCount,
  847|  8.72k|            pMesh->mVertexBufferUsage,
  848|  8.72k|            pMesh->mVertexBufferShadowBuffer);
  849|  8.72k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
  850|  8.72k|        stream->read(vbufLock.pData, vbufBytes);
  851|       |
  852|  8.72k|        auto elems = dest->vertexDeclaration->findElementsBySource(bindIndex);
  853|       |        // validate vertex element declarations
  854|  8.72k|        for (auto& elem : elems)
  ------------------
  |  Branch (854:25): [True: 13.4k, False: 8.11k]
  ------------------
  855|  13.4k|        {
  856|  13.4k|            if (elem.getSize() == 0)
  ------------------
  |  Branch (856:17): [True: 337, False: 13.0k]
  ------------------
  857|  13.4k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid vertex element type");
  858|  13.0k|            if (elem.getOffset() + elem.getSize() > vertexSize)
  ------------------
  |  Branch (858:17): [True: 267, False: 12.8k]
  ------------------
  859|  13.0k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  860|  13.0k|                                "Vertex element offset + size exceeds vertex buffer stride");
  861|  13.0k|        }
  862|       |
  863|       |        // endian conversion for OSX
  864|  8.11k|        flipFromLittleEndian(vbufLock.pData, dest->vertexCount, vertexSize, elems);
  865|       |
  866|       |        // Set binding
  867|  8.11k|        dest->vertexBufferBinding->setBinding(bindIndex, vbuf);
  868|  8.11k|        }
  869|      0|        popInnerChunk(stream);
  870|       |
  871|  8.11k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshNameTableERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
  874|  3.32k|    {
  875|       |        // The map for
  876|  3.32k|        std::map<unsigned short, String> subMeshNames;
  877|  3.32k|        unsigned short streamID, subMeshIndex;
  878|       |
  879|       |        // Need something to store the index, and the objects name
  880|       |        // This table is a method that imported meshes can retain their naming
  881|       |        // so that the names established in the modelling software can be used
  882|       |        // to get the sub-meshes by name. The exporter must support exporting
  883|       |        // the optional stream M_SUBMESH_NAME_TABLE.
  884|       |
  885|       |        // Read in all the sub-streams. Each sub-stream should contain an index and Ogre::String for the name.
  886|  3.32k|        if (!stream->eof())
  ------------------
  |  Branch (886:13): [True: 3.32k, False: 0]
  ------------------
  887|  3.32k|        {
  888|  3.32k|            pushInnerChunk(stream);
  889|  3.32k|            streamID = readChunk(stream);
  890|  13.5k|            while(!stream->eof() && (streamID == M_SUBMESH_NAME_TABLE_ELEMENT ))
  ------------------
  |  Branch (890:19): [True: 13.0k, False: 465]
  |  Branch (890:37): [True: 10.1k, False: 2.86k]
  ------------------
  891|  10.1k|            {
  892|       |                // Read in the index of the submesh.
  893|  10.1k|                readShorts(stream, &subMeshIndex, 1);
  894|       |                // Read in the String and map it to its index.
  895|  10.1k|                subMeshNames[subMeshIndex] = readString(stream);
  896|       |
  897|       |                // If we're not end of file get the next stream ID
  898|  10.1k|                if (!stream->eof())
  ------------------
  |  Branch (898:21): [True: 9.80k, False: 374]
  ------------------
  899|  9.80k|                    streamID = readChunk(stream);
  900|  10.1k|            }
  901|  3.32k|            if (!stream->eof())
  ------------------
  |  Branch (901:17): [True: 2.86k, False: 465]
  ------------------
  902|  2.86k|            {
  903|       |                // Backpedal back to start of stream
  904|  2.86k|                backpedalChunkHeader(stream);
  905|  2.86k|            }
  906|  3.32k|            popInnerChunk(stream);
  907|  3.32k|        }
  908|       |
  909|       |        // Set all the submeshes names
  910|       |        // ?
  911|       |        // Loop through and save out the index and names.
  912|  3.32k|        for (auto& sn : subMeshNames)
  ------------------
  |  Branch (912:23): [True: 9.14k, False: 3.32k]
  ------------------
  913|  9.14k|        {
  914|       |            // Name this submesh to the stored name.
  915|  9.14k|            pMesh->nameSubMesh(sn.second, sn.first);
  916|  9.14k|        }
  917|  3.32k|    }
_ZN4Ogre18MeshSerializerImpl8readMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
  920|  18.2k|    {
  921|       |        // Never automatically build edge lists for this version
  922|       |        // expect them in the file or not at all
  923|  18.2k|        pMesh->mAutoBuildEdgeLists = false;
  924|       |
  925|       |        // bool skeletallyAnimated
  926|  18.2k|        bool skeletallyAnimated;
  927|  18.2k|        readBools(stream, &skeletallyAnimated, 1);
  928|       |
  929|       |        // Find all substreams
  930|  18.2k|        if (!stream->eof())
  ------------------
  |  Branch (930:13): [True: 18.2k, False: 21]
  ------------------
  931|  18.2k|        {
  932|  18.2k|            pushInnerChunk(stream);
  933|  18.2k|            unsigned short streamID = readChunk(stream);
  934|   294k|            while(!stream->eof() &&
  ------------------
  |  Branch (934:19): [True: 291k, False: 3.27k]
  ------------------
  935|   291k|                (streamID == M_GEOMETRY ||
  ------------------
  |  Branch (935:18): [True: 23.2k, False: 267k]
  ------------------
  936|   267k|                 streamID == M_SUBMESH ||
  ------------------
  |  Branch (936:18): [True: 212k, False: 55.1k]
  ------------------
  937|  55.1k|                 streamID == M_MESH_SKELETON_LINK ||
  ------------------
  |  Branch (937:18): [True: 13.8k, False: 41.2k]
  ------------------
  938|  41.2k|                 streamID == M_MESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (938:18): [True: 1.96k, False: 39.3k]
  ------------------
  939|  39.3k|                 streamID == M_MESH_LOD_LEVEL ||
  ------------------
  |  Branch (939:18): [True: 7.93k, False: 31.3k]
  ------------------
  940|  31.3k|                 streamID == M_MESH_BOUNDS ||
  ------------------
  |  Branch (940:18): [True: 2.68k, False: 28.7k]
  ------------------
  941|  28.7k|                 streamID == M_SUBMESH_NAME_TABLE ||
  ------------------
  |  Branch (941:18): [True: 3.32k, False: 25.3k]
  ------------------
  942|  25.3k|                 streamID == M_EDGE_LISTS ||
  ------------------
  |  Branch (942:18): [True: 1.42k, False: 23.9k]
  ------------------
  943|  23.9k|                 streamID == M_POSES ||
  ------------------
  |  Branch (943:18): [True: 6.67k, False: 17.2k]
  ------------------
  944|  17.2k|                 streamID == M_ANIMATIONS ||
  ------------------
  |  Branch (944:18): [True: 2.14k, False: 15.1k]
  ------------------
  945|  15.1k|                 streamID == M_TABLE_EXTREMES))
  ------------------
  |  Branch (945:18): [True: 1.61k, False: 13.5k]
  ------------------
  946|   277k|            {
  947|   277k|                switch(streamID)
  ------------------
  |  Branch (947:24): [True: 277k, False: 0]
  ------------------
  948|   277k|                {
  949|  23.2k|                case M_GEOMETRY:
  ------------------
  |  Branch (949:17): [True: 23.2k, False: 254k]
  ------------------
  950|  23.2k|                    pMesh->createVertexData();
  951|  23.2k|                    try {
  952|  23.2k|                        readGeometry(stream, pMesh, pMesh->sharedVertexData);
  953|  23.2k|                    }
  954|  23.2k|                    catch (Exception&)
  955|  23.2k|                    {
  956|       |                        // duff geometry data entry with 0 vertices
  957|  4.68k|                        pMesh->resetVertexData();
  958|       |                        // Skip this stream (pointer will have been returned to just after header)
  959|  4.68k|                        stream->skip(mCurrentstreamLen - MSTREAM_OVERHEAD_SIZE);
  960|  4.68k|                    }
  961|  23.2k|                    break;
  962|   212k|                case M_SUBMESH:
  ------------------
  |  Branch (962:17): [True: 212k, False: 64.8k]
  ------------------
  963|   212k|                    readSubMesh(stream, pMesh, listener);
  964|   212k|                    break;
  965|  13.8k|                case M_MESH_SKELETON_LINK:
  ------------------
  |  Branch (965:17): [True: 13.8k, False: 263k]
  ------------------
  966|  13.8k|                    readSkeletonLink(stream, pMesh, listener);
  967|  13.8k|                    break;
  968|  1.96k|                case M_MESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (968:17): [True: 1.96k, False: 275k]
  ------------------
  969|  1.96k|                    readMeshBoneAssignment(stream, pMesh);
  970|  1.96k|                    break;
  971|  7.93k|                case M_MESH_LOD_LEVEL:
  ------------------
  |  Branch (971:17): [True: 7.93k, False: 269k]
  ------------------
  972|  7.93k|                    readMeshLodLevel(stream, pMesh);
  973|  7.93k|                    break;
  974|  2.68k|                case M_MESH_BOUNDS:
  ------------------
  |  Branch (974:17): [True: 2.68k, False: 274k]
  ------------------
  975|  2.68k|                    readBoundsInfo(stream, pMesh);
  976|  2.68k|                    break;
  977|  3.32k|                case M_SUBMESH_NAME_TABLE:
  ------------------
  |  Branch (977:17): [True: 3.32k, False: 274k]
  ------------------
  978|  3.32k|                    readSubMeshNameTable(stream, pMesh);
  979|  3.32k|                    break;
  980|  1.42k|                case M_EDGE_LISTS:
  ------------------
  |  Branch (980:17): [True: 1.42k, False: 276k]
  ------------------
  981|  1.42k|                    readEdgeList(stream, pMesh);
  982|  1.42k|                    break;
  983|  6.67k|                case M_POSES:
  ------------------
  |  Branch (983:17): [True: 6.67k, False: 270k]
  ------------------
  984|  6.67k|                    readPoses(stream, pMesh);
  985|  6.67k|                    break;
  986|  2.14k|                case M_ANIMATIONS:
  ------------------
  |  Branch (986:17): [True: 2.14k, False: 275k]
  ------------------
  987|  2.14k|                    readAnimations(stream, pMesh);
  988|  2.14k|                    break;
  989|  1.61k|                case M_TABLE_EXTREMES:
  ------------------
  |  Branch (989:17): [True: 1.61k, False: 275k]
  ------------------
  990|  1.61k|                    readExtremes(stream, pMesh);
  991|  1.61k|                    break;
  992|   277k|                }
  993|       |
  994|   276k|                if (!stream->eof())
  ------------------
  |  Branch (994:21): [True: 273k, False: 2.96k]
  ------------------
  995|   273k|                {
  996|   273k|                    streamID = readChunk(stream);
  997|   273k|                }
  998|       |
  999|   276k|            }
 1000|  16.7k|            if (!stream->eof())
  ------------------
  |  Branch (1000:17): [True: 13.5k, False: 3.27k]
  ------------------
 1001|  13.5k|            {
 1002|       |                // Backpedal back to start of stream
 1003|  13.5k|                backpedalChunkHeader(stream);
 1004|  13.5k|            }
 1005|  16.7k|            popInnerChunk(stream);
 1006|  16.7k|        }
 1007|       |
 1008|  18.2k|    }
_ZN4Ogre18MeshSerializerImpl11readSubMeshERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 1011|   212k|    {
 1012|   212k|        unsigned short streamID;
 1013|       |
 1014|   212k|        SubMesh* sm = pMesh->createSubMesh();
 1015|       |
 1016|       |        // char* materialName
 1017|   212k|        String materialName = readString(stream);
 1018|   212k|        if(listener)
  ------------------
  |  Branch (1018:12): [True: 0, False: 212k]
  ------------------
 1019|      0|            listener->processMaterialName(pMesh, &materialName);
 1020|   212k|        if (auto material = MaterialManager::getSingleton().getByName(materialName, pMesh->getGroup()))
  ------------------
  |  Branch (1020:18): [True: 0, False: 212k]
  ------------------
 1021|      0|        {
 1022|      0|            sm->setMaterial(material);
 1023|      0|        }
 1024|   212k|        else
 1025|   212k|        {
 1026|   212k|            logMaterialNotFound(materialName, pMesh->getGroup(), "SubMesh of", pMesh->getName(), LML_WARNING);
 1027|   212k|        }
 1028|       |
 1029|       |        // bool useSharedVertices
 1030|   212k|        readBools(stream,&sm->useSharedVertices, 1);
 1031|       |
 1032|   212k|        sm->indexData->indexStart = 0;
 1033|   212k|        unsigned int indexCount = 0;
 1034|   212k|        readInts(stream, &indexCount, 1);
 1035|   212k|        sm->indexData->indexCount = indexCount;
 1036|       |
 1037|   212k|        HardwareIndexBufferSharedPtr ibuf;
 1038|       |        // bool indexes32Bit
 1039|   212k|        bool idx32bit;
 1040|   212k|        readBools(stream, &idx32bit, 1);
 1041|   212k|        if (indexCount > 0)
  ------------------
  |  Branch (1041:13): [True: 131k, False: 80.7k]
  ------------------
 1042|   131k|        {
 1043|   131k|            if (!checkChunkRemainingSize(mCurrentstreamLen, indexCount, idx32bit ? sizeof(unsigned int) : sizeof(unsigned short)))
  ------------------
  |  Branch (1043:17): [True: 108, False: 131k]
  |  Branch (1043:73): [True: 3.23k, False: 128k]
  ------------------
 1044|   131k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Index buffer size exceeds chunk size");
 1045|   131k|            if (idx32bit)
  ------------------
  |  Branch (1045:17): [True: 3.19k, False: 128k]
  ------------------
 1046|  3.19k|            {
 1047|  3.19k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
 1048|  3.19k|                        HardwareIndexBuffer::IT_32BIT,
 1049|  3.19k|                        sm->indexData->indexCount,
 1050|  3.19k|                        pMesh->mIndexBufferUsage,
 1051|  3.19k|                        pMesh->mIndexBufferShadowBuffer);
 1052|  3.19k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
 1053|  3.19k|                readInts(stream, static_cast<unsigned int*>(ibufLock.pData), sm->indexData->indexCount);
 1054|       |
 1055|  3.19k|            }
 1056|   128k|            else // 16-bit
 1057|   128k|            {
 1058|   128k|                ibuf = pMesh->getHardwareBufferManager()->createIndexBuffer(
 1059|   128k|                        HardwareIndexBuffer::IT_16BIT,
 1060|   128k|                        sm->indexData->indexCount,
 1061|   128k|                        pMesh->mIndexBufferUsage,
 1062|   128k|                        pMesh->mIndexBufferShadowBuffer);
 1063|   128k|                HardwareBufferLockGuard ibufLock(ibuf, HardwareBuffer::HBL_DISCARD);
 1064|   128k|                readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), sm->indexData->indexCount);
 1065|   128k|            }
 1066|   131k|        }
 1067|   212k|        sm->indexData->indexBuffer = ibuf;
 1068|       |
 1069|   212k|        pushInnerChunk(stream);
 1070|   212k|        {
 1071|       |        // M_GEOMETRY stream (Optional: present only if useSharedVertices = false)
 1072|   212k|        if (!sm->useSharedVertices)
  ------------------
  |  Branch (1072:13): [True: 120k, False: 91.7k]
  ------------------
 1073|   120k|        {
 1074|   120k|            streamID = readChunk(stream);
 1075|   120k|            if (streamID != M_GEOMETRY)
  ------------------
  |  Branch (1075:17): [True: 80, False: 120k]
  ------------------
 1076|     80|            {
 1077|     80|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Missing geometry data in mesh file",
 1078|     80|                    "MeshSerializerImpl::readSubMesh");
 1079|     80|            }
 1080|   120k|            sm->createVertexData();
 1081|   120k|            readGeometry(stream, pMesh, sm->vertexData);
 1082|   120k|        }
 1083|       |
 1084|       |
 1085|       |        // Find all bone assignments, submesh operation, and texture aliases (if present)
 1086|   212k|        if (!stream->eof())
  ------------------
  |  Branch (1086:13): [True: 212k, False: 286]
  ------------------
 1087|   212k|        {
 1088|   212k|            streamID = readChunk(stream);
 1089|   212k|            bool seenTexAlias = false;
 1090|   215k|            while(!stream->eof() &&
  ------------------
  |  Branch (1090:19): [True: 215k, False: 159]
  ------------------
 1091|   215k|                (streamID == M_SUBMESH_BONE_ASSIGNMENT ||
  ------------------
  |  Branch (1091:18): [True: 1.86k, False: 213k]
  ------------------
 1092|   213k|                 streamID == M_SUBMESH_OPERATION ||
  ------------------
  |  Branch (1092:18): [True: 198, False: 213k]
  ------------------
 1093|   213k|                 streamID == M_SUBMESH_TEXTURE_ALIAS))
  ------------------
  |  Branch (1093:18): [True: 1.40k, False: 212k]
  ------------------
 1094|  3.45k|            {
 1095|  3.45k|                switch(streamID)
  ------------------
  |  Branch (1095:24): [True: 3.45k, False: 0]
  ------------------
 1096|  3.45k|                {
 1097|    198|                case M_SUBMESH_OPERATION:
  ------------------
  |  Branch (1097:17): [True: 198, False: 3.26k]
  ------------------
 1098|    198|                    readSubMeshOperation(stream, pMesh, sm);
 1099|    198|                    break;
 1100|  1.86k|                case M_SUBMESH_BONE_ASSIGNMENT:
  ------------------
  |  Branch (1100:17): [True: 1.86k, False: 1.59k]
  ------------------
 1101|  1.86k|                    readSubMeshBoneAssignment(stream, pMesh, sm);
 1102|  1.86k|                    break;
 1103|  1.40k|                case M_SUBMESH_TEXTURE_ALIAS:
  ------------------
  |  Branch (1103:17): [True: 1.40k, False: 2.05k]
  ------------------
 1104|  1.40k|                    seenTexAlias = true;
 1105|  1.40k|                    String aliasName = readString(stream);
 1106|  1.40k|                    String textureName = readString(stream);
 1107|  1.40k|                    break;
 1108|  3.45k|                }
 1109|       |
 1110|  3.45k|                if (!stream->eof())
  ------------------
  |  Branch (1110:21): [True: 3.38k, False: 73]
  ------------------
 1111|  3.38k|                {
 1112|  3.38k|                    streamID = readChunk(stream);
 1113|  3.38k|                }
 1114|       |
 1115|  3.45k|            }
 1116|       |
 1117|   212k|            if (seenTexAlias)
  ------------------
  |  Branch (1117:17): [True: 769, False: 211k]
  ------------------
 1118|    769|                LogManager::getSingleton().logError("texture aliases for SubMeshes are unsupported - " +
 1119|    769|                                                      stream->getName());
 1120|       |
 1121|   212k|            if (!stream->eof())
  ------------------
  |  Branch (1121:17): [True: 212k, False: 159]
  ------------------
 1122|   212k|            {
 1123|       |                // Backpedal back to start of stream
 1124|   212k|                    backpedalChunkHeader(stream);
 1125|   212k|                }
 1126|   212k|            }
 1127|   212k|        }
 1128|   212k|        popInnerChunk(stream);
 1129|       |
 1130|   212k|    }
_ZN4Ogre18MeshSerializerImpl20readSubMeshOperationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1134|    198|    {
 1135|       |        // unsigned short operationType
 1136|    198|        unsigned short opType;
 1137|    198|        readShorts(stream, &opType, 1);
 1138|    198|        sm->operationType = static_cast<RenderOperation::OperationType>(opType);
 1139|    198|    }
_ZN4Ogre18MeshSerializerImpl16readSkeletonLinkERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_22MeshSerializerListenerE:
 1150|  13.8k|    {
 1151|  13.8k|        String skelName = readString(stream);
 1152|       |
 1153|  13.8k|        if(listener)
  ------------------
  |  Branch (1153:12): [True: 0, False: 13.8k]
  ------------------
 1154|      0|            listener->processSkeletonName(pMesh, &skelName);
 1155|       |
 1156|  13.8k|        pMesh->setSkeletonName(skelName);
 1157|  13.8k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1200|  1.96k|    {
 1201|  1.96k|        VertexBoneAssignment assign;
 1202|       |
 1203|       |        // unsigned int vertexIndex;
 1204|  1.96k|        readInts(stream, &(assign.vertexIndex),1);
 1205|       |        // unsigned short boneIndex;
 1206|  1.96k|        readShorts(stream, &(assign.boneIndex),1);
 1207|       |        // float weight;
 1208|  1.96k|        readFloats(stream, &(assign.weight), 1);
 1209|       |
 1210|  1.96k|        pMesh->addBoneAssignment(assign);
 1211|       |
 1212|  1.96k|    }
_ZN4Ogre18MeshSerializerImpl25readSubMeshBoneAssignmentERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_7SubMeshE:
 1216|  1.86k|    {
 1217|  1.86k|        VertexBoneAssignment assign;
 1218|       |
 1219|       |        // unsigned int vertexIndex;
 1220|  1.86k|        readInts(stream, &(assign.vertexIndex),1);
 1221|       |        // unsigned short boneIndex;
 1222|  1.86k|        readShorts(stream, &(assign.boneIndex),1);
 1223|       |        // float weight;
 1224|  1.86k|        readFloats(stream, &(assign.weight), 1);
 1225|       |
 1226|  1.86k|        sub->addBoneAssignment(assign);
 1227|       |
 1228|  1.86k|    }
_ZN4Ogre18MeshSerializerImpl14readBoundsInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1406|  2.68k|    {
 1407|  2.68k|        Vector3 min, max;
 1408|  2.68k|        readFloats(stream, min.ptr(), 3);
 1409|  2.68k|        readFloats(stream, max.ptr(), 3);
 1410|  2.68k|        AxisAlignedBox box(min, max);
 1411|  2.68k|        pMesh->_setBounds(box, false);
 1412|       |
 1413|  2.68k|        float radius;
 1414|  2.68k|        readFloats(stream, &radius, 1);
 1415|  2.68k|        pMesh->_setBoundingSphereRadius(radius);
 1416|  2.68k|    }
_ZN4Ogre18MeshSerializerImpl16readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1426|  3.97k|    {
 1427|       |#if OGRE_NO_MESHLOD
 1428|       |
 1429|       |        /*
 1430|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 1431|       |        // We need to walk through the data to not rely on the chunk size!
 1432|       |        stream->skip(mCurrentstreamLen);
 1433|       |
 1434|       |        // Since we got here, we have already read the chunk header.
 1435|       |        backpedalChunkHeader(stream);
 1436|       |        */
 1437|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 1438|       |        String strategyName = readString(stream);
 1439|       |        uint16 numLods;
 1440|       |        readShorts(stream, &numLods, 1);
 1441|       |        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods > 0 ? numLods - 1 : 0, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
 1442|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 1443|       |        pushInnerChunk(stream);
 1444|       |        for (int lodID = 1; lodID < numLods; lodID++){
 1445|       |            unsigned short streamID = readChunk(stream);
 1446|       |            Real usageValue;
 1447|       |            readFloats(stream, &usageValue, 1);
 1448|       |            switch (streamID){
 1449|       |            case M_MESH_LOD_MANUAL:
 1450|       |            {
 1451|       |                                      String manualName = readString(stream);
 1452|       |                                      break;
 1453|       |            }
 1454|       |            case M_MESH_LOD_GENERATED:
 1455|       |                for (int i = 0; i < numSubs; ++i)
 1456|       |                {
 1457|       |                    unsigned int numIndexes;
 1458|       |                    readInts(stream, &numIndexes, 1);
 1459|       |
 1460|       |                    unsigned int offset;
 1461|       |                    readInts(stream, &offset, 1);
 1462|       |
 1463|       |                    // For merged buffers, you can pass the index of previous Lod.
 1464|       |                    // To create buffer it should be -1.
 1465|       |                    unsigned int bufferIndex;
 1466|       |                    readInts(stream, &bufferIndex, 1);
 1467|       |                    if (bufferIndex == (unsigned int)-1) {
 1468|       |                        // generate buffers
 1469|       |
 1470|       |                        // bool indexes32Bit
 1471|       |                        bool idx32Bit;
 1472|       |                        readBools(stream, &idx32Bit, 1);
 1473|       |
 1474|       |                        unsigned int buffIndexCount;
 1475|       |                        readInts(stream, &buffIndexCount, 1);
 1476|       |
 1477|       |                        size_t buffSize = buffIndexCount * (idx32Bit ? 4 : 2);
 1478|       |                        stream->skip(buffSize);
 1479|       |                    }
 1480|       |                }
 1481|       |                break;
 1482|       |            default:
 1483|       |                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1484|       |                    "Invalid Lod Usage type in " + pMesh->getName(),
 1485|       |                    "MeshSerializerImpl::readMeshLodInfo");
 1486|       |            }
 1487|       |        }
 1488|       |        popInnerChunk(stream);
 1489|       |#else
 1490|       |        // Read the strategy to be used for this mesh
 1491|  3.97k|        String strategyName = readString(stream);
 1492|  3.97k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 1493|       |
 1494|       |        // Check that valid strategy name was given, otherwise use default
 1495|  3.97k|        if (strategy == 0)
  ------------------
  |  Branch (1495:13): [True: 3.44k, False: 536]
  ------------------
 1496|  3.44k|            strategy = LodStrategyManager::getSingleton().getDefaultStrategy();
 1497|       |
 1498|  3.97k|        pMesh->setLodStrategy(strategy);
 1499|       |
 1500|       |        // unsigned short numLevels;
 1501|  3.97k|        uint16 numLods;
 1502|  3.97k|        readShorts(stream, &numLods, 1);
 1503|  3.97k|        numLods = std::max<ushort>(numLods, 1);
 1504|       |
 1505|  3.97k|        if (!checkChunkRemainingSize(mCurrentstreamLen, numLods - 1, MSTREAM_OVERHEAD_SIZE + sizeof(float)))
  ------------------
  |  Branch (1505:13): [True: 67, False: 3.91k]
  ------------------
 1506|  3.97k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 1507|       |
 1508|  3.91k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (1508:12): [True: 2, False: 3.91k]
  ------------------
 1509|  3.91k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 1510|       |
 1511|  3.91k|        pMesh->_setLodInfo(numLods);
 1512|  3.91k|        pushInnerChunk(stream);
 1513|       |        // lodID=0 is the original mesh. We need to skip it.
 1514|  4.28k|        for(int lodID = 1; lodID < pMesh->getNumLodLevels(); lodID++){
  ------------------
  |  Branch (1514:28): [True: 619, False: 3.66k]
  ------------------
 1515|       |            // Read depth
 1516|    619|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[lodID];
 1517|    619|            unsigned short streamID = readChunk(stream);
 1518|    619|            readFloats(stream, &(usage.userValue), 1);
 1519|    619|            switch(streamID){
 1520|    295|            case M_MESH_LOD_MANUAL:
  ------------------
  |  Branch (1520:13): [True: 295, False: 324]
  ------------------
 1521|    295|                readMeshLodUsageManual(stream, pMesh, lodID, usage);
 1522|    295|                break;
 1523|    194|            case M_MESH_LOD_GENERATED:
  ------------------
  |  Branch (1523:13): [True: 194, False: 425]
  ------------------
 1524|    194|                readMeshLodUsageGenerated(stream, pMesh, lodID, usage);
 1525|    194|                break;
 1526|     97|            default:
  ------------------
  |  Branch (1526:13): [True: 97, False: 522]
  ------------------
 1527|     97|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
 1528|    619|                "Invalid Lod Usage type in " + pMesh->getName(),
 1529|    619|                    "MeshSerializerImpl::readMeshLodInfo");
 1530|    619|            }
 1531|    375|            usage.manualMesh.reset(); // will trigger load later with manual Lod
 1532|    375|            usage.edgeData = NULL;
 1533|    375|        }
 1534|  3.66k|        popInnerChunk(stream);
 1535|  3.66k|#endif
 1536|  3.66k|    }
_ZN4Ogre18MeshSerializerImpl22readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1540|    295|    {
 1541|    295|        pMesh->mHasManualLodLevel = true;
 1542|    295|        usage.manualName = readString(stream);
 1543|       |        
 1544|       |        // Generate for mixed
 1545|    295|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1545:22): [True: 661, False: 295]
  ------------------
 1546|    661|        {
 1547|       |            s->mLodFaceList[lodNum-1] = OGRE_NEW IndexData();
 1548|    661|        }
 1549|    295|    }
_ZN4Ogre18MeshSerializerImpl25readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 1552|    194|    {
 1553|    194|        usage.manualName = "";
 1554|       |
 1555|       |        // Get one set of detail per SubMesh
 1556|    194|        for (auto *s : pMesh->getSubMeshes())
  ------------------
  |  Branch (1556:22): [True: 1.16k, False: 80]
  ------------------
 1557|  1.16k|        {
 1558|  1.16k|            s->mLodFaceList[lodNum - 1] = OGRE_NEW IndexData();
 1559|  1.16k|            IndexData* indexData = s->mLodFaceList[lodNum - 1];
 1560|       |
 1561|  1.16k|            unsigned int numIndexes;
 1562|  1.16k|            readInts(stream, &numIndexes, 1);
 1563|  1.16k|            indexData->indexCount = static_cast<size_t>(numIndexes);
 1564|       |
 1565|  1.16k|            unsigned int offset;
 1566|  1.16k|            readInts(stream, &offset, 1);
 1567|  1.16k|            indexData->indexStart = static_cast<size_t>(offset);
 1568|       |
 1569|       |            // For merged buffers, you can pass the index of previous Lod.
 1570|       |            // To create buffer it should be -1.
 1571|  1.16k|            unsigned int bufferIndex;
 1572|  1.16k|            readInts(stream, &bufferIndex, 1);
 1573|  1.16k|            if(bufferIndex != (unsigned int)-1) {
  ------------------
  |  Branch (1573:16): [True: 70, False: 1.09k]
  ------------------
 1574|     70|                if (bufferIndex - 1 >= (unsigned int)lodNum - 1)
  ------------------
  |  Branch (1574:21): [True: 64, False: 6]
  ------------------
 1575|     70|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid LOD buffer index in mesh LOD data");
 1576|       |                // copy buffer pointer
 1577|      6|                indexData->indexBuffer = s->mLodFaceList.at(bufferIndex - 1)->indexBuffer;
 1578|      6|                if (!indexData->indexBuffer)
  ------------------
  |  Branch (1578:21): [True: 2, False: 4]
  ------------------
 1579|      6|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Referenced LOD index buffer is null");
 1580|  1.09k|            } else {
 1581|       |                // generate buffers
 1582|       |
 1583|       |                // bool indexes32Bit
 1584|  1.09k|                bool idx32Bit;
 1585|  1.09k|                readBools(stream, &idx32Bit, 1);
 1586|       |                
 1587|  1.09k|                unsigned int buffIndexCount;
 1588|  1.09k|                readInts(stream, &buffIndexCount, 1);
 1589|       |
 1590|  1.09k|                if (!checkChunkRemainingSize(mCurrentstreamLen, buffIndexCount, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (1590:21): [True: 48, False: 1.04k]
  |  Branch (1590:81): [True: 667, False: 425]
  ------------------
 1591|  1.09k|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 1592|       |
 1593|  1.04k|                indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 1594|  1.04k|                    idx32Bit ? HardwareIndexBuffer::IT_32BIT : HardwareIndexBuffer::IT_16BIT,
  ------------------
  |  Branch (1594:21): [True: 623, False: 421]
  ------------------
 1595|  1.04k|                    buffIndexCount, pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 1596|  1.04k|                HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 1597|       |
 1598|  1.04k|                if (idx32Bit)
  ------------------
  |  Branch (1598:21): [True: 623, False: 421]
  ------------------
 1599|    623|                {
 1600|    623|                    readInts(stream, (uint32*)ibufLock.pData, buffIndexCount);
 1601|    623|                }
 1602|    421|                else
 1603|    421|                {
 1604|    421|                    readShorts(stream, (uint16*)ibufLock.pData, buffIndexCount);
 1605|    421|                }
 1606|  1.04k|            }
 1607|  1.16k|        }
 1608|    194|    }
_ZN4Ogre18MeshSerializerImpl20flipFromLittleEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1613|  8.11k|    {
 1614|  8.11k|        if (mFlipEndian)
  ------------------
  |  Branch (1614:13): [True: 8.11k, False: 0]
  ------------------
 1615|  8.11k|        {
 1616|  8.11k|            flipEndian(pData, vertexCount, vertexSize, elems);
 1617|  8.11k|        }
 1618|  8.11k|    }
_ZN4Ogre18MeshSerializerImpl10flipEndianEPvmmRKNSt3__14listINS_13VertexElementENS2_9allocatorIS4_EEEE:
 1631|  8.11k|    {
 1632|  8.11k|        void *pBase = pData;
 1633|  27.8k|        for (size_t v = 0; v < vertexCount; ++v)
  ------------------
  |  Branch (1633:28): [True: 19.7k, False: 8.11k]
  ------------------
 1634|  19.7k|        {
 1635|  19.7k|            for (auto& e : elems)
  ------------------
  |  Branch (1635:26): [True: 35.4k, False: 19.7k]
  ------------------
 1636|  35.4k|            {
 1637|  35.4k|                void *pElem;
 1638|       |                // re-base pointer to the element
 1639|  35.4k|                e.baseVertexPointerToElement(pBase, &pElem);
 1640|       |                // Flip the endian based on the type
 1641|  35.4k|                size_t typeSize = 0;
 1642|  35.4k|                switch (VertexElement::getBaseType(e.getType()))
 1643|  35.4k|                {
 1644|  4.51k|                    case VET_FLOAT1:
  ------------------
  |  Branch (1644:21): [True: 4.51k, False: 30.8k]
  ------------------
 1645|  4.51k|                        typeSize = sizeof(float);
 1646|  4.51k|                        break;
 1647|    685|                    case VET_DOUBLE1:
  ------------------
  |  Branch (1647:21): [True: 685, False: 34.7k]
  ------------------
 1648|    685|                        typeSize = sizeof(double);
 1649|    685|                        break;
 1650|  3.23k|                    case VET_SHORT1:
  ------------------
  |  Branch (1650:21): [True: 3.23k, False: 32.1k]
  ------------------
 1651|  3.23k|                        typeSize = sizeof(short);
 1652|  3.23k|                        break;
 1653|  1.27k|                    case VET_USHORT1:
  ------------------
  |  Branch (1653:21): [True: 1.27k, False: 34.1k]
  ------------------
 1654|  1.27k|                        typeSize = sizeof(unsigned short);
 1655|  1.27k|                        break;
 1656|    651|                    case VET_INT1:
  ------------------
  |  Branch (1656:21): [True: 651, False: 34.7k]
  ------------------
 1657|    651|                        typeSize = sizeof(int);
 1658|    651|                        break;
 1659|  1.50k|                    case VET_UINT1:
  ------------------
  |  Branch (1659:21): [True: 1.50k, False: 33.9k]
  ------------------
 1660|  1.50k|                        typeSize = sizeof(unsigned int);
 1661|  1.50k|                        break;
 1662|  7.33k|                    case VET_UBYTE4_NORM:
  ------------------
  |  Branch (1662:21): [True: 7.33k, False: 28.0k]
  ------------------
 1663|  7.78k|                    case VET_UBYTE4:
  ------------------
  |  Branch (1663:21): [True: 446, False: 34.9k]
  ------------------
 1664|  7.78k|                        typeSize = 0; // NO FLIPPING
 1665|  7.78k|                        break;
 1666|  15.7k|                    default:
  ------------------
  |  Branch (1666:21): [True: 15.7k, False: 19.6k]
  ------------------
 1667|  15.7k|                        assert(false); // Should never happen
 1668|  35.4k|                };
 1669|  35.4k|				Bitwise::bswapChunks(pElem, typeSize,
 1670|  35.4k|                    VertexElement::getTypeCount(e.getType()));
 1671|  35.4k|            }
 1672|       |
 1673|  19.7k|            pBase = static_cast<void*>(
 1674|  19.7k|                static_cast<unsigned char*>(pBase) + vertexSize);
 1675|  19.7k|        }
 1676|  8.11k|    }
_ZN4Ogre18MeshSerializerImpl12readEdgeListERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 1861|  1.42k|    {
 1862|  1.42k|        pMesh->mEdgeListsBuilt = true; // set this early, so any partial data is freed
 1863|       |
 1864|  1.42k|        if (!stream->eof())
  ------------------
  |  Branch (1864:13): [True: 1.42k, False: 0]
  ------------------
 1865|  1.42k|        {
 1866|  1.42k|            pushInnerChunk(stream);
 1867|  1.42k|            unsigned short streamID = readChunk(stream);
 1868|  2.54k|            while(!stream->eof() &&
  ------------------
  |  Branch (1868:19): [True: 2.07k, False: 473]
  ------------------
 1869|  2.07k|                streamID == M_EDGE_LIST_LOD)
  ------------------
  |  Branch (1869:17): [True: 1.14k, False: 930]
  ------------------
 1870|  1.14k|            {
 1871|       |                // Process single LOD
 1872|       |
 1873|       |                // unsigned short lodIndex
 1874|  1.14k|                unsigned short lodIndex;
 1875|  1.14k|                readShorts(stream, &lodIndex, 1);
 1876|       |
 1877|       |                // bool isManual            // If manual, no edge data here, loaded from manual mesh
 1878|  1.14k|                bool isManual;
 1879|  1.14k|                readBools(stream, &isManual, 1);
 1880|       |                // Only load in non-manual levels; others will be connected up by Mesh on demand
 1881|       |#if OGRE_NO_MESHLOD
 1882|       |                // 
 1883|       |                if (!isManual)
 1884|       |                    if (lodIndex != 0) {
 1885|       |                        readEdgeListLodInfo(stream, NULL);
 1886|       |                    } else {
 1887|       |#else
 1888|  1.14k|                if (!isManual) {
  ------------------
  |  Branch (1888:21): [True: 484, False: 662]
  ------------------
 1889|    484|#endif
 1890|    484|                    MeshLodUsage& usage = pMesh->mMeshLodUsageList.at(lodIndex);
 1891|    484|                    if(!usage.manualName.empty())
  ------------------
  |  Branch (1891:24): [True: 17, False: 467]
  ------------------
 1892|    484|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD is marked as non-manual, but has a manual mesh name");
 1893|       |
 1894|    467|                    if (usage.edgeData)
  ------------------
  |  Branch (1894:25): [True: 1, False: 466]
  ------------------
 1895|    467|                        OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Duplicate edge data for LOD");
 1896|       |
 1897|    466|                    auto edgeData = std::make_unique<EdgeData>(); // in case of exception, will be deleted automatically
 1898|       |
 1899|       |                    // Read detail information of the edge list
 1900|    466|                    readEdgeListLodInfo(stream, edgeData.get());
 1901|       |
 1902|       |                    // Postprocessing edge groups
 1903|    466|                    for (auto& edgeGroup : edgeData->edgeGroups)
  ------------------
  |  Branch (1903:42): [True: 163, False: 466]
  ------------------
 1904|    163|                    {
 1905|       |                        // Populate edgeGroup.vertexData pointers
 1906|       |                        // If there is shared vertex data, vertexSet 0 is that,
 1907|       |                        // otherwise 0 is first dedicated
 1908|    163|                        if (pMesh->sharedVertexData)
  ------------------
  |  Branch (1908:29): [True: 94, False: 69]
  ------------------
 1909|     94|                        {
 1910|     94|                            if (edgeGroup.vertexSet == 0)
  ------------------
  |  Branch (1910:33): [True: 47, False: 47]
  ------------------
 1911|     47|                            {
 1912|     47|                                edgeGroup.vertexData = pMesh->sharedVertexData;
 1913|     47|                            }
 1914|     47|                            else
 1915|     47|                            {
 1916|     47|                                edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet - 1)->vertexData;
 1917|     47|                            }
 1918|     94|                        }
 1919|     69|                        else
 1920|     69|                        {
 1921|     69|                            edgeGroup.vertexData = pMesh->getSubMeshes().at(edgeGroup.vertexSet)->vertexData;
 1922|     69|                        }
 1923|    163|                    }
 1924|       |
 1925|    466|                    usage.edgeData = edgeData.release();
 1926|    466|                }
 1927|       |
 1928|  1.12k|                if (!stream->eof())
  ------------------
  |  Branch (1928:21): [True: 691, False: 437]
  ------------------
 1929|    691|                {
 1930|    691|                    streamID = readChunk(stream);
 1931|    691|                }
 1932|       |
 1933|  1.12k|            }
 1934|  1.40k|            if (!stream->eof())
  ------------------
  |  Branch (1934:17): [True: 930, False: 473]
  ------------------
 1935|    930|            {
 1936|       |                // Backpedal back to start of stream
 1937|    930|                backpedalChunkHeader(stream);
 1938|    930|            }
 1939|  1.40k|            popInnerChunk(stream);
 1940|  1.40k|        }
 1941|  1.42k|    }
_ZN4Ogre18MeshSerializerImpl19readEdgeListLodInfoERKNS_9SharedPtrINS_10DataStreamEEEPNS_8EdgeDataE:
 1945|    455|    {
 1946|       |#if OGRE_NO_MESHLOD
 1947|       |        if (edgeData == NULL) { // skip it!
 1948|       |            bool isClosed;
 1949|       |            readBools(stream, &isClosed, 1);
 1950|       |            // unsigned long numTriangles
 1951|       |            uint32 numTriangles;
 1952|       |            readInts(stream, &numTriangles, 1);
 1953|       |            // unsigned long numEdgeGroups
 1954|       |            uint32 numEdgeGroups;
 1955|       |            readInts(stream, &numEdgeGroups, 1);
 1956|       |            stream->skip(numTriangles * (8 * sizeof(uint32) + 4 * sizeof(float)));
 1957|       |            pushInnerChunk(stream);
 1958|       |            for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
 1959|       |            {
 1960|       |                unsigned short streamID = readChunk(stream);
 1961|       |                if (streamID != M_EDGE_GROUP)
 1962|       |                {
 1963|       |                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 1964|       |                        "Missing M_EDGE_GROUP stream",
 1965|       |                        "MeshSerializerImpl::readEdgeListLodInfo");
 1966|       |                }
 1967|       |                uint32 tmp[3];
 1968|       |                // unsigned long vertexSet
 1969|       |                readInts(stream, &tmp[0], 3);
 1970|       |                uint32 numEdges;
 1971|       |                readInts(stream, &numEdges, 1);
 1972|       |
 1973|       |                stream->skip(numEdges * (6 * sizeof(uint32) + sizeof(bool)));
 1974|       |            }
 1975|       |            popInnerChunk(stream);
 1976|       |            return;
 1977|       |        }
 1978|       |#endif
 1979|       |        // bool isClosed
 1980|    455|        readBools(stream, &edgeData->isClosed, 1);
 1981|       |        // unsigned long numTriangles
 1982|    455|        uint32 numTriangles;
 1983|    455|        readInts(stream, &numTriangles, 1);
 1984|    455|        if(!checkChunkRemainingSize(mCurrentstreamLen, numTriangles, sizeof(EdgeData::Triangle) + sizeof(Vector4f)))
  ------------------
  |  Branch (1984:12): [True: 64, False: 391]
  ------------------
 1985|    455|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list triangle data exceeds chunk size");
 1986|       |
 1987|       |        // Allocate correct amount of memory
 1988|    391|        edgeData->triangles.resize(numTriangles);
 1989|    391|        edgeData->triangleFaceNormals.resize(numTriangles);
 1990|    391|        edgeData->triangleLightFacings.resize(numTriangles);
 1991|       |        // unsigned long numEdgeGroups
 1992|    391|        uint32 numEdgeGroups;
 1993|    391|        readInts(stream, &numEdgeGroups, 1);
 1994|    391|        if(!checkChunkRemainingSize(mCurrentstreamLen, numEdgeGroups, sizeof(uint32) * 4))
  ------------------
  |  Branch (1994:12): [True: 75, False: 316]
  ------------------
 1995|    391|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list group data exceeds chunk size");
 1996|       |
 1997|       |        // Allocate correct amount of memory
 1998|    316|        edgeData->edgeGroups.resize(numEdgeGroups);
 1999|       |        // Triangle* triangleList
 2000|    316|        uint32 tmp[3];
 2001|  12.1k|        for (size_t t = 0; t < numTriangles; ++t)
  ------------------
  |  Branch (2001:28): [True: 11.8k, False: 316]
  ------------------
 2002|  11.8k|        {
 2003|  11.8k|            EdgeData::Triangle& tri = edgeData->triangles[t];
 2004|       |            // unsigned long indexSet
 2005|  11.8k|            readInts(stream, tmp, 1);
 2006|  11.8k|            tri.indexSet = tmp[0];
 2007|       |            // unsigned long vertexSet
 2008|  11.8k|            readInts(stream, tmp, 1);
 2009|  11.8k|            tri.vertexSet = tmp[0];
 2010|       |            // unsigned long vertIndex[3]
 2011|  11.8k|            readInts(stream, tmp, 3);
 2012|       |
 2013|  11.8k|            tri.vertIndex[0] = tmp[0];
 2014|  11.8k|            tri.vertIndex[1] = tmp[1];
 2015|  11.8k|            tri.vertIndex[2] = tmp[2];
 2016|       |            // unsigned long sharedVertIndex[3]
 2017|  11.8k|            readInts(stream, tmp, 3);
 2018|  11.8k|            tri.sharedVertIndex[0] = tmp[0];
 2019|  11.8k|            tri.sharedVertIndex[1] = tmp[1];
 2020|  11.8k|            tri.sharedVertIndex[2] = tmp[2];
 2021|       |            // float normal[4]
 2022|  11.8k|            readFloats(stream, &(edgeData->triangleFaceNormals[t].x), 4);
 2023|       |
 2024|  11.8k|        }
 2025|    316|        pushInnerChunk(stream);
 2026|    611|        for (uint32 eg = 0; eg < numEdgeGroups; ++eg)
  ------------------
  |  Branch (2026:29): [True: 519, False: 92]
  ------------------
 2027|    519|        {
 2028|    519|            unsigned short streamID = readChunk(stream);
 2029|    519|            if (streamID != M_EDGE_GROUP)
  ------------------
  |  Branch (2029:17): [True: 99, False: 420]
  ------------------
 2030|     99|            {
 2031|     99|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
 2032|     99|                    "Missing M_EDGE_GROUP stream",
 2033|     99|                    "MeshSerializerImpl::readEdgeListLodInfo");
 2034|     99|            }
 2035|    420|            EdgeData::EdgeGroup& edgeGroup = edgeData->edgeGroups[eg];
 2036|       |
 2037|       |            // unsigned long vertexSet
 2038|    420|            readInts(stream, tmp, 1);
 2039|    420|            edgeGroup.vertexSet = tmp[0];
 2040|       |            // unsigned long triStart
 2041|    420|            readInts(stream, tmp, 1);
 2042|    420|            edgeGroup.triStart = tmp[0];
 2043|       |            // unsigned long triCount
 2044|    420|            readInts(stream, tmp, 1);
 2045|    420|            edgeGroup.triCount = tmp[0];
 2046|       |            // unsigned long numEdges
 2047|    420|            uint32 numEdges;
 2048|    420|            readInts(stream, &numEdges, 1);
 2049|    420|            if(!checkChunkRemainingSize(mCurrentstreamLen, numEdges, sizeof(uint32) * 6 + sizeof(bool)))
  ------------------
  |  Branch (2049:16): [True: 125, False: 295]
  ------------------
 2050|    420|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Edge list edge data exceeds chunk size");
 2051|       |
 2052|    295|            edgeGroup.edges.resize(numEdges);
 2053|       |            // Edge* edgeList
 2054|   436M|            for (uint32 e = 0; e < numEdges; ++e)
  ------------------
  |  Branch (2054:32): [True: 436M, False: 295]
  ------------------
 2055|   436M|            {
 2056|   436M|                EdgeData::Edge& edge = edgeGroup.edges[e];
 2057|       |                // unsigned long  triIndex[2]
 2058|   436M|                readInts(stream, tmp, 2);
 2059|   436M|                edge.triIndex[0] = tmp[0];
 2060|   436M|                edge.triIndex[1] = tmp[1];
 2061|       |                // unsigned long  vertIndex[2]
 2062|   436M|                readInts(stream, tmp, 2);
 2063|   436M|                edge.vertIndex[0] = tmp[0];
 2064|   436M|                edge.vertIndex[1] = tmp[1];
 2065|       |                // unsigned long  sharedVertIndex[2]
 2066|   436M|                readInts(stream, tmp, 2);
 2067|   436M|                edge.sharedVertIndex[0] = tmp[0];
 2068|   436M|                edge.sharedVertIndex[1] = tmp[1];
 2069|       |                // bool degenerate
 2070|   436M|                readBools(stream, &(edge.degenerate), 1);
 2071|   436M|            }
 2072|    295|        }
 2073|     92|        popInnerChunk(stream);
 2074|     92|    }
_ZN4Ogre18MeshSerializerImpl9readPosesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2389|  6.67k|    {
 2390|       |        // Find all substreams
 2391|  6.67k|        if (!stream->eof())
  ------------------
  |  Branch (2391:13): [True: 6.67k, False: 0]
  ------------------
 2392|  6.67k|        {
 2393|  6.67k|            pushInnerChunk(stream);
 2394|  6.67k|            unsigned short streamID = readChunk(stream);
 2395|  26.0k|            while(!stream->eof() &&
  ------------------
  |  Branch (2395:19): [True: 25.7k, False: 322]
  ------------------
 2396|  25.7k|                (streamID == M_POSE))
  ------------------
  |  Branch (2396:17): [True: 19.3k, False: 6.34k]
  ------------------
 2397|  19.3k|            {
 2398|  19.3k|                switch(streamID)
  ------------------
  |  Branch (2398:24): [True: 19.3k, False: 0]
  ------------------
 2399|  19.3k|                {
 2400|  19.3k|                case M_POSE:
  ------------------
  |  Branch (2400:17): [True: 19.3k, False: 0]
  ------------------
 2401|  19.3k|                    readPose(stream, pMesh);
 2402|  19.3k|                    break;
 2403|       |
 2404|  19.3k|                }
 2405|       |
 2406|  19.3k|                if (!stream->eof())
  ------------------
  |  Branch (2406:21): [True: 19.0k, False: 295]
  ------------------
 2407|  19.0k|                {
 2408|  19.0k|                    streamID = readChunk(stream);
 2409|  19.0k|                }
 2410|       |
 2411|  19.3k|            }
 2412|  6.67k|            if (!stream->eof())
  ------------------
  |  Branch (2412:17): [True: 6.34k, False: 322]
  ------------------
 2413|  6.34k|            {
 2414|       |                // Backpedal back to start of stream
 2415|  6.34k|                backpedalChunkHeader(stream);
 2416|  6.34k|            }
 2417|  6.67k|            popInnerChunk(stream);
 2418|  6.67k|        }
 2419|  6.67k|    }
_ZN4Ogre18MeshSerializerImpl8readPoseERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2422|  19.3k|    {
 2423|       |        // char* name (may be blank)
 2424|  19.3k|        String name = readString(stream);
 2425|       |        // unsigned short target
 2426|  19.3k|        unsigned short target;
 2427|  19.3k|        readShorts(stream, &target, 1);
 2428|       |
 2429|       |        // bool includesNormals
 2430|  19.3k|        bool includesNormals;
 2431|  19.3k|        readBools(stream, &includesNormals, 1);
 2432|       |        
 2433|  19.3k|        Pose* pose = pMesh->createPose(target, name);
 2434|       |
 2435|       |        // Find all substreams
 2436|  19.3k|        if (!stream->eof())
  ------------------
  |  Branch (2436:13): [True: 19.3k, False: 34]
  ------------------
 2437|  19.3k|        {
 2438|  19.3k|            pushInnerChunk(stream);
 2439|  19.3k|            unsigned short streamID = readChunk(stream);
 2440|  24.3k|            while(!stream->eof() &&
  ------------------
  |  Branch (2440:19): [True: 24.0k, False: 264]
  ------------------
 2441|  24.0k|                (streamID == M_POSE_VERTEX))
  ------------------
  |  Branch (2441:17): [True: 4.97k, False: 19.0k]
  ------------------
 2442|  4.97k|            {
 2443|  4.97k|                switch(streamID)
  ------------------
  |  Branch (2443:24): [True: 4.97k, False: 0]
  ------------------
 2444|  4.97k|                {
 2445|  4.97k|                case M_POSE_VERTEX:
  ------------------
  |  Branch (2445:17): [True: 4.97k, False: 0]
  ------------------
 2446|       |                    // create vertex offset
 2447|  4.97k|                    uint32 vertIndex;
 2448|  4.97k|                    Vector3f offset, normal;
 2449|       |                    // unsigned long vertexIndex
 2450|  4.97k|                    readInts(stream, &vertIndex, 1);
 2451|       |                    // float xoffset, yoffset, zoffset
 2452|  4.97k|                    readFloats(stream, offset.ptr(), 3);
 2453|       |                    
 2454|  4.97k|                    if (includesNormals)
  ------------------
  |  Branch (2454:25): [True: 2.71k, False: 2.26k]
  ------------------
 2455|  2.71k|                    {
 2456|  2.71k|                        readFloats(stream, normal.ptr(), 3);
 2457|  2.71k|                        pose->addVertex(vertIndex, offset, normal);                     
 2458|  2.71k|                    }
 2459|  2.26k|                    else 
 2460|  2.26k|                    {
 2461|  2.26k|                        pose->addVertex(vertIndex, offset);
 2462|  2.26k|                    }
 2463|       |
 2464|       |
 2465|  4.97k|                    break;
 2466|       |
 2467|  4.97k|                }
 2468|       |
 2469|  4.97k|                if (!stream->eof())
  ------------------
  |  Branch (2469:21): [True: 4.74k, False: 236]
  ------------------
 2470|  4.74k|                {
 2471|  4.74k|                    streamID = readChunk(stream);
 2472|  4.74k|                }
 2473|       |
 2474|  4.97k|            }
 2475|  19.3k|            if (!stream->eof())
  ------------------
  |  Branch (2475:17): [True: 19.0k, False: 264]
  ------------------
 2476|  19.0k|            {
 2477|       |                // Backpedal back to start of stream
 2478|  19.0k|                backpedalChunkHeader(stream);
 2479|  19.0k|            }
 2480|  19.3k|            popInnerChunk(stream);
 2481|  19.3k|        }
 2482|  19.3k|    }
_ZN4Ogre18MeshSerializerImpl14readAnimationsERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2485|  2.14k|    {
 2486|       |        // Find all substreams
 2487|  2.14k|        if (!stream->eof())
  ------------------
  |  Branch (2487:13): [True: 2.14k, False: 0]
  ------------------
 2488|  2.14k|        {
 2489|  2.14k|            pushInnerChunk(stream);
 2490|  2.14k|            unsigned short streamID = readChunk(stream);
 2491|  5.47k|            while(!stream->eof() &&
  ------------------
  |  Branch (2491:19): [True: 5.15k, False: 318]
  ------------------
 2492|  5.15k|                (streamID == M_ANIMATION))
  ------------------
  |  Branch (2492:17): [True: 3.38k, False: 1.77k]
  ------------------
 2493|  3.38k|            {
 2494|  3.38k|                switch(streamID)
  ------------------
  |  Branch (2494:24): [True: 3.38k, False: 0]
  ------------------
 2495|  3.38k|                {
 2496|  3.38k|                case M_ANIMATION:
  ------------------
  |  Branch (2496:17): [True: 3.38k, False: 0]
  ------------------
 2497|  3.38k|                    readAnimation(stream, pMesh);
 2498|  3.38k|                    break;
 2499|       |
 2500|  3.38k|                }
 2501|       |
 2502|  3.32k|                if (!stream->eof())
  ------------------
  |  Branch (2502:21): [True: 3.03k, False: 287]
  ------------------
 2503|  3.03k|                {
 2504|  3.03k|                    streamID = readChunk(stream);
 2505|  3.03k|                }
 2506|       |
 2507|  3.32k|            }
 2508|  2.08k|            if (!stream->eof())
  ------------------
  |  Branch (2508:17): [True: 1.77k, False: 318]
  ------------------
 2509|  1.77k|            {
 2510|       |                // Backpedal back to start of stream
 2511|  1.77k|                backpedalChunkHeader(stream);
 2512|  1.77k|            }
 2513|  2.08k|            popInnerChunk(stream);
 2514|  2.08k|        }
 2515|  2.14k|    }
_ZN4Ogre18MeshSerializerImpl13readAnimationERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2518|  3.38k|    {
 2519|       |        // char* name
 2520|  3.38k|        String name = readString(stream);
 2521|       |        // float length
 2522|  3.38k|        float len;
 2523|  3.38k|        readFloats(stream, &len, 1);
 2524|       |
 2525|  3.38k|        Animation* anim = pMesh->createAnimation(name, len);
 2526|       |
 2527|       |        // tracks
 2528|  3.38k|        if (!stream->eof())
  ------------------
  |  Branch (2528:13): [True: 3.30k, False: 72]
  ------------------
 2529|  3.30k|        {
 2530|  3.30k|            pushInnerChunk(stream);
 2531|  3.30k|            unsigned short streamID = readChunk(stream);
 2532|       |            
 2533|       |            // Optional base info is possible
 2534|  3.30k|            if (streamID == M_ANIMATION_BASEINFO)
  ------------------
  |  Branch (2534:17): [True: 110, False: 3.19k]
  ------------------
 2535|    110|            {
 2536|       |                // char baseAnimationName
 2537|    110|                String baseAnimName = readString(stream);
 2538|       |                // float baseKeyFrameTime
 2539|    110|                float baseKeyTime;
 2540|    110|                readFloats(stream, &baseKeyTime, 1);
 2541|       |                
 2542|    110|                anim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
 2543|       |                
 2544|    110|                if (!stream->eof())
  ------------------
  |  Branch (2544:21): [True: 101, False: 9]
  ------------------
 2545|    101|                {
 2546|       |                    // Get next stream
 2547|    101|                    streamID = readChunk(stream);
 2548|    101|                }
 2549|    110|            }
 2550|       |            
 2551|  6.77k|            while(!stream->eof() &&
  ------------------
  |  Branch (2551:19): [True: 6.55k, False: 226]
  ------------------
 2552|  6.55k|                streamID == M_ANIMATION_TRACK)
  ------------------
  |  Branch (2552:17): [True: 3.51k, False: 3.03k]
  ------------------
 2553|  3.51k|            {
 2554|  3.51k|                switch(streamID)
  ------------------
  |  Branch (2554:24): [True: 3.51k, False: 0]
  ------------------
 2555|  3.51k|                {
 2556|  3.51k|                case M_ANIMATION_TRACK:
  ------------------
  |  Branch (2556:17): [True: 3.51k, False: 0]
  ------------------
 2557|  3.51k|                    readAnimationTrack(stream, anim, pMesh);
 2558|  3.51k|                    break;
 2559|  3.51k|                };
 2560|  3.47k|                if (!stream->eof())
  ------------------
  |  Branch (2560:21): [True: 3.28k, False: 182]
  ------------------
 2561|  3.28k|                {
 2562|  3.28k|                    streamID = readChunk(stream);
 2563|  3.28k|                }
 2564|       |
 2565|  3.47k|            }
 2566|  3.26k|            if (!stream->eof())
  ------------------
  |  Branch (2566:17): [True: 3.03k, False: 226]
  ------------------
 2567|  3.03k|            {
 2568|       |                // Backpedal back to start of stream
 2569|  3.03k|                backpedalChunkHeader(stream);
 2570|  3.03k|            }
 2571|  3.26k|            popInnerChunk(stream);
 2572|  3.26k|        }
 2573|  3.38k|    }
_ZN4Ogre18MeshSerializerImpl18readAnimationTrackERKNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_4MeshE:
 2577|  3.51k|    {
 2578|       |        // ushort type
 2579|  3.51k|        uint16 inAnimType;
 2580|  3.51k|        readShorts(stream, &inAnimType, 1);
 2581|  3.51k|        VertexAnimationType animType = (VertexAnimationType)inAnimType;
 2582|       |
 2583|       |        // unsigned short target
 2584|  3.51k|        uint16 target;
 2585|  3.51k|        readShorts(stream, &target, 1);
 2586|       |
 2587|  3.51k|        if (target > pMesh->getNumSubMeshes())
  ------------------
  |  Branch (2587:13): [True: 16, False: 3.49k]
  ------------------
 2588|  3.51k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid target for vertex animation track");
 2589|       |
 2590|  3.49k|        VertexData* vdata = pMesh->getVertexDataByTrackHandle(target);
 2591|  3.49k|        if (!vdata)
  ------------------
  |  Branch (2591:13): [True: 4, False: 3.49k]
  ------------------
 2592|  3.49k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track references target with no vertex data");
 2593|  3.49k|        VertexAnimationTrack* track = anim->createVertexTrack(target, vdata, animType);
 2594|       |
 2595|       |        // keyframes
 2596|  3.49k|        if (!stream->eof())
  ------------------
  |  Branch (2596:13): [True: 3.47k, False: 20]
  ------------------
 2597|  3.47k|        {
 2598|  3.47k|            pushInnerChunk(stream);
 2599|  3.47k|            unsigned short streamID = readChunk(stream);
 2600|  7.88k|            while(!stream->eof() &&
  ------------------
  |  Branch (2600:19): [True: 7.71k, False: 174]
  ------------------
 2601|  7.71k|                (streamID == M_ANIMATION_MORPH_KEYFRAME ||
  ------------------
  |  Branch (2601:18): [True: 2.69k, False: 5.02k]
  ------------------
 2602|  5.02k|                 streamID == M_ANIMATION_POSE_KEYFRAME))
  ------------------
  |  Branch (2602:18): [True: 1.73k, False: 3.28k]
  ------------------
 2603|  4.42k|            {
 2604|  4.42k|                switch(streamID)
  ------------------
  |  Branch (2604:24): [True: 4.42k, False: 0]
  ------------------
 2605|  4.42k|                {
 2606|  2.69k|                case M_ANIMATION_MORPH_KEYFRAME:
  ------------------
  |  Branch (2606:17): [True: 2.69k, False: 1.73k]
  ------------------
 2607|  2.69k|                    readMorphKeyFrame(stream, pMesh, track);
 2608|  2.69k|                    break;
 2609|  1.73k|                case M_ANIMATION_POSE_KEYFRAME:
  ------------------
  |  Branch (2609:17): [True: 1.73k, False: 2.69k]
  ------------------
 2610|  1.73k|                    readPoseKeyFrame(stream, track);
 2611|  1.73k|                    break;
 2612|  4.42k|                };
 2613|  4.41k|                if (!stream->eof())
  ------------------
  |  Branch (2613:21): [True: 4.26k, False: 146]
  ------------------
 2614|  4.26k|                {
 2615|  4.26k|                    streamID = readChunk(stream);
 2616|  4.26k|                }
 2617|       |
 2618|  4.41k|            }
 2619|  3.46k|            if (!stream->eof())
  ------------------
  |  Branch (2619:17): [True: 3.28k, False: 174]
  ------------------
 2620|  3.28k|            {
 2621|       |                // Backpedal back to start of stream
 2622|  3.28k|                backpedalChunkHeader(stream);
 2623|  3.28k|            }
 2624|  3.46k|            popInnerChunk(stream);
 2625|  3.46k|        }
 2626|       |
 2627|  3.49k|    }
_ZN4Ogre18MeshSerializerImpl17readMorphKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEPNS_20VertexAnimationTrackE:
 2630|  2.69k|    {
 2631|       |        // float time
 2632|  2.69k|        float timePos;
 2633|  2.69k|        readFloats(stream, &timePos, 1);
 2634|       |        
 2635|       |        // bool includesNormals
 2636|  2.69k|        bool includesNormals;
 2637|  2.69k|        readBools(stream, &includesNormals, 1);
 2638|       |
 2639|  2.69k|        VertexMorphKeyFrame* kf = track->createVertexMorphKeyFrame(timePos);
 2640|       |
 2641|       |        // Create buffer, allow read and use shadow buffer
 2642|  2.69k|        size_t vertexCount = track->getAssociatedVertexData()->vertexCount;
 2643|  2.69k|        size_t vertexSize = sizeof(float) * (includesNormals ? 6 : 3);
  ------------------
  |  Branch (2643:46): [True: 783, False: 1.91k]
  ------------------
 2644|  2.69k|        HardwareVertexBufferSharedPtr vbuf =
 2645|  2.69k|            pMesh->getHardwareBufferManager()->createVertexBuffer(
 2646|  2.69k|                vertexSize, vertexCount,
 2647|  2.69k|                HardwareBuffer::HBU_STATIC, true);
 2648|       |        // float x,y,z          // repeat by number of vertices in original geometry
 2649|  2.69k|        HardwareBufferLockGuard vbufLock(vbuf, HardwareBuffer::HBL_DISCARD);
 2650|  2.69k|        readFloats(stream, static_cast<float*>(vbufLock.pData), vertexCount * (includesNormals ? 6 : 3));
  ------------------
  |  Branch (2650:80): [True: 783, False: 1.91k]
  ------------------
 2651|  2.69k|        kf->setVertexBuffer(vbuf);
 2652|       |
 2653|  2.69k|    }
_ZN4Ogre18MeshSerializerImpl16readPoseKeyFrameERKNS_9SharedPtrINS_10DataStreamEEEPNS_20VertexAnimationTrackE:
 2656|  1.73k|    {
 2657|       |        // float time
 2658|  1.73k|        float timePos;
 2659|  1.73k|        readFloats(stream, &timePos, 1);
 2660|       |
 2661|       |        // Create keyframe
 2662|  1.73k|        VertexPoseKeyFrame* kf = track->createVertexPoseKeyFrame(timePos);
 2663|       |
 2664|  1.73k|        if (!stream->eof())
  ------------------
  |  Branch (2664:13): [True: 1.68k, False: 44]
  ------------------
 2665|  1.68k|        {
 2666|  1.68k|            pushInnerChunk(stream);
 2667|  1.68k|            unsigned short streamID = readChunk(stream);
 2668|  3.89k|            while(!stream->eof() &&
  ------------------
  |  Branch (2668:19): [True: 3.80k, False: 82]
  ------------------
 2669|  3.80k|                streamID == M_ANIMATION_POSE_REF)
  ------------------
  |  Branch (2669:17): [True: 2.20k, False: 1.60k]
  ------------------
 2670|  2.20k|            {
 2671|  2.20k|                switch(streamID)
  ------------------
  |  Branch (2671:24): [True: 2.20k, False: 0]
  ------------------
 2672|  2.20k|                {
 2673|  2.20k|                case M_ANIMATION_POSE_REF:
  ------------------
  |  Branch (2673:17): [True: 2.20k, False: 0]
  ------------------
 2674|  2.20k|                    uint16 poseIndex;
 2675|  2.20k|                    float influence;
 2676|       |                    // unsigned short poseIndex
 2677|  2.20k|                    readShorts(stream, &poseIndex, 1);
 2678|       |                    // float influence
 2679|  2.20k|                    readFloats(stream, &influence, 1);
 2680|       |
 2681|  2.20k|                    kf->addPoseReference(poseIndex, influence);
 2682|       |
 2683|  2.20k|                    break;
 2684|  2.20k|                };
 2685|  2.20k|                if (!stream->eof())
  ------------------
  |  Branch (2685:21): [True: 2.16k, False: 32]
  ------------------
 2686|  2.16k|                {
 2687|  2.16k|                    streamID = readChunk(stream);
 2688|  2.16k|                }
 2689|  2.20k|            }
 2690|  1.68k|            if (!stream->eof())
  ------------------
  |  Branch (2690:17): [True: 1.60k, False: 82]
  ------------------
 2691|  1.60k|            {
 2692|       |                // Backpedal back to start of stream
 2693|  1.60k|                backpedalChunkHeader(stream);
 2694|  1.60k|            }
 2695|  1.68k|            popInnerChunk(stream);
 2696|  1.68k|        }
 2697|  1.73k|    }
_ZN4Ogre18MeshSerializerImpl12readExtremesERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 2700|  1.61k|    {
 2701|  1.61k|        unsigned short idx;
 2702|  1.61k|        readShorts(stream, &idx, 1);
 2703|       |        
 2704|  1.61k|        SubMesh *sm = pMesh->getSubMeshes().at(idx);
 2705|       |
 2706|  1.61k|        const size_t minChunkSize = MSTREAM_OVERHEAD_SIZE + sizeof(unsigned short);
 2707|  1.61k|        if (mCurrentstreamLen <= minChunkSize)
  ------------------
  |  Branch (2707:13): [True: 2, False: 1.61k]
  ------------------
 2708|  1.61k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Extremes chunk too small");
 2709|       |
 2710|  1.61k|        size_t n_floats = (mCurrentstreamLen - minChunkSize) / sizeof(float);
 2711|       |
 2712|  1.61k|        if (n_floats == 0 || n_floats % 3 != 0)
  ------------------
  |  Branch (2712:13): [True: 24, False: 1.59k]
  |  Branch (2712:30): [True: 14, False: 1.57k]
  ------------------
 2713|  1.61k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Invalid extremes data size");
 2714|       |        
 2715|  1.59k|        sm->extremityPoints.resize(n_floats / 3);
 2716|       |
 2717|  1.59k|        readFloats(stream, sm->extremityPoints.front().ptr(), n_floats);
 2718|  1.59k|    }
_ZN4Ogre23MeshSerializerImpl_v1_8C2Ev:
 2732|  5.56k|    {
 2733|       |        // Version number
 2734|  5.56k|        mVersion = "[MeshSerializer_v1.8]";
 2735|       |        // v1.8 and older had broken chunk size bookkeeping (see readMeshLodLevel) and several
 2736|       |        // third party exporters wrote incorrect sizes, too. tolerate them on reading.
 2737|  5.56k|        mReportChunkErrors = false;
 2738|  5.56k|    }
_ZN4Ogre23MeshSerializerImpl_v1_825readMeshLodUsageGeneratedERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 2965|    210|    {
 2966|    210|        usage.manualName = "";
 2967|    210|        usage.manualMesh.reset();
 2968|    210|        pushInnerChunk(stream);
 2969|    210|        {
 2970|       |            // Get one set of detail per SubMesh
 2971|    210|            for (auto *sm : pMesh->getSubMeshes())
  ------------------
  |  Branch (2971:27): [True: 305, False: 119]
  ------------------
 2972|    305|            {
 2973|    305|                unsigned long streamID = readChunk(stream);
 2974|    305|                if (streamID != M_MESH_LOD_GENERATED)
  ------------------
  |  Branch (2974:21): [True: 46, False: 259]
  ------------------
 2975|     46|                {
 2976|     46|                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 2977|     46|                        "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 2978|     46|                        "MeshSerializerImpl::readMeshLodUsageGenerated");
 2979|     46|                }
 2980|       |
 2981|    259|                IndexData* indexData = OGRE_NEW IndexData();
 2982|    259|                sm->mLodFaceList[lodNum - 1] = indexData;
 2983|    259|                unsigned int numIndexes;
 2984|    259|                readInts(stream, &numIndexes, 1);
 2985|    259|                bool idx32Bit;
 2986|    259|                readBools(stream, &idx32Bit, 1);
 2987|       |
 2988|    259|                if (!checkChunkRemainingSize(mCurrentstreamLen, numIndexes, idx32Bit ? 4 : 2))
  ------------------
  |  Branch (2988:21): [True: 45, False: 214]
  |  Branch (2988:77): [True: 67, False: 192]
  ------------------
 2989|    259|                    OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD index data exceeds chunk size");
 2990|       |
 2991|    214|                indexData->indexCount = numIndexes;
 2992|       |
 2993|    214|                if (idx32Bit)
  ------------------
  |  Branch (2993:21): [True: 36, False: 178]
  ------------------
 2994|     36|                {
 2995|     36|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 2996|     36|                        HardwareIndexBuffer::IT_32BIT, indexData->indexCount,
 2997|     36|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 2998|     36|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 2999|     36|                    readInts(stream, static_cast<unsigned int*>(ibufLock.pData), indexData->indexCount);
 3000|     36|                }
 3001|    178|                else
 3002|    178|                {
 3003|    178|                    indexData->indexBuffer = pMesh->getHardwareBufferManager()->createIndexBuffer(
 3004|    178|                        HardwareIndexBuffer::IT_16BIT, indexData->indexCount,
 3005|    178|                        pMesh->mIndexBufferUsage, pMesh->mIndexBufferShadowBuffer);
 3006|    178|                    HardwareBufferLockGuard ibufLock(indexData->indexBuffer, HardwareBuffer::HBL_DISCARD);
 3007|    178|                    readShorts(stream, static_cast<unsigned short*>(ibufLock.pData), indexData->indexCount);
 3008|    178|                }
 3009|    214|            }
 3010|    210|        }
 3011|    119|        popInnerChunk(stream);
 3012|    119|    }
_ZN4Ogre23MeshSerializerImpl_v1_822readMeshLodUsageManualERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshEtRNS_12MeshLodUsageE:
 3016|  1.06k|    {
 3017|  1.06k|        pushInnerChunk(stream);
 3018|  1.06k|        unsigned long streamID;
 3019|       |        // Read detail stream
 3020|  1.06k|        streamID = readChunk(stream);
 3021|  1.06k|        if (streamID != M_MESH_LOD_MANUAL)
  ------------------
  |  Branch (3021:13): [True: 33, False: 1.02k]
  ------------------
 3022|     33|        {
 3023|     33|            OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3024|     33|                "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 3025|     33|                "MeshSerializerImpl::readMeshLodUsageManual");
 3026|     33|        }
 3027|       |
 3028|  1.02k|        usage.manualName = readString(stream);
 3029|  1.02k|        usage.manualMesh.reset(); // will trigger load later
 3030|  1.02k|        popInnerChunk(stream);
 3031|  1.02k|    }
_ZN4Ogre23MeshSerializerImpl_v1_816readMeshLodLevelERKNS_9SharedPtrINS_10DataStreamEEEPNS_4MeshE:
 3035|  3.95k|    {
 3036|       |#if OGRE_NO_MESHLOD
 3037|       |
 3038|       |        /*
 3039|       |        //Since the chunk sizes in old versions are messed up, we can't use this clean solution.
 3040|       |        // We need to walk through the data to not rely on the chunk size!
 3041|       |        stream->skip(mCurrentstreamLen);
 3042|       |
 3043|       |        // Since we got here, we have already read the chunk header.
 3044|       |        backpedalChunkHeader(stream);
 3045|       |        */
 3046|       |        uint16 numSubs = pMesh->getNumSubMeshes();
 3047|       |        String strategyName = readString(stream);
 3048|       |        uint16 numLods;
 3049|       |        readShorts(stream, &numLods, 1);
 3050|       |        if (!checkLegacyLodCount(stream, numLods))
 3051|       |            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 3052|       |        bool manual;
 3053|       |        readBools(stream, &manual, 1); // missing in v1_9
 3054|       |        pushInnerChunk(stream);
 3055|       |        for (uint16 i = 1; i < numLods; ++i)
 3056|       |        {
 3057|       |            uint16 streamID = readChunk(stream);
 3058|       |            if (streamID != M_MESH_LOD_USAGE)
 3059|       |            {
 3060|       |                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3061|       |                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3062|       |                    "MeshSerializerImpl::readMeshLodInfo");
 3063|       |            }
 3064|       |            float usageValue;
 3065|       |            readFloats(stream, &usageValue, 1);
 3066|       |
 3067|       |            if (manual)
 3068|       |            {
 3069|       |                // Read detail stream
 3070|       |                streamID = readChunk(stream);
 3071|       |                if (streamID != M_MESH_LOD_MANUAL)
 3072|       |                {
 3073|       |                    OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3074|       |                        "Missing M_MESH_LOD_MANUAL stream in " + pMesh->getName(),
 3075|       |                        "MeshSerializerImpl::readMeshLodUsageManual");
 3076|       |                }
 3077|       |
 3078|       |                String manualName = readString(stream);
 3079|       |            }
 3080|       |            else
 3081|       |            {
 3082|       |                pushInnerChunk(stream);
 3083|       |                for (uint16 n = 0; n < numSubs; ++n)
 3084|       |                {
 3085|       |                    streamID = readChunk(stream);
 3086|       |                    if (streamID != M_MESH_LOD_GENERATED)
 3087|       |                    {
 3088|       |                        OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3089|       |                            "Missing M_MESH_LOD_GENERATED stream in " + pMesh->getName(),
 3090|       |                            "MeshSerializerImpl::readMeshLodUsageGenerated");
 3091|       |                    }
 3092|       |
 3093|       |                    unsigned int numIndexes;
 3094|       |                    readInts(stream, &numIndexes, 1);
 3095|       |
 3096|       |                    bool idx32Bit;
 3097|       |                    readBools(stream, &idx32Bit, 1);
 3098|       |
 3099|       |                    size_t buffSize = numIndexes * (idx32Bit ? 4 : 2);
 3100|       |                    stream->skip(buffSize);
 3101|       |                }
 3102|       |                popInnerChunk(stream);
 3103|       |            }
 3104|       |        }
 3105|       |        popInnerChunk(stream);
 3106|       |#else
 3107|  3.95k|        unsigned short streamID, i;
 3108|       |
 3109|       |        // Read the strategy to be used for this mesh
 3110|  3.95k|        String strategyName = readString(stream);
 3111|  3.95k|        LodStrategy *strategy = LodStrategyManager::getSingleton().getStrategy(strategyName);
 3112|       |        
 3113|  3.95k|        if (strategy)
  ------------------
  |  Branch (3113:13): [True: 729, False: 3.22k]
  ------------------
 3114|    729|            pMesh->setLodStrategy(strategy);
 3115|       |
 3116|       |        // unsigned short numLevels;
 3117|  3.95k|        uint16 numLods;
 3118|  3.95k|        readShorts(stream, &numLods, 1);
 3119|  3.95k|        numLods = std::max<ushort>(numLods, 1);
 3120|       |
 3121|  3.95k|        if (!checkLegacyLodCount(stream, numLods))
  ------------------
  |  Branch (3121:13): [True: 53, False: 3.90k]
  ------------------
 3122|  3.95k|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "LOD level count exceeds chunk size");
 3123|       |
 3124|  3.90k|        if(pMesh->getNumLodLevels() > 1)
  ------------------
  |  Branch (3124:12): [True: 3, False: 3.90k]
  ------------------
 3125|  3.90k|            OGRE_EXCEPT(Exception::ERR_INVALID_STATE, "LOD levels already exist in mesh");
 3126|       |
 3127|  3.90k|        pMesh->mMeshLodUsageList.resize(numLods);
 3128|       |
 3129|  3.90k|        bool manual; // true for manual alternate meshes, false for generated
 3130|  3.90k|        readBools(stream, &manual, 1);
 3131|  3.90k|        pMesh->mHasManualLodLevel = manual;
 3132|       |
 3133|       |        // Preallocate submesh lod face data if not manual
 3134|  3.90k|        if (!pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3134:13): [True: 1.44k, False: 2.45k]
  ------------------
 3135|  1.44k|        {
 3136|  1.44k|            unsigned short numsubs = pMesh->getNumSubMeshes();
 3137|  43.1k|            for (i = 0; i < numsubs; ++i)
  ------------------
  |  Branch (3137:25): [True: 41.7k, False: 1.44k]
  ------------------
 3138|  41.7k|            {
 3139|  41.7k|                SubMesh* sm = pMesh->getSubMesh(i);
 3140|  41.7k|                assert(sm->mLodFaceList.empty());
 3141|  41.7k|                sm->mLodFaceList.resize(numLods - 1);
 3142|  41.7k|            }
 3143|  1.44k|        }
 3144|       |
 3145|  3.90k|        pushInnerChunk(stream);
 3146|       |        // Loop from 1 rather than 0 (full detail index is not in file)
 3147|  5.18k|        for (i = 1; i < numLods; ++i)
  ------------------
  |  Branch (3147:21): [True: 1.40k, False: 3.77k]
  ------------------
 3148|  1.40k|        {
 3149|  1.40k|            streamID = readChunk(stream);
 3150|  1.40k|            if (streamID != M_MESH_LOD_USAGE)
  ------------------
  |  Branch (3150:17): [True: 130, False: 1.27k]
  ------------------
 3151|    130|            {
 3152|    130|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 3153|    130|                    "Missing M_MESH_LOD_USAGE stream in " + pMesh->getName(),
 3154|    130|                    "MeshSerializerImpl::readMeshLodInfo");
 3155|    130|            }
 3156|       |            // Read depth
 3157|  1.27k|            MeshLodUsage& usage = pMesh->mMeshLodUsageList[i];
 3158|  1.27k|            readFloats(stream, &(usage.userValue), 1);
 3159|       |
 3160|  1.27k|            if (pMesh->hasManualLodLevel())
  ------------------
  |  Branch (3160:17): [True: 1.06k, False: 218]
  ------------------
 3161|  1.06k|            {
 3162|  1.06k|                readMeshLodUsageManual(stream, pMesh, i, usage);
 3163|  1.06k|            }
 3164|    218|            else //(!pMesh->hasManualLodLevel())
 3165|    218|            {
 3166|    218|                readMeshLodUsageGenerated(stream, pMesh, i, usage);
 3167|    218|            }
 3168|  1.27k|            usage.edgeData = NULL;
 3169|  1.27k|        }
 3170|  3.77k|        popInnerChunk(stream);
 3171|  3.77k|#endif
 3172|  3.77k|    }
OgreMeshSerializerImpl.cpp:_ZN4OgreL23checkChunkRemainingSizeEmmm:
   51|   291k|    {
   52|   291k|        if (itemCount == 0)
  ------------------
  |  Branch (52:13): [True: 20.4k, False: 271k]
  ------------------
   53|  20.4k|            return true;
   54|       |
   55|   271k|        if (chunkSize <= MSTREAM_OVERHEAD_SIZE || itemSize == 0)
  ------------------
  |  Branch (55:13): [True: 488, False: 270k]
  |  Branch (55:51): [True: 0, False: 270k]
  ------------------
   56|    488|            return false;
   57|       |
   58|   270k|        size_t remaining = chunkSize - MSTREAM_OVERHEAD_SIZE;
   59|   270k|        return remaining / itemSize >= itemCount;
   60|   271k|    }
OgreMeshSerializerImpl.cpp:_ZN4OgreL19checkLegacyLodCountERKNS_9SharedPtrINS_10DataStreamEEEm:
   65|  3.95k|    {
   66|  3.95k|        if (numLods <= 1)
  ------------------
  |  Branch (66:13): [True: 3.59k, False: 360]
  ------------------
   67|  3.59k|            return true;
   68|    360|        size_t pos = stream->tell(), size = stream->size();
   69|    360|        size_t remaining = pos < size ? size - pos : 0;
  ------------------
  |  Branch (69:28): [True: 342, False: 18]
  ------------------
   70|    360|        return remaining / (MSTREAM_OVERHEAD_SIZE + sizeof(float)) >= numLods - 1;
   71|  3.95k|    }

_ZN4Ogre4NodeC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   35|    684|        :mParent(0),
   36|    684|        mName(name),
   37|    684|        mNeedParentUpdate(false),
   38|    684|        mNeedChildUpdate(false),
   39|    684|        mParentNotified(false),
   40|    684|        mQueuedForUpdate(false),
   41|    684|        mInheritOrientation(true),
   42|    684|        mInheritScale(true),
   43|    684|        mCachedTransformOutOfDate(true),
   44|    684|        mOrientation(Quaternion::IDENTITY),
   45|    684|        mPosition(Vector3::ZERO),
   46|    684|        mScale(Vector3::UNIT_SCALE),
   47|    684|        mDerivedOrientation(Quaternion::IDENTITY),
   48|    684|        mDerivedPosition(Vector3::ZERO),
   49|    684|        mDerivedScale(Vector3::UNIT_SCALE),
   50|    684|        mInitialPosition(Vector3::ZERO),
   51|    684|        mInitialOrientation(Quaternion::IDENTITY),
   52|    684|        mInitialScale(Vector3::UNIT_SCALE),
   53|    684|        mListener(0)
   54|    684|    {
   55|    684|        needUpdate();
   56|    684|    }
_ZN4Ogre4NodeD2Ev:
   60|    684|    {
   61|       |        // Call listener (note, only called if there's something to do)
   62|    684|        if (mListener)
  ------------------
  |  Branch (62:13): [True: 0, False: 684]
  ------------------
   63|      0|        {
   64|      0|            mListener->nodeDestroyed(this);
   65|      0|        }
   66|       |
   67|    684|        removeAllChildren();
   68|    684|        if(mParent)
  ------------------
  |  Branch (68:12): [True: 3, False: 681]
  ------------------
   69|      3|            mParent->removeChild(this);
   70|       |
   71|    684|        if (mQueuedForUpdate)
  ------------------
  |  Branch (71:13): [True: 0, False: 684]
  ------------------
   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|    684|    }
_ZN4Ogre4Node9setParentEPS0_:
   89|     18|    {
   90|     18|        bool different = (parent != mParent);
   91|       |
   92|     18|        mParent = parent;
   93|       |        // Request update from parent
   94|     18|        mParentNotified = false ;
   95|     18|        needUpdate();
   96|       |
   97|       |        // Call listener (note, only called if there's something to do)
   98|     18|        if (mListener && different)
  ------------------
  |  Branch (98:13): [True: 0, False: 18]
  |  Branch (98:26): [True: 0, False: 0]
  ------------------
   99|      0|        {
  100|      0|            if (mParent)
  ------------------
  |  Branch (100:17): [True: 0, False: 0]
  ------------------
  101|      0|                mListener->nodeAttached(this);
  102|      0|            else
  103|      0|                mListener->nodeDetached(this);
  104|      0|        }
  105|       |
  106|     18|    }
_ZNK4Ogre4Node17_updateFromParentEv:
  192|    569|    {
  193|    569|        updateFromParentImpl();
  194|       |
  195|       |        // Call listener (note, this method only called if there's something to do)
  196|    569|        if (mListener)
  ------------------
  |  Branch (196:13): [True: 0, False: 569]
  ------------------
  197|      0|        {
  198|      0|            mListener->nodeUpdated(this);
  199|      0|        }
  200|    569|    }
_ZNK4Ogre4Node20updateFromParentImplEv:
  203|    569|    {
  204|    569|        mCachedTransformOutOfDate = true;
  205|       |
  206|    569|        if (mParent)
  ------------------
  |  Branch (206:13): [True: 2, False: 567]
  ------------------
  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|    567|        else
  247|    567|        {
  248|       |            // Root node, no parent
  249|    567|            mDerivedOrientation = mOrientation;
  250|    567|            mDerivedPosition = mPosition;
  251|    567|            mDerivedScale = mScale;
  252|    567|        }
  253|       |
  254|    569|        mNeedParentUpdate = false;
  255|       |
  256|    569|    }
_ZN4Ogre4Node8addChildEPS0_:
  280|     11|    {
  281|     11|        if (child->mParent)
  ------------------
  |  Branch (281:13): [True: 2, False: 9]
  ------------------
  282|      2|        {
  283|      2|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
  284|      2|                        "Node '" + child->getName() + "' already is a child of '" + child->mParent->getName() + "'");
  285|      2|        }
  286|       |
  287|      9|        mChildren.push_back(child);
  288|      9|        child->setParent(this);
  289|       |
  290|      9|    }
_ZN4Ogre4Node11removeChildEPS0_:
  320|      3|    {
  321|      3|        if (child)
  ------------------
  |  Branch (321:13): [True: 3, False: 0]
  ------------------
  322|      3|        {
  323|      3|            ChildNodeMap::iterator i = std::find(mChildren.begin(), mChildren.end(), child);
  324|      3|            if(i != mChildren.end() && *i == child)
  ------------------
  |  Branch (324:16): [True: 3, False: 0]
  |  Branch (324:16): [True: 3, False: 0]
  |  Branch (324:40): [True: 3, False: 0]
  ------------------
  325|      3|            {
  326|       |                // cancel any pending update
  327|      3|                cancelUpdate(child);
  328|       |
  329|      3|                std::swap(*i, mChildren.back());
  330|      3|                mChildren.pop_back();
  331|       |                child->setParent(NULL);
  332|      3|            }
  333|      3|        }
  334|      3|        return child;
  335|      3|    }
_ZN4Ogre4Node14setOrientationERKNS_10QuaternionE:
  339|    684|    {
  340|    684|#ifndef OGRE_FAST_MATH
  341|    684|        OgreAssertDbg(!q.isNaN(), "Invalid orientation supplied as parameter");
  342|    684|#endif
  343|    684|        mOrientation = q;
  344|    684|        mOrientation.normalise();
  345|    684|        needUpdate();
  346|    684|    }
_ZN4Ogre4Node11setPositionERKNS_6VectorILi3EfEE:
  361|    684|    {
  362|    684|#ifndef OGRE_FAST_MATH
  363|       |        assert(!pos.isNaN() && "Invalid vector supplied as parameter");
  364|    684|#endif
  365|    684|        mPosition = pos;
  366|    684|        needUpdate();
  367|    684|    }
_ZNK4Ogre4Node22_getDerivedOrientationEv:
  452|    571|    {
  453|    571|        if (mNeedParentUpdate)
  ------------------
  |  Branch (453:13): [True: 1, False: 570]
  ------------------
  454|      1|        {
  455|      1|            _updateFromParent();
  456|      1|        }
  457|    571|        return mDerivedOrientation;
  458|    571|    }
_ZNK4Ogre4Node19_getDerivedPositionEv:
  461|    571|    {
  462|    571|        if (mNeedParentUpdate)
  ------------------
  |  Branch (462:13): [True: 568, False: 3]
  ------------------
  463|    568|        {
  464|    568|            _updateFromParent();
  465|    568|        }
  466|    571|        return mDerivedPosition;
  467|    571|    }
_ZNK4Ogre4Node16_getDerivedScaleEv:
  470|    571|    {
  471|    571|        if (mNeedParentUpdate)
  ------------------
  |  Branch (471:13): [True: 0, False: 571]
  ------------------
  472|      0|        {
  473|      0|            _updateFromParent();
  474|      0|        }
  475|    571|        return mDerivedScale;
  476|    571|    }
_ZN4Ogre4Node17removeAllChildrenEv:
  546|    684|    {
  547|    684|        for (auto *c : mChildren)
  ------------------
  |  Branch (547:22): [True: 6, False: 684]
  ------------------
  548|      6|        {
  549|      6|            c->setParent(0);
  550|      6|        }
  551|    684|        mChildren.clear();
  552|    684|        mChildrenToUpdate.clear();
  553|    684|    }
_ZN4Ogre4Node8setScaleERKNS_6VectorILi3EfEE:
  563|     20|    {
  564|     20|#ifndef OGRE_FAST_MATH
  565|       |        assert(!inScale.isNaN() && "Invalid vector supplied as parameter");
  566|     20|#endif
  567|     20|        mScale = inScale;
  568|     20|        needUpdate();
  569|     20|    }
_ZN4Ogre4Node15setInitialStateEv:
  600|    569|    {
  601|    569|        mInitialPosition = mPosition;
  602|    569|        mInitialOrientation = mOrientation;
  603|    569|        mInitialScale = mScale;
  604|    569|    }
_ZN4Ogre4Node10needUpdateEb:
  680|  2.09k|    {
  681|       |
  682|  2.09k|        mNeedParentUpdate = true;
  683|  2.09k|        mNeedChildUpdate = true;
  684|  2.09k|        mCachedTransformOutOfDate = true;
  685|       |
  686|       |        // Make sure we're not root and parent hasn't been notified before
  687|  2.09k|        if (mParent && (!mParentNotified || forceParentUpdate))
  ------------------
  |  Branch (687:13): [True: 9, False: 2.08k]
  |  Branch (687:25): [True: 9, False: 0]
  |  Branch (687:45): [True: 0, False: 0]
  ------------------
  688|      9|        {
  689|      9|            mParent->requestUpdate(this, forceParentUpdate);
  690|      9|            mParentNotified = true ;
  691|      9|        }
  692|       |
  693|       |        // all children will be updated
  694|  2.09k|        mChildrenToUpdate.clear();
  695|  2.09k|    }
_ZN4Ogre4Node13requestUpdateEPS0_b:
  698|      9|    {
  699|       |        // If we're already going to update everything this doesn't matter
  700|      9|        if (mNeedChildUpdate)
  ------------------
  |  Branch (700:13): [True: 9, False: 0]
  ------------------
  701|      9|        {
  702|      9|            return;
  703|      9|        }
  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|      3|    {
  717|      3|        mChildrenToUpdate.erase(std::remove(mChildrenToUpdate.begin(), mChildrenToUpdate.end(), child),
  718|      3|                                mChildrenToUpdate.end());
  719|       |
  720|       |        // Propagate this up if we're done
  721|      3|        if (mChildrenToUpdate.empty() && mParent && !mNeedChildUpdate)
  ------------------
  |  Branch (721:13): [True: 3, False: 0]
  |  Branch (721:42): [True: 0, False: 3]
  |  Branch (721:53): [True: 0, False: 0]
  ------------------
  722|      0|        {
  723|      0|            mParent->cancelUpdate(this);
  724|      0|            mParentNotified = false ;
  725|      0|        }
  726|      3|    }

_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:
  900|      2|        : mPreferGeneralVersionForSharedBuffers(false)
  901|      2|    {
  902|       |        // For AMD Athlon XP (but not that for Althon 64), it's prefer to never use
  903|       |        // unrolled version for shared buffers at all, I guess because that version
  904|       |        // run out of usable CPU registers, or L1/L2 cache related problem, causing
  905|       |        // slight performance loss than general version.
  906|       |        //
  907|      2|#if OGRE_CPU == OGRE_CPU_X86
  908|      2|        if (PlatformInformation::getCpuIdentifier().find("AuthenticAMD") != String::npos)
  ------------------
  |  Branch (908:13): [True: 0, False: 2]
  ------------------
  909|      0|        {
  910|       |            // How can I check it's an Athlon XP but not Althon 64?
  911|       |            // Ok, just test whether supports SSE2/SSE3 or not, if not,
  912|       |            // assume general version faster than unrolled version :)
  913|       |            //
  914|      0|            if (!(PlatformInformation::getCpuFeatures() &
  ------------------
  |  Branch (914:17): [True: 0, False: 0]
  ------------------
  915|      0|                (PlatformInformation::CPU_FEATURE_SSE2 | PlatformInformation::CPU_FEATURE_SSE3)))
  916|      0|            {
  917|      0|                mPreferGeneralVersionForSharedBuffers = true;
  918|      0|            }
  919|      0|        }
  920|      2|#endif
  921|      2|    }
_ZN4Ogre20_getOptimisedUtilSSEEv:
 1993|      2|    {
 1994|      2|        static OptimisedUtilSSE msOptimisedUtilSSE;
 1995|      2|        return &msOptimisedUtilSSE;
 1996|      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|    235|    {
   42|       |        // Use the maximum possible value as base
   43|    235|        return std::numeric_limits<Real>::max();
   44|    235|    }
_ZN4Ogre29AbsolutePixelCountLodStrategyC2Ev:
   92|      1|        : PixelCountLodStrategyBase("pixel_count")
   93|      1|    { }
_ZN4Ogre32ScreenRatioPixelCountLodStrategyC2Ev:
  172|      1|        : PixelCountLodStrategyBase("screen_ratio_pixel_count")
  173|      1|    { }

_ZN4Ogre19PlatformInformation16getCpuIdentifierEv:
  675|      2|    {
  676|      2|        static const String sIdentifier = _detectCpuIdentifier();
  677|      2|        return sIdentifier;
  678|      2|    }
_ZN4Ogre19PlatformInformation14getCpuFeaturesEv:
  681|      2|    {
  682|      2|        static const uint sFeatures = _detectCpuFeatures();
  683|      2|        return sFeatures;
  684|      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|  19.3k|        : mTarget(target), mName(name)
   35|  19.3k|    {
   36|  19.3k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEE:
   39|  2.26k|    {
   40|  2.26k|        OgreAssert(mNormalsMap.empty(),
  ------------------
  |  Branch (40:9): [True: 0, False: 2.26k]
  ------------------
   41|  2.26k|                   "Inconsistent calls to addVertex, must include normals always or never");
   42|       |
   43|  2.26k|        if(offset.squaredLength() < 1e-6f)
  ------------------
  |  Branch (43:12): [True: 218, False: 2.04k]
  ------------------
   44|    218|        {
   45|    218|            return;
   46|    218|        }
   47|       |
   48|  2.04k|        mVertexOffsetMap[index] = offset;
   49|  2.04k|        mBuffer.reset();
   50|  2.04k|    }
_ZN4Ogre4Pose9addVertexEjRKNS_6VectorILi3EfEES4_:
   53|  2.71k|    {
   54|  2.71k|        OgreAssert(mVertexOffsetMap.empty() || !mNormalsMap.empty(),
  ------------------
  |  Branch (54:9): [True: 824, False: 1.89k]
  |  Branch (54:9): [True: 1.89k, False: 0]
  ------------------
   55|  2.71k|                   "Inconsistent calls to addVertex, must include normals always or never");
   56|       |
   57|  2.71k|        if(offset.squaredLength() < 1e-6f && normal.squaredLength() < 1e-6f)
  ------------------
  |  Branch (57:12): [True: 1.05k, False: 1.65k]
  |  Branch (57:46): [True: 228, False: 831]
  ------------------
   58|    228|        {
   59|    228|            return;
   60|    228|        }
   61|       |
   62|  2.48k|        mVertexOffsetMap[index] = offset;
   63|  2.48k|        mNormalsMap[index] = normal;
   64|  2.48k|        mBuffer.reset();
   65|  2.48k|    }

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

_ZN4Ogre20ResourceGroupManager12getSingletonEv:
   40|   281k|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|   281k|    }
_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|  13.2k|    {
  516|  13.2k|        OgreAssert(!resourceName.empty(), "resourceName is empty string");
  ------------------
  |  Branch (516:9): [True: 0, False: 13.2k]
  ------------------
  517|  13.2k|        if(mLoadingListener)
  ------------------
  |  Branch (517:12): [True: 0, False: 13.2k]
  ------------------
  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|  13.2k|        ResourceGroup* grp = getResourceGroup(groupName, throwOnFailure);
  526|  13.2k|        if (!grp)
  ------------------
  |  Branch (526:13): [True: 0, False: 13.2k]
  ------------------
  527|      0|        {
  528|       |            // we only get here if throwOnFailure is false
  529|      0|            return DataStreamPtr();
  530|      0|        }
  531|       |
  532|  13.2k|        Archive* pArch = resourceExists(grp, resourceName);
  533|       |
  534|  13.2k|        if (pArch == NULL && (searchGroupsIfNotFound ||
  ------------------
  |  Branch (534:13): [True: 13.2k, False: 0]
  |  Branch (534:31): [True: 0, False: 13.2k]
  ------------------
  535|  13.2k|            groupName == AUTODETECT_RESOURCE_GROUP_NAME || grp->inGlobalPool ||
  ------------------
  |  Branch (535:13): [True: 0, False: 13.2k]
  |  Branch (535:60): [True: 13.2k, 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|  13.2k|        {
  538|  13.2k|            std::pair<Archive*, ResourceGroup*> ret = resourceExistsInAnyGroupImpl(resourceName);
  539|       |
  540|  13.2k|            if(ret.second && resourceBeingLoaded && !ret.second->inGlobalPool) {
  ------------------
  |  Branch (540:16): [True: 0, False: 13.2k]
  |  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|  13.2k|            pArch = ret.first;
  545|  13.2k|        }
  546|       |
  547|  13.2k|        if (pArch)
  ------------------
  |  Branch (547:13): [True: 0, False: 13.2k]
  ------------------
  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|  13.2k|        if(!throwOnFailure)
  ------------------
  |  Branch (555:12): [True: 0, False: 13.2k]
  ------------------
  556|      0|            return DataStreamPtr();
  557|       |
  558|  13.2k|        OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND, "Cannot locate resource " + 
  559|  13.2k|            resourceName + " in resource group " + groupName + ".", 
  560|  13.2k|            "ResourceGroupManager::openResource");
  561|       |
  562|  13.2k|    }
_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|  9.50k|    {
  864|  9.50k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (864:13): [True: 0, False: 9.50k]
  |  Branch (864:30): [True: 0, False: 0]
  ------------------
  865|      0|        {
  866|       |            // Use current group (batch loading)
  867|      0|            addCreatedResource(res, *mCurrentGroup);
  868|      0|        }
  869|  9.50k|        else
  870|  9.50k|        {
  871|       |            // Find group
  872|  9.50k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  873|  9.50k|            if (grp)
  ------------------
  |  Branch (873:17): [True: 9.50k, False: 0]
  ------------------
  874|  9.50k|            {
  875|  9.50k|                addCreatedResource(res, *grp);
  876|  9.50k|            }
  877|  9.50k|        }
  878|       |
  879|  9.50k|        fireResourceCreated(res);
  880|  9.50k|    }
_ZNK4Ogre20ResourceGroupManager22_notifyResourceRemovedERKNS_9SharedPtrINS_8ResourceEEE:
  883|  6.68k|    {
  884|  6.68k|        fireResourceRemove(res);
  885|       |
  886|  6.68k|        if (mCurrentGroup && res->getGroup() == mCurrentGroup->name)
  ------------------
  |  Branch (886:13): [True: 0, False: 6.68k]
  |  Branch (886:30): [True: 0, False: 0]
  ------------------
  887|      0|        {
  888|       |            // Do nothing - we're batch unloading so list will be cleared
  889|      0|        }
  890|  6.68k|        else
  891|  6.68k|        {
  892|       |            // Find group
  893|  6.68k|            ResourceGroup* grp = getResourceGroup(res->getGroup());
  894|  6.68k|            if (grp)
  ------------------
  |  Branch (894:17): [True: 6.68k, False: 0]
  ------------------
  895|  6.68k|            {
  896|  6.68k|                            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
  897|  6.68k|                ResourceGroup::LoadResourceOrderMap::iterator i = 
  898|  6.68k|                    grp->loadResourceOrderMap.find(
  899|  6.68k|                        res->getCreator()->getLoadingOrder());
  900|  6.68k|                if (i != grp->loadResourceOrderMap.end())
  ------------------
  |  Branch (900:21): [True: 6.68k, False: 0]
  ------------------
  901|  6.68k|                {
  902|       |                    // Iterate over the resource list and remove
  903|  6.68k|                    LoadUnloadResourceList& resList = i->second;
  904|  6.68k|                    for (LoadUnloadResourceList::iterator l = resList.begin();
  905|   437k|                        l != resList.end(); ++ l)
  ------------------
  |  Branch (905:25): [True: 437k, False: 0]
  ------------------
  906|   437k|                    {
  907|   437k|                        if ((*l).get() == res.get())
  ------------------
  |  Branch (907:29): [True: 6.68k, False: 431k]
  ------------------
  908|  6.68k|                        {
  909|       |                            // this is the one
  910|  6.68k|                            resList.erase(l);
  911|  6.68k|                            break;
  912|  6.68k|                        }
  913|   437k|                    }
  914|  6.68k|                }
  915|  6.68k|            }
  916|  6.68k|        }
  917|  6.68k|    }
_ZNK4Ogre20ResourceGroupManager18addCreatedResourceERNS_9SharedPtrINS_8ResourceEEERNS0_13ResourceGroupE:
  990|  9.50k|    {
  991|  9.50k|            OGRE_LOCK_MUTEX(grp.OGRE_AUTO_MUTEX_NAME);
  992|  9.50k|        Real order = res->getCreator()->getLoadingOrder();
  993|       |
  994|  9.50k|        ResourceGroup::LoadResourceOrderMap::iterator i = grp.loadResourceOrderMap.find(order);
  995|  9.50k|        LoadUnloadResourceList& loadList =
  996|  9.50k|            i == grp.loadResourceOrderMap.end() ? grp.loadResourceOrderMap[order] : i->second;
  ------------------
  |  Branch (996:13): [True: 3, False: 9.50k]
  ------------------
  997|       |
  998|  9.50k|        loadList.push_back(res);
  999|  9.50k|    }
_ZNK4Ogre20ResourceGroupManager16getResourceGroupERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 1003|   271k|    {
 1004|   271k|        OGRE_LOCK_AUTO_MUTEX;
 1005|   271k|        ResourceGroupMap::const_iterator i = mResourceGroupMap.find(name);
 1006|       |
 1007|   271k|        if (i == mResourceGroupMap.end())
  ------------------
  |  Branch (1007:13): [True: 3, False: 271k]
  ------------------
 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|   271k|        return i->second;
 1016|   271k|    }
_ZNK4Ogre20ResourceGroupManager19fireResourceCreatedERKNS_9SharedPtrINS_8ResourceEEE:
 1203|  9.50k|    {
 1204|  9.50k|        OGRE_LOCK_AUTO_MUTEX;
 1205|  9.50k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1205:21): [True: 0, False: 9.50k]
  ------------------
 1206|      0|        {
 1207|      0|            l->resourceCreated(resource);
 1208|      0|        }
 1209|  9.50k|    }
_ZNK4Ogre20ResourceGroupManager18fireResourceRemoveERKNS_9SharedPtrINS_8ResourceEEE:
 1212|  6.68k|    {
 1213|  6.68k|        OGRE_LOCK_AUTO_MUTEX;
 1214|  6.68k|        for (auto l : mResourceGroupListenerList)
  ------------------
  |  Branch (1214:21): [True: 0, False: 6.68k]
  ------------------
 1215|      0|        {
 1216|      0|            l->resourceRemove(resource);
 1217|      0|        }
 1218|  6.68k|    }
_ZNK4Ogre20ResourceGroupManager14resourceExistsEPNS0_13ResourceGroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1317|  53.0k|    {
 1318|       |
 1319|  53.0k|            OGRE_LOCK_MUTEX(grp->OGRE_AUTO_MUTEX_NAME); // lock group mutex
 1320|       |
 1321|       |        // Try indexes first
 1322|  53.0k|        ResourceLocationIndex::iterator rit = grp->resourceIndexCaseSensitive.find(resourceName);
 1323|  53.0k|        if (rit != grp->resourceIndexCaseSensitive.end())
  ------------------
  |  Branch (1323:13): [True: 0, False: 53.0k]
  ------------------
 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|  53.0k|        return NULL;
 1351|       |
 1352|  53.0k|    }
_ZNK4Ogre20ResourceGroupManager28resourceExistsInAnyGroupImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1374|  13.2k|    {
 1375|  13.2k|        OgreAssert(!filename.empty(), "resourceName is empty string");
  ------------------
  |  Branch (1375:9): [True: 0, False: 13.2k]
  ------------------
 1376|  13.2k|            OGRE_LOCK_AUTO_MUTEX;
 1377|       |
 1378|       |            // Iterate over resource groups and find
 1379|  13.2k|        for (const auto & i : mResourceGroupMap)
  ------------------
  |  Branch (1379:29): [True: 39.7k, False: 13.2k]
  ------------------
 1380|  39.7k|        {
 1381|  39.7k|            Archive* arch = resourceExists(i.second, filename);
 1382|  39.7k|            if (arch)
  ------------------
  |  Branch (1382:17): [True: 0, False: 39.7k]
  ------------------
 1383|      0|                return std::make_pair(arch, i.second);
 1384|  39.7k|        }
 1385|       |        // Not found
 1386|  13.2k|        return std::pair<Archive*, ResourceGroup*>();
 1387|  13.2k|    }
_ZNK4Ogre20ResourceGroupManager27isResourceGroupInGlobalPoolERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1462|   242k|    {
 1463|   242k|        return getResourceGroup(name, true)->inGlobalPool;
 1464|   242k|    }
_ZNK4Ogre20ResourceGroupManager18getLoadingListenerEv:
 1495|  9.50k|    {
 1496|  9.50k|        return mLoadingListener;
 1497|  9.50k|    }

_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|  9.51k|    {
   54|  9.51k|        OgreAssert(!name.empty(), "resource name must not be empty");
  ------------------
  |  Branch (54:9): [True: 2, False: 9.50k]
  ------------------
   55|       |
   56|       |        // Call creation implementation
   57|  9.50k|        ResourcePtr ret = ResourcePtr(
   58|  9.50k|            createImpl(name, getNextHandle(), group, isManual, loader, params));
   59|  9.50k|        if (params)
  ------------------
  |  Branch (59:13): [True: 0, False: 9.50k]
  ------------------
   60|      0|            ret->setParameterList(*params);
   61|       |
   62|  9.50k|        addImpl(ret);
   63|       |        // Tell resource group manager
   64|  9.50k|        if(ret)
  ------------------
  |  Branch (64:12): [True: 9.50k, False: 0]
  ------------------
   65|  9.50k|            ResourceGroupManager::getSingleton()._notifyResourceCreated(ret);
   66|  9.50k|        return ret;
   67|       |
   68|  9.51k|    }
_ZN4Ogre15ResourceManager16createOrRetrieveERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
   75|  13.2k|    {
   76|       |        // Lock for the whole get / insert
   77|  13.2k|            OGRE_LOCK_AUTO_MUTEX;
   78|       |
   79|  13.2k|        ResourcePtr res = getResourceByName(name, group);
   80|  13.2k|        bool created = false;
   81|  13.2k|        if (!res)
  ------------------
  |  Branch (81:13): [True: 2.82k, False: 10.4k]
  ------------------
   82|  2.82k|        {
   83|  2.82k|            created = true;
   84|  2.82k|            res = createResource(name, group, isManual, loader, params);
   85|  2.82k|        }
   86|       |
   87|  13.2k|        return ResourceCreateOrRetrieveResult(res, created);
   88|  13.2k|    }
_ZN4Ogre15ResourceManager7prepareERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
   93|    131|    {
   94|    131|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
   95|       |        // ensure prepared
   96|    131|        r->prepare(backgroundThread);
   97|    131|        return r;
   98|    131|    }
_ZN4Ogre15ResourceManager4loadERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_bPNS_20ManualResourceLoaderEPKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEEb:
  103|  13.1k|    {
  104|  13.1k|        ResourcePtr r = createOrRetrieve(name,group,isManual,loader,loadParams).first;
  105|       |        // ensure loaded
  106|  13.1k|        r->load(backgroundThread);
  107|       |
  108|  13.1k|        return r;
  109|  13.1k|    }
_ZN4Ogre15ResourceManager7addImplERNS_9SharedPtrINS_8ResourceEEE:
  112|  9.50k|    {
  113|  9.50k|            OGRE_LOCK_AUTO_MUTEX;
  114|       |
  115|  9.50k|            std::pair<ResourceMap::iterator, bool> result;
  116|  9.50k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (116:12): [True: 9.50k, False: 0]
  ------------------
  117|  9.50k|        {
  118|  9.50k|            result = mResources.emplace(res->getName(), res);
  119|  9.50k|        }
  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|  9.50k|        ResourceLoadingListener* listener = ResourceGroupManager::getSingleton().getLoadingListener();
  129|  9.50k|        if (!result.second && listener)
  ------------------
  |  Branch (129:13): [True: 0, False: 9.50k]
  |  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|  9.50k|        if (!result.second)
  ------------------
  |  Branch (150:13): [True: 0, False: 9.50k]
  ------------------
  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|  9.50k|        std::pair<ResourceHandleMap::iterator, bool> resultHandle = mResourcesByHandle.emplace(res->getHandle(), res);
  158|  9.50k|        if (!resultHandle.second)
  ------------------
  |  Branch (158:13): [True: 0, False: 9.50k]
  ------------------
  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|  9.50k|    }
_ZN4Ogre15ResourceManager10removeImplERKNS_9SharedPtrINS_8ResourceEEE:
  167|  6.68k|    {
  168|  6.68k|        OgreAssert(res, "attempting to remove nullptr");
  ------------------
  |  Branch (168:9): [True: 0, False: 6.68k]
  ------------------
  169|       |
  170|  6.68k|#if OGRE_RESOURCEMANAGER_STRICT
  171|  6.68k|        if (res->getCreator() != this)
  ------------------
  |  Branch (171:13): [True: 0, False: 6.68k]
  ------------------
  172|  6.68k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Resource '" + res->getName() + "' was not created by the '" +
  173|  6.68k|                                                          getResourceType() + "' ResourceManager");
  174|  6.68k|#endif
  175|       |
  176|  6.68k|        OGRE_LOCK_AUTO_MUTEX;
  177|       |
  178|  6.68k|        if(ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(res->getGroup()))
  ------------------
  |  Branch (178:12): [True: 6.68k, False: 0]
  ------------------
  179|  6.68k|        {
  180|  6.68k|            ResourceMap::iterator nameIt = mResources.find(res->getName());
  181|  6.68k|            if (nameIt != mResources.end())
  ------------------
  |  Branch (181:17): [True: 6.68k, False: 0]
  ------------------
  182|  6.68k|            {
  183|  6.68k|                mResources.erase(nameIt);
  184|  6.68k|            }
  185|  6.68k|        }
  186|      0|        else
  187|      0|        {
  188|      0|            ResourceWithGroupMap::iterator groupIt = mResourcesWithGroup.find(res->getGroup());
  189|      0|            if (groupIt != mResourcesWithGroup.end())
  ------------------
  |  Branch (189:17): [True: 0, False: 0]
  ------------------
  190|      0|            {
  191|      0|                ResourceMap::iterator nameIt = groupIt->second.find(res->getName());
  192|      0|                if (nameIt != groupIt->second.end())
  ------------------
  |  Branch (192:21): [True: 0, False: 0]
  ------------------
  193|      0|                {
  194|      0|                    groupIt->second.erase(nameIt);
  195|      0|                }
  196|       |
  197|      0|                if (groupIt->second.empty())
  ------------------
  |  Branch (197:21): [True: 0, False: 0]
  ------------------
  198|      0|                {
  199|      0|                    mResourcesWithGroup.erase(groupIt);
  200|      0|                }
  201|      0|            }
  202|      0|        }
  203|       |
  204|  6.68k|        ResourceHandleMap::iterator handleIt = mResourcesByHandle.find(res->getHandle());
  205|  6.68k|        if (handleIt != mResourcesByHandle.end())
  ------------------
  |  Branch (205:13): [True: 6.68k, False: 0]
  ------------------
  206|  6.68k|        {
  207|  6.68k|            mResourcesByHandle.erase(handleIt);
  208|  6.68k|        }
  209|       |        // Tell resource group manager
  210|  6.68k|        ResourceGroupManager::getSingleton()._notifyResourceRemoved(res);
  211|  6.68k|    }
_ZN4Ogre15ResourceManager6removeERKNS_9SharedPtrINS_8ResourceEEE:
  298|  6.68k|    {
  299|  6.68k|        removeImpl(res);
  300|  6.68k|    }
_ZNK4Ogre15ResourceManager17getResourceByNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  380|   225k|    {
  381|   225k|        OGRE_LOCK_AUTO_MUTEX;
  382|       |
  383|       |        // resource should be in global pool
  384|   225k|        bool isGlobal = ResourceGroupManager::getSingleton().isResourceGroupInGlobalPool(groupName);
  385|       |
  386|   225k|        if(isGlobal)
  ------------------
  |  Branch (386:12): [True: 225k, False: 0]
  ------------------
  387|   225k|        {
  388|   225k|            auto it = mResources.find(name);
  389|   225k|            if( it != mResources.end())
  ------------------
  |  Branch (389:17): [True: 10.4k, False: 215k]
  ------------------
  390|  10.4k|            {
  391|  10.4k|                return it->second;
  392|  10.4k|            }
  393|   225k|        }
  394|       |
  395|       |        // look in all grouped pools
  396|   215k|        if (groupName == ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
  ------------------
  |  Branch (396:13): [True: 0, False: 215k]
  ------------------
  397|      0|        {
  398|      0|            for (auto& r : mResourcesWithGroup)
  ------------------
  |  Branch (398:26): [True: 0, False: 0]
  ------------------
  399|      0|            {
  400|      0|                auto resMapIt = r.second.find(name);
  401|       |
  402|      0|                if( resMapIt != r.second.end())
  ------------------
  |  Branch (402:21): [True: 0, False: 0]
  ------------------
  403|      0|                {
  404|      0|                    return resMapIt->second;
  405|      0|                }
  406|      0|            }
  407|      0|        }
  408|   215k|        else if (!isGlobal)
  ------------------
  |  Branch (408:18): [True: 0, False: 215k]
  ------------------
  409|      0|        {
  410|       |            // look in the grouped pool
  411|      0|            auto itGroup = mResourcesWithGroup.find(groupName);
  412|      0|            if (itGroup != mResourcesWithGroup.end())
  ------------------
  |  Branch (412:17): [True: 0, False: 0]
  ------------------
  413|      0|            {
  414|      0|                auto it = itGroup->second.find(name);
  415|       |
  416|      0|                if( it != itGroup->second.end())
  ------------------
  |  Branch (416:21): [True: 0, False: 0]
  ------------------
  417|      0|                {
  418|      0|                    return it->second;
  419|      0|                }
  420|      0|            }
  421|       |
  422|       |#if !OGRE_RESOURCEMANAGER_STRICT
  423|       |            // fall back to global
  424|       |            auto it = mResources.find(name);
  425|       |            if( it != mResources.end())
  426|       |            {
  427|       |                return it->second;
  428|       |            }
  429|       |#endif
  430|      0|        }
  431|       |    
  432|   215k|        return ResourcePtr();
  433|   215k|    }
_ZN4Ogre15ResourceManager13getNextHandleEv:
  443|  9.50k|    {
  444|       |        // This is an atomic operation and hence needs no locking
  445|  9.50k|        return mNextHandle++;
  446|  9.50k|    }
_ZN4Ogre15ResourceManager10checkUsageEv:
  449|  5.56k|    {
  450|  5.56k|        if (getMemoryUsage() > mMemoryBudget)
  ------------------
  |  Branch (450:13): [True: 0, False: 5.56k]
  ------------------
  451|      0|        {
  452|      0|            OGRE_LOCK_AUTO_MUTEX;
  453|       |            // unload unreferenced resources until we are within our budget again
  454|      0|            ResourceMap::iterator i, iend;
  455|      0|            iend = mResources.end();
  456|      0|            for (i = mResources.begin(); i != iend && getMemoryUsage() > mMemoryBudget; ++i)
  ------------------
  |  Branch (456:42): [True: 0, False: 0]
  |  Branch (456:55): [True: 0, False: 0]
  ------------------
  457|      0|            {
  458|       |                // A use count of 3 means that only RGM and RM have references
  459|       |                // RGM has one (this one) and RM has 2 (by name and by handle)
  460|      0|                if (i->second.use_count() == ResourceGroupManager::RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS)
  ------------------
  |  Branch (460:21): [True: 0, False: 0]
  ------------------
  461|      0|                {
  462|      0|                    Resource* res = i->second.get();
  463|      0|                    if (res->isReloadable())
  ------------------
  |  Branch (463:25): [True: 0, False: 0]
  ------------------
  464|      0|                    {
  465|      0|                        res->unload();
  466|      0|                    }
  467|      0|                }
  468|      0|            }
  469|      0|        }
  470|  5.56k|    }
_ZN4Ogre15ResourceManager21_notifyResourceLoadedEPNS_8ResourceE:
  478|  5.56k|    {
  479|  5.56k|        mMemoryUsage += res->getSize();
  480|  5.56k|        checkUsage();
  481|  5.56k|    }
_ZN4Ogre15ResourceManager23_notifyResourceUnloadedEPNS_8ResourceE:
  484|  5.56k|    {
  485|  5.56k|        mMemoryUsage -= res->getSize();
  486|  5.56k|    }

_ZN4Ogre4Root15getSingletonPtrEv:
   82|   146k|    {
   83|   146k|        return msSingleton;
   84|   146k|    }

_ZN4Ogre10SerializerC2Ev:
   36|  31.0k|        mVersion("[Serializer_v1.00]"), // Version number
   37|  31.0k|        mFlipEndian(false),
   38|  31.0k|        mReportChunkErrors(true)
   39|  31.0k|    {
   40|  31.0k|    }
_ZN4Ogre10SerializerD2Ev:
   44|  31.0k|    {
   45|  31.0k|    }
_ZN4Ogre10Serializer19determineEndiannessERKNS_9SharedPtrINS_10DataStreamEEE:
   48|  12.1k|    {
   49|  12.1k|        if (stream->tell() != 0)
  ------------------
  |  Branch (49:13): [True: 0, False: 12.1k]
  ------------------
   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|  12.1k|        uint16 dest;
   57|       |        // read header id manually (no conversion)
   58|  12.1k|        size_t actually_read = stream->read(&dest, sizeof(uint16));
   59|       |        // skip back
   60|  12.1k|        stream->skip(0 - (long)actually_read);
   61|  12.1k|        if (actually_read != sizeof(uint16))
  ------------------
  |  Branch (61:13): [True: 4, False: 12.1k]
  ------------------
   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|  12.1k|        if (dest == HEADER_STREAM_ID)
  ------------------
  |  Branch (68:13): [True: 3.49k, False: 8.62k]
  ------------------
   69|  3.49k|        {
   70|  3.49k|            mFlipEndian = false;
   71|  3.49k|        }
   72|  8.62k|        else if (dest == OTHER_ENDIAN_HEADER_STREAM_ID)
  ------------------
  |  Branch (72:18): [True: 8.58k, False: 43]
  ------------------
   73|  8.58k|        {
   74|  8.58k|            mFlipEndian = true;
   75|  8.58k|        }
   76|     43|        else
   77|     43|        {
   78|       |            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
   79|     43|                "Header chunk didn't match either endian: Corrupted stream?",
   80|     43|                "Serializer::determineEndianness");
   81|     43|        }
   82|  12.1k|    }
_ZN4Ogre10Serializer14readFileHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  233|  5.44k|    {
  234|  5.44k|        unsigned short headerID;
  235|       |        
  236|       |        // Read header ID
  237|  5.44k|        readShorts(stream, &headerID, 1);
  238|       |        
  239|  5.44k|        if (headerID == HEADER_STREAM_ID)
  ------------------
  |  Branch (239:13): [True: 5.44k, False: 0]
  ------------------
  240|  5.44k|        {
  241|       |            // Read version
  242|  5.44k|            String ver = readString(stream);
  243|  5.44k|            if (ver != mVersion)
  ------------------
  |  Branch (243:17): [True: 0, False: 5.44k]
  ------------------
  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|  5.44k|        }
  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|  5.44k|    }
_ZN4Ogre10Serializer9readChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  260|   989k|    {
  261|   989k|        size_t pos = stream->tell();
  262|   989k|        unsigned short id;
  263|   989k|        readShorts(stream, &id, 1);
  264|       |        
  265|   989k|        readInts(stream, &mCurrentstreamLen, 1);
  266|       |
  267|   989k|        if (!stream->eof())
  ------------------
  |  Branch (267:13): [True: 983k, False: 5.73k]
  ------------------
  268|   983k|        {
  269|       |            // chunk size cant be smaller than the header size, and must fit within the stream
  270|   983k|            if (mCurrentstreamLen < calcChunkHeaderSize())
  ------------------
  |  Branch (270:17): [True: 590, False: 983k]
  ------------------
  271|   983k|                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Corrupt chunk length");
  272|       |
  273|   983k|            if (pos + mCurrentstreamLen > stream->size())
  ------------------
  |  Branch (273:17): [True: 59.6k, False: 923k]
  ------------------
  274|  59.6k|            {
  275|  59.6k|                if (mReportChunkErrors)
  ------------------
  |  Branch (275:21): [True: 436, False: 59.2k]
  ------------------
  276|  59.6k|                    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|  59.2k|                LogManager::getSingleton().stream(LML_WARNING)
  281|  59.2k|                    << "Chunk " << id << " in '" << stream->getName()
  282|  59.2k|                    << "' extends past the end of the stream, clamping to stream size";
  283|  59.2k|                mCurrentstreamLen = static_cast<uint32>(stream->size() - pos);
  284|  59.2k|            }
  285|   983k|        }
  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|   988k|        return id;
  296|   989k|    }
_ZN4Ogre10Serializer9readBoolsERKNS_9SharedPtrINS_10DataStreamEEEPbm:
  299|   436M|    {
  300|   436M|        static_assert(sizeof(bool) == 1, "add conversion to char for your platform");
  301|   436M|        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|   873M|        for (size_t i = 0; i < count; ++i)
  ------------------
  |  Branch (304:28): [True: 436M, False: 436M]
  ------------------
  305|   436M|        {
  306|   436M|            uint8_t raw;
  307|   436M|            memcpy(&raw, &pDest[i], 1);
  308|   436M|            pDest[i] = (raw != 0);
  309|   436M|        }
  310|   436M|    }
_ZN4Ogre10Serializer10readFloatsERKNS_9SharedPtrINS_10DataStreamEEEPfm:
  313|  55.8k|    {
  314|  55.8k|        stream->read(pDest, sizeof(float) * count);
  315|  55.8k|        flipFromLittleEndian(pDest, sizeof(float), count);
  316|  55.8k|    }
_ZN4Ogre10Serializer10readShortsERKNS_9SharedPtrINS_10DataStreamEEEPtm:
  334|  1.33M|    {
  335|  1.33M|        stream->read(pDest, sizeof(unsigned short) * count);
  336|  1.33M|        flipFromLittleEndian(pDest, sizeof(unsigned short), count);
  337|  1.33M|    }
_ZN4Ogre10Serializer8readIntsERKNS_9SharedPtrINS_10DataStreamEEEPjm:
  340|  1.31G|    {
  341|  1.31G|        stream->read(pDest, sizeof(uint32) * count);
  342|  1.31G|        flipFromLittleEndian(pDest, sizeof(uint32), count);
  343|  1.31G|    }
_ZN4Ogre10Serializer10readStringERKNS_9SharedPtrINS_10DataStreamEEE:
  346|   287k|    {
  347|   287k|        return stream->getLine(false);
  348|   287k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_6VectorILi3EfEE:
  367|  2.18k|    {
  368|  2.18k|        readFloats(stream, pDest.ptr(), 3);
  369|  2.18k|    }
_ZN4Ogre10Serializer10readObjectERKNS_9SharedPtrINS_10DataStreamEEERNS_10QuaternionE:
  372|  1.89k|    {
  373|  1.89k|        float tmp[4];
  374|  1.89k|        readFloats(stream, tmp, 4);
  375|  1.89k|        pDest.x = tmp[0];
  376|  1.89k|        pDest.y = tmp[1];
  377|  1.89k|        pDest.z = tmp[2];
  378|  1.89k|        pDest.w = tmp[3];
  379|  1.89k|    }
_ZN4Ogre10Serializer20flipFromLittleEndianEPvmm:
  392|  1.31G|    {
  393|  1.31G|        if(mFlipEndian)
  ------------------
  |  Branch (393:12): [True: 1.31G, False: 428k]
  ------------------
  394|  1.31G|        {
  395|  1.31G|	        Bitwise::bswapChunks(pData, size, count);
  396|  1.31G|        }
  397|  1.31G|    }
_ZN4Ogre10Serializer14pushInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  400|   457k|    {
  401|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  402|       |        mChunkSizeStack.push_back(stream->tell());
  403|       |#endif
  404|   457k|    }
_ZN4Ogre10Serializer20backpedalChunkHeaderERKNS_9SharedPtrINS_10DataStreamEEE:
  406|   419k|    {
  407|   419k|        if (!stream->eof()){
  ------------------
  |  Branch (407:13): [True: 419k, False: 0]
  ------------------
  408|   419k|            stream->skip(-(int)calcChunkHeaderSize());
  409|   419k|        }
  410|       |#if OGRE_SERIALIZER_VALIDATE_CHUNKSIZE
  411|       |        mChunkSizeStack.back() = stream->tell();
  412|       |#endif
  413|   419k|    }
_ZN4Ogre10Serializer13popInnerChunkERKNS_9SharedPtrINS_10DataStreamEEE:
  415|   446k|    {
  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|   446k|    }

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

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

_ZN4Ogre18SkeletonSerializerC2Ev:
   42|  14.3k|    {
   43|       |        // Version number
   44|       |        // NB changed to include bone names in 1.1
   45|  14.3k|        mVersion = "[Unknown]";
   46|  14.3k|    }
_ZN4Ogre18SkeletonSerializer14importSkeletonERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  105|  1.12k|    {
  106|       |        // Determine endianness (must be the first thing we do!)
  107|  1.12k|        determineEndianness(stream);
  108|       |
  109|       |        // Check header
  110|  1.12k|        unsigned short headerID;
  111|  1.12k|        readShorts(stream, &headerID, 1);
  112|  1.12k|        if (headerID != HEADER_STREAM_ID_EXT)
  ------------------
  |  Branch (112:13): [True: 0, False: 1.12k]
  ------------------
  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.12k|        String ver = readString(stream);
  120|  1.12k|        if ((ver != "[Serializer_v1.10]") &&
  ------------------
  |  Branch (120:13): [True: 1.04k, False: 77]
  ------------------
  121|  1.04k|            (ver != "[Serializer_v1.80]"))
  ------------------
  |  Branch (121:13): [True: 121, False: 922]
  ------------------
  122|    121|        {
  123|    121|            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR,
  124|    121|                "Invalid file: version incompatible, file reports " + String(ver),
  125|    121|                "SkeletonSerializer::importSkeleton");
  126|    121|        }
  127|    999|        mVersion = ver;
  128|       |
  129|    999|        pushInnerChunk(stream);
  130|    999|        unsigned short streamID = readChunk(stream);
  131|       |
  132|  4.76k|        while(!stream->eof())
  ------------------
  |  Branch (132:15): [True: 4.05k, False: 707]
  ------------------
  133|  4.05k|        {
  134|  4.05k|            switch (streamID)
  135|  4.05k|            {
  136|    248|            case SKELETON_BLENDMODE:
  ------------------
  |  Branch (136:13): [True: 248, False: 3.80k]
  ------------------
  137|    248|            {
  138|       |                // Optional blend mode
  139|    248|                uint16 blendMode;
  140|    248|                readShorts(stream, &blendMode, 1);
  141|    248|                pSkel->setBlendMode(static_cast<SkeletonAnimationBlendMode>(blendMode));
  142|    248|                break;
  143|      0|            }
  144|    716|            case SKELETON_BONE:
  ------------------
  |  Branch (144:13): [True: 716, False: 3.33k]
  ------------------
  145|    716|                readBone(stream, pSkel);
  146|    716|                break;
  147|     51|            case SKELETON_BONE_PARENT:
  ------------------
  |  Branch (147:13): [True: 51, False: 4.00k]
  ------------------
  148|     51|                readBoneParent(stream, pSkel);
  149|     51|                break;
  150|  2.55k|            case SKELETON_ANIMATION:
  ------------------
  |  Branch (150:13): [True: 2.55k, False: 1.49k]
  ------------------
  151|  2.55k|                readAnimation(stream, pSkel);
  152|  2.55k|                break;
  153|    131|            case SKELETON_ANIMATION_LINK:
  ------------------
  |  Branch (153:13): [True: 131, False: 3.92k]
  ------------------
  154|    131|                readSkeletonAnimationLink(stream, pSkel);
  155|    131|                break;
  156|    351|            default:
  ------------------
  |  Branch (156:13): [True: 351, False: 3.70k]
  ------------------
  157|    351|                break;
  158|  4.05k|            }
  159|       |
  160|  3.76k|            streamID = readChunk(stream);
  161|  3.76k|        }
  162|       |        // Assume bones are stored in the binding pose
  163|    707|        pSkel->setBindingPose();
  164|    707|        popInnerChunk(stream);
  165|       |
  166|    707|    }
_ZN4Ogre18SkeletonSerializer24calcBoneSizeWithoutScaleEPKNS_8SkeletonEPKNS_4BoneE:
  337|    684|    {
  338|    684|        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|    684|        size += sizeof(unsigned short);
  346|       |
  347|       |        // position
  348|    684|        size += sizeof(float) * 3;
  349|       |
  350|       |        // orientation
  351|    684|        size += sizeof(float) * 4;
  352|       |
  353|    684|        return size;
  354|    684|    }
_ZN4Ogre18SkeletonSerializer28calcKeyFrameSizeWithoutScaleEPKNS_8SkeletonEPKNS_17TransformKeyFrameE:
  432|  1.20k|    {
  433|  1.20k|        size_t size = SSTREAM_OVERHEAD_SIZE;
  434|       |
  435|       |        // float time                    : The time position (seconds)
  436|  1.20k|        size += sizeof(float);
  437|       |        // Quaternion rotate            : Rotation to apply at this keyframe
  438|  1.20k|        size += sizeof(float) * 4;
  439|       |        // Vector3 translate            : Translation to apply at this keyframe
  440|  1.20k|        size += sizeof(float) * 3;
  441|       |
  442|  1.20k|        return size;
  443|  1.20k|    }
_ZN4Ogre18SkeletonSerializer8readBoneERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  446|    716|    {
  447|       |        // char* name
  448|    716|        String name = readString(stream);
  449|       |        // unsigned short handle            : handle of the bone, should be contiguous & start at 0
  450|    716|        unsigned short handle;
  451|    716|        readShorts(stream, &handle, 1);
  452|       |
  453|    716|        if (handle > pSkel->getNumBones())
  ------------------
  |  Branch (453:13): [True: 23, False: 693]
  ------------------
  454|    716|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone handles must be contiguous");
  455|       |
  456|       |        // Create new bone
  457|    693|        Bone* pBone = pSkel->createBone(name, handle);
  458|       |
  459|       |        // Vector3 position                 : position of this bone relative to parent 
  460|    693|        Vector3 pos;
  461|    693|        readObject(stream, pos);
  462|    693|        pBone->setPosition(pos);
  463|       |        // Quaternion orientation           : orientation of this bone relative to parent 
  464|    693|        Quaternion q;
  465|    693|        readObject(stream, q);
  466|    693|        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|    693|        if (mCurrentstreamLen > calcBoneSizeWithoutScale(pSkel, pBone))
  ------------------
  |  Branch (475:13): [True: 20, False: 673]
  ------------------
  476|     20|        {
  477|     20|            Vector3 scale;
  478|     20|            readObject(stream, scale);
  479|     20|            pBone->setScale(scale);
  480|     20|        }
  481|       |        
  482|    693|    }
_ZN4Ogre18SkeletonSerializer14readBoneParentERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  485|     51|    {
  486|       |        // All bones have been created by this point
  487|     51|        Bone *child, *parent;
  488|     51|        unsigned short childHandle, parentHandle;
  489|       |
  490|       |        // unsigned short handle             : child bone
  491|     51|        readShorts(stream, &childHandle, 1);
  492|       |        // unsigned short parentHandle   : parent bone
  493|     51|        readShorts(stream, &parentHandle, 1);
  494|       |
  495|     51|        auto numBones = pSkel->getBones().size();
  496|     51|        if (parentHandle >= numBones || childHandle >= numBones)
  ------------------
  |  Branch (496:13): [True: 16, False: 35]
  |  Branch (496:41): [True: 16, False: 19]
  ------------------
  497|     51|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone handle out of range");
  498|       |
  499|     19|        if (childHandle == parentHandle)
  ------------------
  |  Branch (499:13): [True: 4, False: 15]
  ------------------
  500|     19|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "A bone cannot be parent of itself");
  501|       |
  502|       |        // Find bones
  503|     15|        parent = pSkel->getBone(parentHandle);
  504|     15|        child = pSkel->getBone(childHandle);
  505|       |
  506|       |        // A malformed file can attach a bone below one of its own descendants. The
  507|       |        // resulting cycle makes derived transform updates recurse until the stack
  508|       |        // overflows, so reject it before modifying the graph.
  509|     30|        for (const Node* p = parent; p; p = p->getParent())
  ------------------
  |  Branch (509:38): [True: 19, False: 11]
  ------------------
  510|     19|        {
  511|     19|            if (p == child)
  ------------------
  |  Branch (511:17): [True: 4, False: 15]
  ------------------
  512|     19|                OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Bone parent cycle detected");
  513|     19|        }
  514|       |
  515|       |        // attach
  516|     11|        parent->addChild(child);
  517|       |
  518|     11|    }
_ZN4Ogre18SkeletonSerializer13readAnimationERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  521|  2.55k|    {
  522|       |        // char* name                       : Name of the animation
  523|  2.55k|        String name;
  524|  2.55k|        name = readString(stream);
  525|       |        // float length                      : Length of the animation in seconds
  526|  2.55k|        float len;
  527|  2.55k|        readFloats(stream, &len, 1);
  528|       |
  529|  2.55k|        Animation *pAnim = pSkel->createAnimation(name, len);
  530|       |        // Read all tracks
  531|  2.55k|        if (!stream->eof())
  ------------------
  |  Branch (531:13): [True: 2.36k, False: 191]
  ------------------
  532|  2.36k|        {
  533|  2.36k|            pushInnerChunk(stream);
  534|  2.36k|            unsigned short streamID = readChunk(stream);
  535|       |            // Optional base info is possible
  536|  2.36k|            if (streamID == SKELETON_ANIMATION_BASEINFO)
  ------------------
  |  Branch (536:17): [True: 168, False: 2.19k]
  ------------------
  537|    168|            {
  538|       |                // char baseAnimationName
  539|    168|                String baseAnimName = readString(stream);
  540|       |                // float baseKeyFrameTime
  541|    168|                float baseKeyTime;
  542|    168|                readFloats(stream, &baseKeyTime, 1);
  543|       |                
  544|    168|                pAnim->setUseBaseKeyFrame(true, baseKeyTime, baseAnimName);
  545|       |                
  546|    168|                if (!stream->eof())
  ------------------
  |  Branch (546:21): [True: 160, False: 8]
  ------------------
  547|    160|                {
  548|       |                    // Get next stream
  549|    160|                    streamID = readChunk(stream);
  550|    160|                }
  551|    168|            }
  552|       |            
  553|  2.58k|            while(streamID == SKELETON_ANIMATION_TRACK && !stream->eof())
  ------------------
  |  Branch (553:19): [True: 277, False: 2.30k]
  |  Branch (553:59): [True: 216, False: 61]
  ------------------
  554|    216|            {
  555|    216|                readAnimationTrack(stream, pAnim, pSkel);
  556|       |
  557|    216|                if (!stream->eof())
  ------------------
  |  Branch (557:21): [True: 129, False: 87]
  ------------------
  558|    129|                {
  559|       |                    // Get next stream
  560|    129|                    streamID = readChunk(stream);
  561|    129|                }
  562|    216|            }
  563|  2.36k|            if (!stream->eof())
  ------------------
  |  Branch (563:17): [True: 2.18k, False: 187]
  ------------------
  564|  2.18k|            {
  565|       |                // Backpedal back to start of this stream if we've found a non-track
  566|  2.18k|                backpedalChunkHeader(stream);
  567|  2.18k|            }
  568|  2.36k|            popInnerChunk(stream);
  569|  2.36k|        }
  570|  2.55k|    }
_ZN4Ogre18SkeletonSerializer18readAnimationTrackERNS_9SharedPtrINS_10DataStreamEEEPNS_9AnimationEPNS_8SkeletonE:
  574|    216|    {
  575|       |        // unsigned short boneIndex     : Index of bone to apply to
  576|    216|        unsigned short boneHandle;
  577|    216|        readShorts(stream, &boneHandle, 1);
  578|       |
  579|       |        // Find bone
  580|    216|        if (boneHandle >= pSkel->getBones().size())
  ------------------
  |  Branch (580:13): [True: 17, False: 199]
  ------------------
  581|    216|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Animation track boneHandle out of range");
  582|    199|        Bone* targetBone = pSkel->getBone(boneHandle);
  583|       |
  584|       |        // Create track
  585|    199|        NodeAnimationTrack* pTrack = anim->createNodeTrack(boneHandle, targetBone);
  586|       |
  587|       |        // Keep looking for nested keyframes
  588|    199|        if (!stream->eof())
  ------------------
  |  Branch (588:13): [True: 193, False: 6]
  ------------------
  589|    193|        {
  590|    193|            pushInnerChunk(stream);
  591|    193|            unsigned short streamID = readChunk(stream);
  592|  1.40k|            while(streamID == SKELETON_ANIMATION_TRACK_KEYFRAME && !stream->eof())
  ------------------
  |  Branch (592:19): [True: 1.23k, False: 161]
  |  Branch (592:68): [True: 1.20k, False: 32]
  ------------------
  593|  1.20k|            {
  594|  1.20k|                readKeyFrame(stream, pTrack, pSkel);
  595|       |
  596|  1.20k|                if (!stream->eof())
  ------------------
  |  Branch (596:21): [True: 1.17k, False: 28]
  ------------------
  597|  1.17k|                {
  598|       |                    // Get next stream
  599|  1.17k|                    streamID = readChunk(stream);
  600|  1.17k|                }
  601|  1.20k|            }
  602|    193|            if (!stream->eof())
  ------------------
  |  Branch (602:17): [True: 129, False: 64]
  ------------------
  603|    129|            {
  604|       |                // Backpedal back to start of this stream if we've found a non-keyframe
  605|    129|                backpedalChunkHeader(stream);
  606|    129|            }
  607|    193|            popInnerChunk(stream);
  608|    193|        }
  609|       |
  610|       |
  611|    199|    }
_ZN4Ogre18SkeletonSerializer12readKeyFrameERNS_9SharedPtrINS_10DataStreamEEEPNS_18NodeAnimationTrackEPNS_8SkeletonE:
  615|  1.20k|    {
  616|       |        // float time                    : The time position (seconds)
  617|  1.20k|        float time;
  618|  1.20k|        readFloats(stream, &time, 1);
  619|       |
  620|  1.20k|        TransformKeyFrame *kf = track->createNodeKeyFrame(time);
  621|       |
  622|       |        // Quaternion rotate            : Rotation to apply at this keyframe
  623|  1.20k|        Quaternion rot;
  624|  1.20k|        readObject(stream, rot);
  625|  1.20k|        kf->setRotation(rot);
  626|       |        // Vector3 translate            : Translation to apply at this keyframe
  627|  1.20k|        Vector3 trans;
  628|  1.20k|        readObject(stream, trans);
  629|  1.20k|        kf->setTranslate(trans);
  630|       |        // Do we have scale?
  631|  1.20k|        if (mCurrentstreamLen > calcKeyFrameSizeWithoutScale(pSkel, kf))
  ------------------
  |  Branch (631:13): [True: 274, False: 933]
  ------------------
  632|    274|        {
  633|    274|            Vector3 scale;
  634|    274|            readObject(stream, scale);
  635|    274|            kf->setScale(scale);
  636|    274|        }
  637|  1.20k|    }
_ZN4Ogre18SkeletonSerializer25readSkeletonAnimationLinkERNS_9SharedPtrINS_10DataStreamEEEPNS_8SkeletonE:
  668|    131|    {
  669|       |        // char* skeletonName
  670|    131|        String skelName = readString(stream);
  671|       |        // float scale
  672|    131|        float scale;
  673|    131|        readFloats(stream, &scale, 1);
  674|       |
  675|    131|        pSkel->addLinkedSkeletonAnimationSource(skelName, scale);
  676|       |
  677|    131|    }

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

_ZN4Ogre10StringUtil4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbb:
   42|  72.0k|    {
   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|  72.0k|        static const String delims = " \t\r\n";
   67|  72.0k|        if(right)
  ------------------
  |  Branch (67:12): [True: 72.0k, False: 0]
  ------------------
   68|  72.0k|            str.erase(str.find_last_not_of(delims)+1); // trim right
   69|  72.0k|        if(left)
  ------------------
  |  Branch (69:12): [True: 72.0k, False: 0]
  ------------------
   70|  72.0k|            str.erase(0, str.find_first_not_of(delims)); // trim left
   71|  72.0k|    }
_ZN4Ogre10StringUtil6formatEPKcz:
  465|   212k|    {
  466|       |        // try to use a stack buffer and fall back to heap for large strings
  467|   212k|        char sbuf[1024];
  468|   212k|        size_t bsize = sizeof(sbuf);
  469|   212k|        std::vector<char> hbuf;
  470|   212k|        char* pbuf = sbuf;
  471|       |
  472|   212k|        while (true)
  ------------------
  |  Branch (472:16): [True: 212k, Folded]
  ------------------
  473|   212k|        {
  474|   212k|            va_list va;
  475|   212k|            va_start(va, fmt);
  476|   212k|            int len = vsnprintf(pbuf, bsize, fmt, va);
  477|   212k|            va_end(va);
  478|       |
  479|   212k|            OgreAssert(len >= 0, "Check format string for errors");
  ------------------
  |  Branch (479:13): [True: 0, False: 212k]
  ------------------
  480|   212k|            if (size_t(len) >= bsize)
  ------------------
  |  Branch (480:17): [True: 284, False: 212k]
  ------------------
  481|    284|            {
  482|    284|                hbuf.resize(len + 1);
  483|    284|                pbuf = hbuf.data();
  484|    284|                bsize = hbuf.size();
  485|    284|                continue;
  486|    284|            }
  487|   212k|            pbuf[bsize - 1] = 0;
  488|   212k|            return String(pbuf, len);
  489|   212k|        }
  490|   212k|    }

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

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

_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:
   39|      2|        : mBorderColour(ColourValue::Black)
   40|      2|        , mMaxAniso(1)
   41|      2|        , mMipmapBias(0)
   42|      2|        , mMinFilter(FO_LINEAR)
   43|      2|        , mMagFilter(FO_LINEAR)
   44|      2|        , mMipFilter(FO_POINT)
   45|      2|        , mCompareFunc(CMPF_GREATER_EQUAL)
   46|      2|        , mCompareEnabled(false)
   47|      2|        , mDirty(true)
   48|      2|    {
   49|      2|        setAddressingMode(TAM_WRAP);
   50|      2|    }
_ZN4Ogre7Sampler17setAddressingModeERKNS0_17UVWAddressingModeE:
   54|      2|    {
   55|      2|        mAddressMode = uvw;
   56|      2|        mDirty = true;
   57|      2|    }

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

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

