_ZNK4Ogre10DataStream4sizeEv:
  186|    482|        size_t size(void) const { return mSize; }

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

_ZNK4Ogre9SharedPtrINS_10DataStreamEEptEv:
   63|    964|        T* operator->() const { return shared_ptr<T>::operator->(); }

_ZN4Ogre14ArchiveManager12getSingletonEv:
   40|      1|    {  
   41|       |        assert( msSingleton );  return ( *msSingleton );  
   42|      1|    }
_ZN4Ogre14ArchiveManagerC2Ev:
   45|      1|    {
   46|      1|    }
_ZN4Ogre14ArchiveManager17addArchiveFactoryEPNS_14ArchiveFactoryE:
  126|      1|    {
  127|      1|        mArchFactories.emplace(factory->getType(), factory);
  128|      1|        LogManager::getSingleton().logMessage("ArchiveFactory for type '" + factory->getType() + "' registered");
  129|      1|    }

_ZN4Ogre16MemoryDataStreamC2EPvmbb:
  188|  4.52k|        : DataStream(static_cast<uint16>(readOnly ? READ : (READ | WRITE)))
  ------------------
  |  Branch (188:42): [True: 0, False: 4.52k]
  ------------------
  189|  4.52k|    {
  190|  4.52k|        mData = mPos = static_cast<uchar*>(pMem);
  191|  4.52k|        mSize = inSize;
  192|  4.52k|        mEnd = mData + mSize;
  193|  4.52k|        mFreeOnClose = freeOnClose;
  194|       |        assert(mEnd >= mPos);
  195|  4.52k|    }
_ZN4Ogre16MemoryDataStreamC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmbb:
  325|  3.30k|        : DataStream(name, static_cast<uint16>(readOnly ? READ : (READ | WRITE)))
  ------------------
  |  Branch (325:48): [True: 3.30k, False: 0]
  ------------------
  326|  3.30k|    {
  327|  3.30k|        mSize = inSize;
  328|  3.30k|        mData = OGRE_ALLOC_T(uchar, mSize, MEMCATEGORY_GENERAL);
  329|  3.30k|        mPos = mData;
  330|  3.30k|        mEnd = mData + mSize;
  331|  3.30k|        mFreeOnClose = freeOnClose;
  332|       |        assert(mEnd >= mPos);
  333|  3.30k|    }
_ZN4Ogre16MemoryDataStreamD2Ev:
  336|  7.82k|    {
  337|  7.82k|        close();
  338|  7.82k|    }
_ZN4Ogre16MemoryDataStream4readEPvm:
  341|    482|    {
  342|       |        // Read over end of memory?
  343|    482|        if (mPos >= mEnd)
  ------------------
  |  Branch (343:13): [True: 264, False: 218]
  ------------------
  344|    264|            return 0;
  345|    218|        size_t cnt = std::min(count, static_cast<size_t>(mEnd - mPos));
  346|    218|        if (cnt == 0)
  ------------------
  |  Branch (346:13): [True: 0, False: 218]
  ------------------
  347|      0|            return 0;
  348|       |
  349|    218|        assert (cnt<=count);
  350|       |
  351|    218|        memcpy(buf, mPos, cnt);
  352|    218|        mPos += cnt;
  353|    218|        return cnt;
  354|    218|    }
_ZN4Ogre16MemoryDataStream5closeEv:
  461|  7.82k|    {
  462|  7.82k|        mAccess = 0;
  463|  7.82k|        if (mFreeOnClose && mData)
  ------------------
  |  Branch (463:13): [True: 3.30k, False: 4.52k]
  |  Branch (463:29): [True: 3.30k, False: 0]
  ------------------
  464|  3.30k|        {
  465|       |            OGRE_FREE(mData, MEMCATEGORY_GENERAL);
  466|  3.30k|            mData = 0;
  467|  3.30k|        }
  468|  7.82k|    }

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

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

_ZN4Ogre10LogManager12getSingletonEv:
   39|      4|    {  
   40|       |        assert( msSingleton );  return ( *msSingleton );  
   41|      4|    }
_ZN4Ogre10LogManagerC2Ev:
   44|      1|    {
   45|       |        mDefaultLog = NULL;
   46|      1|    }
_ZN4Ogre10LogManager9createLogERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbb:
   61|      1|    {
   62|      1|        OGRE_LOCK_AUTO_MUTEX;
   63|       |
   64|      1|        Log* newLog = OGRE_NEW Log(name, debuggerOutput, suppressFileOutput);
   65|       |
   66|      1|        if( !mDefaultLog || defaultLog )
  ------------------
  |  Branch (66:13): [True: 1, False: 0]
  |  Branch (66:29): [True: 0, False: 0]
  ------------------
   67|      1|        {
   68|      1|            mDefaultLog = newLog;
   69|      1|        }
   70|       |
   71|      1|        mLogs.emplace(name, newLog);
   72|       |
   73|      1|        return newLog;
   74|      1|    }
_ZN4Ogre10LogManager10logMessageERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_15LogMessageLevelEb:
  125|      4|    {
  126|      4|        OGRE_LOCK_AUTO_MUTEX;
  127|      4|        if (mDefaultLog)
  ------------------
  |  Branch (127:13): [True: 4, False: 0]
  ------------------
  128|      4|        {
  129|      4|            mDefaultLog->logMessage(message, lml, maskDebug);
  130|      4|        }
  131|      4|    }
_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|    }

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

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

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

_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|    }
_ZNK4Ogre20ResourceGroupManager16getResourceGroupERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 1009|      3|    {
 1010|      3|        OGRE_LOCK_AUTO_MUTEX;
 1011|      3|        ResourceGroupMap::const_iterator i = mResourceGroupMap.find(name);
 1012|       |
 1013|      3|        if (i == mResourceGroupMap.end())
  ------------------
  |  Branch (1013:13): [True: 3, False: 0]
  ------------------
 1014|      3|        {
 1015|      3|            if (throwOnFailure)
  ------------------
  |  Branch (1015:17): [True: 0, False: 3]
  ------------------
 1016|      3|                OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Cannot locate a resource group called '" + name + "'");
 1017|       |
 1018|      3|            return nullptr;
 1019|      3|        }
 1020|       |
 1021|      0|        return i->second;
 1022|      3|    }

_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|    }

_ZN4Ogre10StringUtil4trimERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbb:
   42|      2|    {
   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|      2|        static const String delims = " \t\r\n";
   67|      2|        if(right)
  ------------------
  |  Branch (67:12): [True: 2, False: 0]
  ------------------
   68|      2|            str.erase(str.find_last_not_of(delims)+1); // trim right
   69|      2|        if(left)
  ------------------
  |  Branch (69:12): [True: 2, False: 0]
  ------------------
   70|      2|            str.erase(0, str.find_first_not_of(delims)); // trim left
   71|      2|    }
_ZN4Ogre10StringUtil13splitFilenameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERS7_SA_:
  360|  19.4k|    {
  361|  19.4k|        String path = qualifiedName;
  362|       |        // Replace \ with / first
  363|  19.4k|        std::replace( path.begin(), path.end(), '\\', '/' );
  364|       |        // split based on final /
  365|  19.4k|        size_t i = path.find_last_of('/');
  366|       |
  367|  19.4k|        if (i == String::npos)
  ------------------
  |  Branch (367:13): [True: 16.5k, False: 2.89k]
  ------------------
  368|  16.5k|        {
  369|  16.5k|            outPath.clear();
  370|  16.5k|            outBasename = qualifiedName;
  371|  16.5k|        }
  372|  2.89k|        else
  373|  2.89k|        {
  374|  2.89k|            outBasename = path.substr(i+1, path.size() - i - 1);
  375|  2.89k|            outPath = path.substr(0, i+1);
  376|  2.89k|        }
  377|       |
  378|  19.4k|    }

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

_ZN4Ogre25EmbeddedZipArchiveFactoryC2Ev:
  358|      1|    EmbeddedZipArchiveFactory::EmbeddedZipArchiveFactory() {}
_ZN4Ogre25EmbeddedZipArchiveFactory14createInstanceERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  362|  4.52k|    {
  363|  4.52k|        auto it = gEmbeddedFileDataList->find(name);
  364|  4.52k|        if(it == gEmbeddedFileDataList->end())
  ------------------
  |  Branch (364:12): [True: 0, False: 4.52k]
  ------------------
  365|      0|            return NULL;
  366|       |
  367|       |        // TODO: decryptFunc
  368|       |
  369|  4.52k|        return new ZipArchive(name, getType(), it->second.fileData, it->second.fileSize);
  370|  4.52k|    }
_ZN4Ogre25EmbeddedZipArchiveFactory15destroyInstanceEPNS_7ArchiveE:
  372|  4.52k|    {
  373|  4.52k|        removeEmbbeddedFile(ptr->getName());
  374|  4.52k|        ZipArchiveFactory::destroyInstance(ptr);
  375|  4.52k|    }
_ZNK4Ogre25EmbeddedZipArchiveFactory7getTypeEv:
  378|  4.52k|    {
  379|  4.52k|        static String name = "EmbeddedZip";
  380|  4.52k|        return name;
  381|  4.52k|    }
_ZN4Ogre25EmbeddedZipArchiveFactory16addEmbbeddedFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKhmPFbmPvmE:
  385|  4.52k|    {
  386|  4.52k|        static bool needToInit = true;
  387|  4.52k|        if(needToInit)
  ------------------
  |  Branch (387:12): [True: 1, False: 4.52k]
  ------------------
  388|      1|        {
  389|      1|            needToInit = false;
  390|       |
  391|       |            // we can't be sure when global variables get initialized
  392|       |            // meaning it is possible our list has not been init when this
  393|       |            // function is being called. The solution is to use local
  394|       |            // static members in this function an init the pointers for the
  395|       |            // global here. We know for use that the local static variables
  396|       |            // are create in this stage.
  397|      1|            static EmbbedFileDataList sEmbbedFileDataList;
  398|      1|            gEmbeddedFileDataList = &sEmbbedFileDataList;
  399|      1|        }
  400|       |
  401|  4.52k|        EmbeddedFileData newEmbeddedFileData;
  402|  4.52k|        newEmbeddedFileData.curPos = 0;
  403|  4.52k|        newEmbeddedFileData.isFileOpened = false;
  404|  4.52k|        newEmbeddedFileData.fileData = fileData;
  405|  4.52k|        newEmbeddedFileData.fileSize = fileSize;
  406|  4.52k|        newEmbeddedFileData.decryptFunc = decryptFunc;
  407|  4.52k|        gEmbeddedFileDataList->emplace(name, newEmbeddedFileData);
  408|  4.52k|    }
_ZN4Ogre25EmbeddedZipArchiveFactory19removeEmbbeddedFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  411|  4.52k|    {
  412|  4.52k|        gEmbeddedFileDataList->erase(name);
  413|  4.52k|    }
OgreZip.cpp:_ZN4Ogre12_GLOBAL__N_110ZipArchiveC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_PKhm:
   87|  4.52k|        : Archive(name, archType), mZipFile(0)
   88|  4.52k|    {
   89|  4.52k|        if(externBuf)
  ------------------
  |  Branch (89:12): [True: 4.52k, False: 0]
  ------------------
   90|  4.52k|            mBuffer.reset(new MemoryDataStream(const_cast<uint8*>(externBuf), externBufSz));
   91|  4.52k|    }
OgreZip.cpp:_ZN4Ogre12_GLOBAL__N_110ZipArchiveD2Ev:
   94|  4.52k|    {
   95|  4.52k|        unload();
   96|  4.52k|    }
OgreZip.cpp:_ZN4Ogre12_GLOBAL__N_110ZipArchive4loadEv:
   99|  4.52k|    {
  100|  4.52k|        OGRE_LOCK_AUTO_MUTEX;
  101|  4.52k|        if (!mZipFile)
  ------------------
  |  Branch (101:13): [True: 4.52k, False: 0]
  ------------------
  102|  4.52k|        {
  103|  4.52k|            if(!mBuffer)
  ------------------
  |  Branch (103:16): [True: 0, False: 4.52k]
  ------------------
  104|      0|                mBuffer.reset(new MemoryDataStream(_openFileStream(mName, std::ios::binary)));
  105|       |
  106|  4.52k|            mZipFile = zip_stream_open((const char*)mBuffer->getPtr(), mBuffer->size(), 0, 'r');
  107|       |
  108|       |            // Cache names
  109|  4.52k|            int n = zip_entries_total(mZipFile);
  110|  20.8k|            for (int i = 0; i < n; ++i) {
  ------------------
  |  Branch (110:29): [True: 16.2k, False: 4.52k]
  ------------------
  111|  16.2k|                FileInfo info;
  112|  16.2k|                info.archive = this;
  113|       |
  114|  16.2k|                zip_entry_openbyindex(mZipFile, i);
  115|       |
  116|  16.2k|                info.filename = zip_entry_name(mZipFile);
  117|       |                // Get basename / path
  118|  16.2k|                StringUtil::splitFilename(info.filename, info.basename, info.path);
  119|       |
  120|       |                // Get sizes
  121|  16.2k|                info.uncompressedSize = zip_entry_size(mZipFile);
  122|  16.2k|                info.compressedSize = zip_entry_comp_size(mZipFile);
  123|       |
  124|  16.2k|                if (zip_entry_isdir(mZipFile))
  ------------------
  |  Branch (124:21): [True: 3.12k, False: 13.1k]
  ------------------
  125|  3.12k|                {
  126|  3.12k|                    info.filename = info.filename.substr(0, info.filename.length() - 1);
  127|  3.12k|                    StringUtil::splitFilename(info.filename, info.basename, info.path);
  128|       |                    // Set compressed size to -1 for folders; anyway nobody will check
  129|       |                    // the compressed size of a folder, and if he does, its useless anyway
  130|  3.12k|                    info.compressedSize = size_t(-1);
  131|  3.12k|                }
  132|       |#if !OGRE_RESOURCEMANAGER_STRICT
  133|       |                else
  134|       |                {
  135|       |                    info.filename = info.basename;
  136|       |                }
  137|       |#endif
  138|  16.2k|                zip_entry_close(mZipFile);
  139|  16.2k|                mFileList.push_back(info);
  140|  16.2k|            }
  141|  4.52k|        }
  142|  4.52k|    }
OgreZip.cpp:_ZN4Ogre12_GLOBAL__N_110ZipArchive6unloadEv:
  145|  9.05k|    {
  146|  9.05k|        OGRE_LOCK_AUTO_MUTEX;
  147|  9.05k|        if (mZipFile)
  ------------------
  |  Branch (147:13): [True: 3.07k, False: 5.98k]
  ------------------
  148|  3.07k|        {
  149|  3.07k|            zip_close(mZipFile);
  150|  3.07k|            mZipFile = 0;
  151|  3.07k|            mFileList.clear();
  152|  3.07k|            mBuffer.reset();
  153|  3.07k|        }
  154|       |    
  155|  9.05k|    }
OgreZip.cpp:_ZNK4Ogre12_GLOBAL__N_110ZipArchive4openERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
  158|  6.59k|    {
  159|       |        // zip is not threadsafe
  160|  6.59k|        OGRE_LOCK_AUTO_MUTEX;
  161|  6.59k|        String lookUpFileName = filename;
  162|       |
  163|  6.59k|#if OGRE_RESOURCEMANAGER_STRICT
  164|  6.59k|        bool open = zip_entry_opencasesensitive(mZipFile, lookUpFileName.c_str()) == 0;
  165|       |#else
  166|       |        bool open = zip_entry_open(mZipFile, lookUpFileName.c_str()) == 0;
  167|       |        if (!open) // Try if we find the file
  168|       |        {
  169|       |            String basename, path;
  170|       |            StringUtil::splitFilename(lookUpFileName, basename, path);
  171|       |            const FileInfoListPtr fileNfo = findFileInfo(basename, true);
  172|       |            if (fileNfo->size() == 1) // If there are more files with the same do not open anyone
  173|       |            {
  174|       |                Ogre::FileInfo info = fileNfo->at(0);
  175|       |                lookUpFileName = info.path + info.basename;
  176|       |                open = zip_entry_open(mZipFile, lookUpFileName.c_str()) == 0;
  177|       |            }
  178|       |        }
  179|       |#endif
  180|       |
  181|  6.59k|        if (!open)
  ------------------
  |  Branch (181:13): [True: 1.60k, False: 4.98k]
  ------------------
  182|  1.60k|        {
  183|  1.60k|            OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND, "could not open "+lookUpFileName);
  184|  1.60k|        }
  185|       |
  186|       |        // Construct & return stream
  187|  4.98k|        size_t entrySize = zip_entry_size(mZipFile);
  188|  4.98k|        size_t compSize  = zip_entry_comp_size(mZipFile);
  189|       |        // repetitive log files have a typical ratio of ~50:1, XML 30:1, images 5:1
  190|  4.98k|        const size_t MAX_RATIO = 100;
  191|  4.98k|        if ((entrySize > 0 && (compSize == 0 || entrySize / compSize > MAX_RATIO)) || compSize > mBuffer->size())
  ------------------
  |  Branch (191:14): [True: 4.28k, False: 705]
  |  Branch (191:32): [True: 49, False: 4.23k]
  |  Branch (191:49): [True: 460, False: 3.77k]
  |  Branch (191:87): [True: 1.17k, False: 3.30k]
  ------------------
  192|  1.68k|        {
  193|  1.68k|            zip_entry_close(mZipFile);
  194|  1.68k|            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS,
  195|  1.68k|                        "zip entry has suspicious compression ratio (possible decompression bomb): " + lookUpFileName);
  196|  1.68k|        }
  197|  3.30k|        auto ret = std::make_shared<MemoryDataStream>(lookUpFileName, entrySize, true, true);
  198|       |
  199|  3.30k|        if(zip_entry_noallocread(mZipFile, ret->getPtr(), ret->size()) < 0)
  ------------------
  |  Branch (199:12): [True: 2.81k, False: 482]
  ------------------
  200|  2.81k|        {
  201|  2.81k|            zip_entry_close(mZipFile);
  202|  2.81k|            OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND, "could not read "+lookUpFileName);
  203|  2.81k|        }
  204|    482|        zip_entry_close(mZipFile);
  205|       |
  206|    482|        return ret;
  207|  3.30k|    }
OgreZip.cpp:_ZNK4Ogre12_GLOBAL__N_110ZipArchive4listEbb:
  220|  4.52k|    {
  221|  4.52k|        OGRE_LOCK_AUTO_MUTEX;
  222|  4.52k|        auto ret = std::make_shared<StringVector>();
  223|       |
  224|  4.52k|        for (auto& f : mFileList)
  ------------------
  |  Branch (224:22): [True: 16.2k, False: 4.52k]
  ------------------
  225|  16.2k|            if ((dirs == (f.compressedSize == size_t (-1))) &&
  ------------------
  |  Branch (225:17): [True: 13.1k, False: 3.12k]
  ------------------
  226|  13.1k|                (recursive || f.path.empty()))
  ------------------
  |  Branch (226:18): [True: 13.1k, False: 0]
  |  Branch (226:31): [True: 0, False: 0]
  ------------------
  227|  13.1k|                ret->push_back(f.filename);
  228|       |
  229|  4.52k|        return ret;
  230|  4.52k|    }

mz_crc32:
 1988|    334|mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) {
 1989|    334|  static const mz_uint32 s_crc_table[256] = {
 1990|    334|      0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F,
 1991|    334|      0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
 1992|    334|      0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2,
 1993|    334|      0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
 1994|    334|      0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,
 1995|    334|      0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
 1996|    334|      0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C,
 1997|    334|      0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
 1998|    334|      0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423,
 1999|    334|      0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
 2000|    334|      0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106,
 2001|    334|      0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
 2002|    334|      0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D,
 2003|    334|      0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
 2004|    334|      0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,
 2005|    334|      0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
 2006|    334|      0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7,
 2007|    334|      0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
 2008|    334|      0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA,
 2009|    334|      0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
 2010|    334|      0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81,
 2011|    334|      0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
 2012|    334|      0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84,
 2013|    334|      0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
 2014|    334|      0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,
 2015|    334|      0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
 2016|    334|      0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E,
 2017|    334|      0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
 2018|    334|      0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55,
 2019|    334|      0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
 2020|    334|      0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28,
 2021|    334|      0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
 2022|    334|      0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F,
 2023|    334|      0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
 2024|    334|      0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,
 2025|    334|      0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
 2026|    334|      0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69,
 2027|    334|      0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
 2028|    334|      0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC,
 2029|    334|      0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
 2030|    334|      0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693,
 2031|    334|      0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
 2032|    334|      0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D};
 2033|       |
 2034|    334|  mz_uint32 crc32 = (mz_uint32)crc ^ 0xFFFFFFFF;
 2035|    334|  const mz_uint8 *pByte_buf = (const mz_uint8 *)ptr;
 2036|       |
 2037|  22.3k|  while (buf_len >= 4) {
  ------------------
  |  Branch (2037:10): [True: 21.9k, False: 334]
  ------------------
 2038|  21.9k|    crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[0]) & 0xFF];
 2039|  21.9k|    crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[1]) & 0xFF];
 2040|  21.9k|    crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[2]) & 0xFF];
 2041|  21.9k|    crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[3]) & 0xFF];
 2042|  21.9k|    pByte_buf += 4;
 2043|  21.9k|    buf_len -= 4;
 2044|  21.9k|  }
 2045|       |
 2046|    674|  while (buf_len) {
  ------------------
  |  Branch (2046:10): [True: 340, False: 334]
  ------------------
 2047|    340|    crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[0]) & 0xFF];
 2048|    340|    ++pByte_buf;
 2049|    340|    --buf_len;
 2050|    340|  }
 2051|       |
 2052|    334|  return ~crc32;
 2053|    334|}
miniz_def_alloc_func:
 2059|  4.51k|                                        size_t size) {
 2060|  4.51k|  (void)opaque, (void)items, (void)size;
 2061|  4.51k|  return MZ_MALLOC(items * size);
  ------------------
  |  |  753|  4.51k|#define MZ_MALLOC(x) malloc(x)
  ------------------
 2062|  4.51k|}
miniz_def_free_func:
 2063|  18.0k|MINIZ_EXPORT void miniz_def_free_func(void *opaque, void *address) {
 2064|  18.0k|  (void)opaque, (void)address;
 2065|  18.0k|  MZ_FREE(address);
  ------------------
  |  |  754|  18.0k|#define MZ_FREE(x) free(x)
  ------------------
 2066|  18.0k|}
miniz_def_realloc_func:
 2068|  10.5k|                                          size_t items, size_t size) {
 2069|  10.5k|  (void)opaque, (void)address, (void)items, (void)size;
 2070|  10.5k|  return MZ_REALLOC(address, items * size);
  ------------------
  |  |  755|  10.5k|#define MZ_REALLOC(p, x) realloc(p, x)
  ------------------
 2071|  10.5k|}
tinfl_decompress:
 4392|  1.87k|                              const mz_uint32 decomp_flags) {
 4393|  1.87k|  static const mz_uint16 s_length_base[31] = {
 4394|  1.87k|      3,  4,  5,  6,  7,  8,  9,  10,  11,  13,  15,  17,  19,  23, 27, 31,
 4395|  1.87k|      35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0,  0};
 4396|  1.87k|  static const mz_uint8 s_length_extra[31] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
 4397|  1.87k|                                              1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4,
 4398|  1.87k|                                              4, 4, 5, 5, 5, 5, 0, 0, 0};
 4399|  1.87k|  static const mz_uint16 s_dist_base[32] = {
 4400|  1.87k|      1,    2,    3,    4,    5,    7,     9,     13,    17,  25,   33,
 4401|  1.87k|      49,   65,   97,   129,  193,  257,   385,   513,   769, 1025, 1537,
 4402|  1.87k|      2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0,   0};
 4403|  1.87k|  static const mz_uint8 s_dist_extra[32] = {
 4404|  1.87k|      0, 0, 0, 0, 1, 1, 2, 2,  3,  3,  4,  4,  5,  5,  6,
 4405|  1.87k|      6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13};
 4406|  1.87k|  static const mz_uint8 s_length_dezigzag[19] = {
 4407|  1.87k|      16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
 4408|  1.87k|  static const mz_uint16 s_min_table_sizes[3] = {257, 1, 4};
 4409|       |
 4410|  1.87k|  mz_int16 *pTrees[3];
 4411|  1.87k|  mz_uint8 *pCode_sizes[3];
 4412|       |
 4413|  1.87k|  tinfl_status status = TINFL_STATUS_FAILED;
 4414|  1.87k|  mz_uint32 num_bits, dist, counter, num_extra;
 4415|  1.87k|  tinfl_bit_buf_t bit_buf;
 4416|  1.87k|  const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end =
 4417|  1.87k|                                                  pIn_buf_next + *pIn_buf_size;
 4418|  1.87k|  mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end =
 4419|  1.87k|                                              pOut_buf_next ? pOut_buf_next +
  ------------------
  |  Branch (4419:47): [True: 1.87k, False: 0]
  ------------------
 4420|  1.87k|                                                                  *pOut_buf_size
 4421|  1.87k|                                                            : NULL;
 4422|  1.87k|  size_t out_buf_size_mask =
 4423|  1.87k|             (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)
  ------------------
  |  Branch (4423:14): [True: 1.87k, False: 0]
  ------------------
 4424|  1.87k|                 ? (size_t)-1
 4425|  1.87k|                 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1,
 4426|  1.87k|         dist_from_out_buf_start;
 4427|       |
 4428|       |  /* Ensure the output buffer's size is a power of 2, unless the output buffer
 4429|       |   * is large enough to hold the entire output file (in which case it doesn't
 4430|       |   * matter). */
 4431|  1.87k|  if (((out_buf_size_mask + 1) & out_buf_size_mask) ||
  ------------------
  |  Branch (4431:7): [True: 0, False: 1.87k]
  ------------------
 4432|  1.87k|      (pOut_buf_next < pOut_buf_start)) {
  ------------------
  |  Branch (4432:7): [True: 0, False: 1.87k]
  ------------------
 4433|      0|    *pIn_buf_size = *pOut_buf_size = 0;
 4434|      0|    return TINFL_STATUS_BAD_PARAM;
 4435|      0|  }
 4436|       |
 4437|  1.87k|  pTrees[0] = r->m_tree_0;
 4438|  1.87k|  pTrees[1] = r->m_tree_1;
 4439|  1.87k|  pTrees[2] = r->m_tree_2;
 4440|  1.87k|  pCode_sizes[0] = r->m_code_size_0;
 4441|  1.87k|  pCode_sizes[1] = r->m_code_size_1;
 4442|  1.87k|  pCode_sizes[2] = r->m_code_size_2;
 4443|       |
 4444|  1.87k|  num_bits = r->m_num_bits;
 4445|  1.87k|  bit_buf = r->m_bit_buf;
 4446|  1.87k|  dist = r->m_dist;
 4447|  1.87k|  counter = r->m_counter;
 4448|  1.87k|  num_extra = r->m_num_extra;
 4449|  1.87k|  dist_from_out_buf_start = r->m_dist_from_out_buf_start;
 4450|  1.87k|  TINFL_CR_BEGIN
  ------------------
  |  | 4249|  3.74k|  switch (r->m_state) {                                                        \
  |  |  ------------------
  |  |  |  Branch (4249:11): [True: 1.87k, False: 0]
  |  |  ------------------
  |  | 4250|  1.87k|  case 0:
  |  |  ------------------
  |  |  |  Branch (4250:3): [True: 1.87k, False: 0]
  |  |  ------------------
  ------------------
 4451|       |
 4452|  1.87k|  bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0;
 4453|  1.87k|  r->m_z_adler32 = r->m_check_adler32 = 1;
 4454|  1.87k|  if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) {
  ------------------
  |  Branch (4454:7): [True: 0, False: 1.87k]
  ------------------
 4455|      0|    TINFL_GET_BYTE(1, r->m_zhdr0);
  ------------------
  |  | 4269|      0|  do {                                                                         \
  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  ------------------
  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  ------------------
  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  ------------------
  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  | 4275|      0|    }                                                                          \
  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  | 4277|      0|  }                                                                            \
  |  | 4278|      0|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4456|      0|    TINFL_GET_BYTE(2, r->m_zhdr1);
  ------------------
  |  | 4269|      0|  do {                                                                         \
  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  ------------------
  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  ------------------
  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  ------------------
  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  | 4275|      0|    }                                                                          \
  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  | 4277|      0|  }                                                                            \
  |  | 4278|      0|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4457|      0|    counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) ||
  ------------------
  |  Branch (4457:16): [True: 0, False: 0]
  ------------------
 4458|      0|               (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8));
  ------------------
  |  Branch (4458:16): [True: 0, False: 0]
  |  Branch (4458:37): [True: 0, False: 0]
  ------------------
 4459|      0|    if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
  ------------------
  |  Branch (4459:9): [True: 0, False: 0]
  ------------------
 4460|      0|      counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) ||
  ------------------
  |  Branch (4460:19): [True: 0, False: 0]
  ------------------
 4461|      0|                  ((out_buf_size_mask + 1) <
  ------------------
  |  Branch (4461:19): [True: 0, False: 0]
  ------------------
 4462|      0|                   (size_t)((size_t)1 << (8U + (r->m_zhdr0 >> 4)))));
 4463|      0|    if (counter) {
  ------------------
  |  Branch (4463:9): [True: 0, False: 0]
  ------------------
 4464|      0|      TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|      0|  do {                                                                         \
  |  | 4261|      0|    for (;;) {                                                                 \
  |  | 4262|      0|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|      0|    }                                                                          \
  |  | 4264|      0|  }                                                                            \
  |  | 4265|      0|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4465|      0|    }
 4466|      0|  }
 4467|       |
 4468|  9.54k|  do {
 4469|  9.54k|    TINFL_GET_BITS(3, r->m_final, 3);
  ------------------
  |  | 4297|  9.54k|  do {                                                                         \
  |  | 4298|  9.54k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 4.50k, False: 5.03k]
  |  |  ------------------
  |  | 4299|  4.50k|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|  4.50k|  do {                                                                         \
  |  |  |  | 4282|  4.50k|    mz_uint c;                                                                 \
  |  |  |  | 4283|  4.50k|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|  4.50k|  do {                                                                         \
  |  |  |  |  |  | 4270|  4.50k|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 20, False: 4.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     20|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     20|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|     40|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 20]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     20|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     20|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     20|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     20|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     20|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     20|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     20|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     20|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     20|    }                                                                          \
  |  |  |  |  |  | 4276|  4.50k|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|  4.48k|  }                                                                            \
  |  |  |  |  |  | 4278|  4.50k|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|  4.50k|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 4.48k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|  4.50k|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|  4.48k|    num_bits += 8;                                                             \
  |  |  |  | 4286|  4.48k|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 4.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|  4.50k|    }                                                                          \
  |  | 4301|  9.54k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|  9.52k|    bit_buf >>= (n);                                                           \
  |  | 4303|  9.52k|    num_bits -= (n);                                                           \
  |  | 4304|  9.52k|  }                                                                            \
  |  | 4305|  9.54k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  9.54k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 9.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4470|  9.52k|    r->m_type = r->m_final >> 1;
 4471|  9.52k|    if (r->m_type == 0) {
  ------------------
  |  Branch (4471:9): [True: 3.31k, False: 6.21k]
  ------------------
 4472|  3.31k|      TINFL_SKIP_BITS(5, num_bits & 7);
  ------------------
  |  | 4288|  3.31k|  do {                                                                         \
  |  | 4289|  3.31k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4289:9): [True: 0, False: 3.31k]
  |  |  ------------------
  |  | 4290|      0|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|      0|  do {                                                                         \
  |  |  |  | 4282|      0|    mz_uint c;                                                                 \
  |  |  |  | 4283|      0|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|      0|  do {                                                                         \
  |  |  |  |  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|      0|    }                                                                          \
  |  |  |  |  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|      0|  }                                                                            \
  |  |  |  |  |  | 4278|      0|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|      0|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|      0|    num_bits += 8;                                                             \
  |  |  |  | 4286|      0|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4291|      0|    }                                                                          \
  |  | 4292|  3.31k|    bit_buf >>= (n);                                                           \
  |  | 4293|  3.31k|    num_bits -= (n);                                                           \
  |  | 4294|  3.31k|  }                                                                            \
  |  | 4295|  3.31k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  3.31k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4473|  16.4k|      for (counter = 0; counter < 4; ++counter) {
  ------------------
  |  Branch (4473:25): [True: 13.1k, False: 3.27k]
  ------------------
 4474|  13.1k|        if (num_bits)
  ------------------
  |  Branch (4474:13): [True: 8.45k, False: 4.73k]
  ------------------
 4475|  8.45k|          TINFL_GET_BITS(6, r->m_raw_header[counter], 8);
  ------------------
  |  | 4297|  8.45k|  do {                                                                         \
  |  | 4298|  8.45k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 0, False: 8.45k]
  |  |  ------------------
  |  | 4299|      0|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|      0|  do {                                                                         \
  |  |  |  | 4282|      0|    mz_uint c;                                                                 \
  |  |  |  | 4283|      0|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|      0|  do {                                                                         \
  |  |  |  |  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|      0|    }                                                                          \
  |  |  |  |  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|      0|  }                                                                            \
  |  |  |  |  |  | 4278|      0|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|      0|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|      0|    num_bits += 8;                                                             \
  |  |  |  | 4286|      0|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|      0|    }                                                                          \
  |  | 4301|  8.45k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|  8.45k|    bit_buf >>= (n);                                                           \
  |  | 4303|  8.45k|    num_bits -= (n);                                                           \
  |  | 4304|  8.45k|  }                                                                            \
  |  | 4305|  8.45k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  8.45k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 8.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4476|  4.73k|        else
 4477|  4.73k|          TINFL_GET_BYTE(7, r->m_raw_header[counter]);
  ------------------
  |  | 4269|  4.73k|  do {                                                                         \
  |  | 4270|  4.73k|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  ------------------
  |  |  |  Branch (4270:12): [True: 41, False: 4.69k]
  |  |  ------------------
  |  | 4271|     41|      TINFL_CR_RETURN(state_index,                                             \
  |  |  ------------------
  |  |  |  | 4252|     41|  do {                                                                         \
  |  |  |  | 4253|     82|    status = result;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4253:14): [True: 0, False: 41]
  |  |  |  |  ------------------
  |  |  |  | 4254|     41|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|     41|    goto common_exit;                                                          \
  |  |  |  | 4256|     41|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|     41|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|     41|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4272|     41|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  | 4273|     41|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  | 4274|     41|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  | 4275|     41|    }                                                                          \
  |  | 4276|  4.73k|    c = *pIn_buf_cur++;                                                        \
  |  | 4277|  4.69k|  }                                                                            \
  |  | 4278|  4.73k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  4.73k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 4.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4478|  13.1k|      }
 4479|  3.27k|      if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) !=
  ------------------
  |  Branch (4479:11): [True: 183, False: 3.08k]
  ------------------
 4480|  3.27k|          (mz_uint)(0xFFFF ^
 4481|  3.27k|                    (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) {
 4482|    183|        TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|    183|  do {                                                                         \
  |  | 4261|    183|    for (;;) {                                                                 \
  |  | 4262|    183|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|    183|  do {                                                                         \
  |  |  |  | 4253|    183|    status = result;                                                           \
  |  |  |  | 4254|    183|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|    183|    goto common_exit;                                                          \
  |  |  |  | 4256|    183|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|    183|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|    183|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|    183|    }                                                                          \
  |  | 4264|    183|  }                                                                            \
  |  | 4265|    183|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|    183|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4483|    183|      }
 4484|  3.58k|      while ((counter) && (num_bits)) {
  ------------------
  |  Branch (4484:14): [True: 2.28k, False: 1.30k]
  |  Branch (4484:27): [True: 498, False: 1.78k]
  ------------------
 4485|    498|        TINFL_GET_BITS(51, dist, 8);
  ------------------
  |  | 4297|    498|  do {                                                                         \
  |  | 4298|    498|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 0, False: 498]
  |  |  ------------------
  |  | 4299|      0|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|      0|  do {                                                                         \
  |  |  |  | 4282|      0|    mz_uint c;                                                                 \
  |  |  |  | 4283|      0|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|      0|  do {                                                                         \
  |  |  |  |  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|      0|    }                                                                          \
  |  |  |  |  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|      0|  }                                                                            \
  |  |  |  |  |  | 4278|      0|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|      0|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|      0|    num_bits += 8;                                                             \
  |  |  |  | 4286|      0|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|      0|    }                                                                          \
  |  | 4301|    498|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|    498|    bit_buf >>= (n);                                                           \
  |  | 4303|    498|    num_bits -= (n);                                                           \
  |  | 4304|    498|  }                                                                            \
  |  | 4305|    498|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|    498|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 498]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4486|    498|        while (pOut_buf_cur >= pOut_buf_end) {
  ------------------
  |  Branch (4486:16): [True: 3, False: 495]
  ------------------
 4487|      3|          TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT);
  ------------------
  |  | 4252|      3|  do {                                                                         \
  |  | 4253|      3|    status = result;                                                           \
  |  | 4254|      3|    r->m_state = state_index;                                                  \
  |  | 4255|      3|    goto common_exit;                                                          \
  |  | 4256|      3|  case state_index:;                                                           \
  |  |  ------------------
  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  ------------------
  |  | 4257|      0|  }                                                                            \
  |  | 4258|      3|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|      3|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4488|      3|        }
 4489|    495|        *pOut_buf_cur++ = (mz_uint8)dist;
 4490|    495|        counter--;
 4491|    495|      }
 4492|  4.87k|      while (counter) {
  ------------------
  |  Branch (4492:14): [True: 1.88k, False: 2.98k]
  ------------------
 4493|  1.88k|        size_t n;
 4494|  1.88k|        while (pOut_buf_cur >= pOut_buf_end) {
  ------------------
  |  Branch (4494:16): [True: 42, False: 1.84k]
  ------------------
 4495|     42|          TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT);
  ------------------
  |  | 4252|     42|  do {                                                                         \
  |  | 4253|     42|    status = result;                                                           \
  |  | 4254|     42|    r->m_state = state_index;                                                  \
  |  | 4255|     42|    goto common_exit;                                                          \
  |  | 4256|     42|  case state_index:;                                                           \
  |  |  ------------------
  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  ------------------
  |  | 4257|      0|  }                                                                            \
  |  | 4258|     42|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     42|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4496|     42|        }
 4497|  1.84k|        while (pIn_buf_cur >= pIn_buf_end) {
  ------------------
  |  Branch (4497:16): [True: 61, False: 1.78k]
  ------------------
 4498|     61|          TINFL_CR_RETURN(38, (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)
  ------------------
  |  | 4252|     61|  do {                                                                         \
  |  | 4253|    122|    status = result;                                                           \
  |  |  ------------------
  |  |  |  Branch (4253:14): [True: 0, False: 61]
  |  |  ------------------
  |  | 4254|     61|    r->m_state = state_index;                                                  \
  |  | 4255|     61|    goto common_exit;                                                          \
  |  | 4256|     61|  case state_index:;                                                           \
  |  |  ------------------
  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  ------------------
  |  | 4257|      0|  }                                                                            \
  |  | 4258|     61|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     61|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4499|     61|                                  ? TINFL_STATUS_NEEDS_MORE_INPUT
 4500|     61|                                  : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);
 4501|     61|        }
 4502|  1.78k|        n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur),
  ------------------
  |  |  759|  3.56k|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 102, False: 1.68k]
  |  |  |  Branch (759:25): [True: 336, False: 1.44k]
  |  |  |  Branch (759:38): [True: 41, False: 61]
  |  |  ------------------
  ------------------
 4503|  1.78k|                          (size_t)(pIn_buf_end - pIn_buf_cur)),
 4504|  1.78k|                   counter);
 4505|  1.78k|        TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n);
  ------------------
  |  | 4245|  1.78k|#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
  ------------------
 4506|  1.78k|        pIn_buf_cur += n;
 4507|  1.78k|        pOut_buf_cur += n;
 4508|  1.78k|        counter -= (mz_uint)n;
 4509|  1.78k|      }
 4510|  6.21k|    } else if (r->m_type == 3) {
  ------------------
  |  Branch (4510:16): [True: 30, False: 6.18k]
  ------------------
 4511|     30|      TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|     30|  do {                                                                         \
  |  | 4261|     30|    for (;;) {                                                                 \
  |  | 4262|     30|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|     30|  do {                                                                         \
  |  |  |  | 4253|     30|    status = result;                                                           \
  |  |  |  | 4254|     30|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|     30|    goto common_exit;                                                          \
  |  |  |  | 4256|     30|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|     30|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|     30|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|     30|    }                                                                          \
  |  | 4264|     30|  }                                                                            \
  |  | 4265|     30|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     30|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4512|  6.18k|    } else {
 4513|  6.18k|      if (r->m_type == 1) {
  ------------------
  |  Branch (4513:11): [True: 4.73k, False: 1.44k]
  ------------------
 4514|  4.73k|        mz_uint8 *p = r->m_code_size_0;
 4515|  4.73k|        mz_uint i;
 4516|  4.73k|        r->m_table_sizes[0] = 288;
 4517|  4.73k|        r->m_table_sizes[1] = 32;
 4518|  4.73k|        TINFL_MEMSET(r->m_code_size_1, 5, 32);
  ------------------
  |  | 4246|  4.73k|#define TINFL_MEMSET(p, c, l) memset(p, c, l)
  ------------------
 4519|   687k|        for (i = 0; i <= 143; ++i)
  ------------------
  |  Branch (4519:21): [True: 682k, False: 4.73k]
  ------------------
 4520|   682k|          *p++ = 8;
 4521|   535k|        for (; i <= 255; ++i)
  ------------------
  |  Branch (4521:16): [True: 530k, False: 4.73k]
  ------------------
 4522|   530k|          *p++ = 9;
 4523|   118k|        for (; i <= 279; ++i)
  ------------------
  |  Branch (4523:16): [True: 113k, False: 4.73k]
  ------------------
 4524|   113k|          *p++ = 7;
 4525|  42.6k|        for (; i <= 287; ++i)
  ------------------
  |  Branch (4525:16): [True: 37.9k, False: 4.73k]
  ------------------
 4526|  37.9k|          *p++ = 8;
 4527|  4.73k|      } else {
 4528|  5.70k|        for (counter = 0; counter < 3; counter++) {
  ------------------
  |  Branch (4528:27): [True: 4.30k, False: 1.40k]
  ------------------
 4529|  4.30k|          TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]);
  ------------------
  |  | 4297|  4.30k|  do {                                                                         \
  |  | 4298|  4.30k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 1.73k, False: 2.56k]
  |  |  ------------------
  |  | 4299|  1.73k|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|  1.73k|  do {                                                                         \
  |  |  |  | 4282|  1.73k|    mz_uint c;                                                                 \
  |  |  |  | 4283|  1.73k|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|  1.73k|  do {                                                                         \
  |  |  |  |  |  | 4270|  1.73k|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 33, False: 1.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     33|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     33|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|     66|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 33]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     33|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     33|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     33|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     33|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     33|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     33|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     33|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     33|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     33|    }                                                                          \
  |  |  |  |  |  | 4276|  1.73k|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|  1.70k|  }                                                                            \
  |  |  |  |  |  | 4278|  1.73k|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|  1.73k|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 1.70k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|  1.73k|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|  1.70k|    num_bits += 8;                                                             \
  |  |  |  | 4286|  1.70k|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 1.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|  1.73k|    }                                                                          \
  |  | 4301|  4.30k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|  4.26k|    bit_buf >>= (n);                                                           \
  |  | 4303|  4.26k|    num_bits -= (n);                                                           \
  |  | 4304|  4.26k|  }                                                                            \
  |  | 4305|  4.30k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  4.30k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 4.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4530|  4.26k|          r->m_table_sizes[counter] += s_min_table_sizes[counter];
 4531|  4.26k|        }
 4532|  1.40k|        MZ_CLEAR_ARR(r->m_code_size_2);
  ------------------
  |  |  761|  1.40k|#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
  ------------------
 4533|  23.6k|        for (counter = 0; counter < r->m_table_sizes[2]; counter++) {
  ------------------
  |  Branch (4533:27): [True: 22.2k, False: 1.37k]
  ------------------
 4534|  22.2k|          mz_uint s;
 4535|  22.2k|          TINFL_GET_BITS(14, s, 3);
  ------------------
  |  | 4297|  22.2k|  do {                                                                         \
  |  | 4298|  22.2k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 7.12k, False: 15.1k]
  |  |  ------------------
  |  | 4299|  7.12k|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|  7.12k|  do {                                                                         \
  |  |  |  | 4282|  7.12k|    mz_uint c;                                                                 \
  |  |  |  | 4283|  7.12k|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|  7.12k|  do {                                                                         \
  |  |  |  |  |  | 4270|  7.12k|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 34, False: 7.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     34|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     34|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|     68|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 34]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     34|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     34|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     34|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     34|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     34|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     34|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     34|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     34|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     34|    }                                                                          \
  |  |  |  |  |  | 4276|  7.12k|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|  7.08k|  }                                                                            \
  |  |  |  |  |  | 4278|  7.12k|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|  7.12k|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 7.08k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|  7.12k|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|  7.08k|    num_bits += 8;                                                             \
  |  |  |  | 4286|  7.08k|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 7.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|  7.12k|    }                                                                          \
  |  | 4301|  22.2k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|  22.2k|    bit_buf >>= (n);                                                           \
  |  | 4303|  22.2k|    num_bits -= (n);                                                           \
  |  | 4304|  22.2k|  }                                                                            \
  |  | 4305|  22.2k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  22.2k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 22.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4536|  22.2k|          r->m_code_size_2[s_length_dezigzag[counter]] = (mz_uint8)s;
 4537|  22.2k|        }
 4538|  1.37k|        r->m_table_sizes[2] = 19;
 4539|  1.37k|      }
 4540|  18.9k|      for (; (int)r->m_type >= 0; r->m_type--) {
  ------------------
  |  Branch (4540:14): [True: 13.1k, False: 5.82k]
  ------------------
 4541|  13.1k|        int tree_next, tree_cur;
 4542|  13.1k|        mz_int16 *pLookUp;
 4543|  13.1k|        mz_int16 *pTree;
 4544|  13.1k|        mz_uint8 *pCode_size;
 4545|  13.1k|        mz_uint i, j, used_syms, total, sym_index, next_code[17],
 4546|  13.1k|            total_syms[16];
 4547|  13.1k|        pLookUp = r->m_look_up[r->m_type];
 4548|  13.1k|        pTree = pTrees[r->m_type];
 4549|  13.1k|        pCode_size = pCode_sizes[r->m_type];
 4550|  13.1k|        MZ_CLEAR_ARR(total_syms);
  ------------------
  |  |  761|  13.1k|#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
  ------------------
 4551|  13.1k|        TINFL_MEMSET(pLookUp, 0, sizeof(r->m_look_up[0]));
  ------------------
  |  | 4246|  13.1k|#define TINFL_MEMSET(p, c, l) memset(p, c, l)
  ------------------
 4552|  13.1k|        tinfl_clear_tree(r);
 4553|  1.88M|        for (i = 0; i < r->m_table_sizes[r->m_type]; ++i)
  ------------------
  |  Branch (4553:21): [True: 1.86M, False: 13.1k]
  ------------------
 4554|  1.86M|          total_syms[pCode_size[i]]++;
 4555|  13.1k|        used_syms = 0, total = 0;
 4556|  13.1k|        next_code[0] = next_code[1] = 0;
 4557|   209k|        for (i = 1; i <= 15; ++i) {
  ------------------
  |  Branch (4557:21): [True: 196k, False: 13.1k]
  ------------------
 4558|   196k|          used_syms += total_syms[i];
 4559|   196k|          next_code[i + 1] = (total = ((total + total_syms[i]) << 1));
 4560|   196k|        }
 4561|  13.1k|        if ((65536 != total) && (used_syms > 1)) {
  ------------------
  |  Branch (4561:13): [True: 2.29k, False: 10.8k]
  |  Branch (4561:33): [True: 131, False: 2.16k]
  ------------------
 4562|    131|          TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|    131|  do {                                                                         \
  |  | 4261|    131|    for (;;) {                                                                 \
  |  | 4262|    131|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|    131|  do {                                                                         \
  |  |  |  | 4253|    131|    status = result;                                                           \
  |  |  |  | 4254|    131|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|    131|    goto common_exit;                                                          \
  |  |  |  | 4256|    131|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|    131|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|    131|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|    131|    }                                                                          \
  |  | 4264|    131|  }                                                                            \
  |  | 4265|    131|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|    131|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4563|    131|        }
 4564|  12.9k|        for (tree_next = -1, sym_index = 0;
 4565|  1.86M|             sym_index < r->m_table_sizes[r->m_type]; ++sym_index) {
  ------------------
  |  Branch (4565:14): [True: 1.85M, False: 12.9k]
  ------------------
 4566|  1.85M|          mz_uint rev_code = 0, l, cur_code, code_size = pCode_size[sym_index];
 4567|  1.85M|          if (!code_size)
  ------------------
  |  Branch (4567:15): [True: 305k, False: 1.55M]
  ------------------
 4568|   305k|            continue;
 4569|  1.55M|          cur_code = next_code[code_size]++;
 4570|  13.9M|          for (l = code_size; l > 0; l--, cur_code >>= 1)
  ------------------
  |  Branch (4570:31): [True: 12.3M, False: 1.55M]
  ------------------
 4571|  12.3M|            rev_code = (rev_code << 1) | (cur_code & 1);
 4572|  1.55M|          if (code_size <= TINFL_FAST_LOOKUP_BITS) {
  ------------------
  |  Branch (4572:15): [True: 1.53M, False: 11.7k]
  ------------------
 4573|  1.53M|            mz_int16 k = (mz_int16)((code_size << 9) | sym_index);
 4574|  12.6M|            while (rev_code < TINFL_FAST_LOOKUP_SIZE) {
  ------------------
  |  Branch (4574:20): [True: 11.1M, False: 1.53M]
  ------------------
 4575|  11.1M|              pLookUp[rev_code] = k;
 4576|  11.1M|              rev_code += (1 << code_size);
 4577|  11.1M|            }
 4578|  1.53M|            continue;
 4579|  1.53M|          }
 4580|  11.7k|          if (0 ==
  ------------------
  |  Branch (4580:15): [True: 5.21k, False: 6.49k]
  ------------------
 4581|  11.7k|              (tree_cur = pLookUp[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) {
 4582|  5.21k|            pLookUp[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] =
 4583|  5.21k|                (mz_int16)tree_next;
 4584|  5.21k|            tree_cur = tree_next;
 4585|  5.21k|            tree_next -= 2;
 4586|  5.21k|          }
 4587|  11.7k|          rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1);
 4588|  22.6k|          for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) {
  ------------------
  |  Branch (4588:31): [True: 10.9k, False: 11.7k]
  ------------------
 4589|  10.9k|            tree_cur -= ((rev_code >>= 1) & 1);
 4590|  10.9k|            if (!pTree[-tree_cur - 1]) {
  ------------------
  |  Branch (4590:17): [True: 6.80k, False: 4.15k]
  ------------------
 4591|  6.80k|              pTree[-tree_cur - 1] = (mz_int16)tree_next;
 4592|  6.80k|              tree_cur = tree_next;
 4593|  6.80k|              tree_next -= 2;
 4594|  6.80k|            } else
 4595|  4.15k|              tree_cur = pTree[-tree_cur - 1];
 4596|  10.9k|          }
 4597|  11.7k|          tree_cur -= ((rev_code >>= 1) & 1);
 4598|  11.7k|          pTree[-tree_cur - 1] = (mz_int16)sym_index;
 4599|  11.7k|        }
 4600|  12.9k|        if (r->m_type == 2) {
  ------------------
  |  Branch (4600:13): [True: 1.28k, False: 11.6k]
  ------------------
 4601|  1.28k|          for (counter = 0;
 4602|   184k|               counter < (r->m_table_sizes[0] + r->m_table_sizes[1]);) {
  ------------------
  |  Branch (4602:16): [True: 183k, False: 1.18k]
  ------------------
 4603|   183k|            mz_uint s;
 4604|   183k|            TINFL_HUFF_DECODE(16, dist, r->m_look_up[2], r->m_tree_2);
  ------------------
  |  | 4352|   183k|  do {                                                                         \
  |  | 4353|   183k|    int temp;                                                                  \
  |  | 4354|   183k|    mz_uint code_len, c;                                                       \
  |  | 4355|   183k|    if (num_bits < 15) {                                                       \
  |  |  ------------------
  |  |  |  Branch (4355:9): [True: 18.3k, False: 165k]
  |  |  ------------------
  |  | 4356|  18.3k|      if ((pIn_buf_end - pIn_buf_cur) < 2) {                                   \
  |  |  ------------------
  |  |  |  Branch (4356:11): [True: 1.47k, False: 16.8k]
  |  |  ------------------
  |  | 4357|  1.47k|        TINFL_HUFF_BITBUF_FILL(state_index, pLookUp, pTree);                   \
  |  |  ------------------
  |  |  |  | 4317|  1.54k|  do {                                                                         \
  |  |  |  | 4318|  1.54k|    temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)];                    \
  |  |  |  | 4319|  1.54k|    if (temp >= 0) {                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4319:9): [True: 1.54k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4320|  1.54k|      code_len = temp >> 9;                                                    \
  |  |  |  | 4321|  1.54k|      if ((code_len) && (num_bits >= code_len))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4321:11): [True: 1.47k, False: 61]
  |  |  |  |  |  Branch (4321:25): [True: 1.39k, False: 82]
  |  |  |  |  ------------------
  |  |  |  | 4322|  1.54k|        break;                                                                 \
  |  |  |  | 4323|  1.54k|    } else if (num_bits > TINFL_FAST_LOOKUP_BITS) {                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4323:16): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4324|      0|      code_len = TINFL_FAST_LOOKUP_BITS;                                       \
  |  |  |  | 4325|      0|      do {                                                                     \
  |  |  |  | 4326|      0|        temp = pTree[~temp + ((bit_buf >> code_len++) & 1)];                   \
  |  |  |  | 4327|      0|      } while ((temp < 0) && (num_bits >= (code_len + 1)));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4327:16): [True: 0, False: 0]
  |  |  |  |  |  Branch (4327:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4328|      0|      if (temp >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4328:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4329|      0|        break;                                                                 \
  |  |  |  | 4330|      0|    }                                                                          \
  |  |  |  | 4331|  1.54k|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|    143|  do {                                                                         \
  |  |  |  |  |  | 4270|    143|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 58, False: 85]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     58|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     58|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|    116|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 58]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     58|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     58|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     58|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     58|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     58|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     58|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     58|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     58|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     58|    }                                                                          \
  |  |  |  |  |  | 4276|    143|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|     85|  }                                                                            \
  |  |  |  |  |  | 4278|  1.54k|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|  1.54k|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 85]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4332|    143|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4333|     85|    num_bits += 8;                                                             \
  |  |  |  | 4334|     85|  } while (num_bits < 15);
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4334:12): [True: 63, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4358|  16.8k|      } else {                                                                 \
  |  | 4359|  16.8k|        bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) |           \
  |  | 4360|  16.8k|                   (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8));      \
  |  | 4361|  16.8k|        pIn_buf_cur += 2;                                                      \
  |  | 4362|  16.8k|        num_bits += 16;                                                        \
  |  | 4363|  16.8k|      }                                                                        \
  |  | 4364|  18.3k|    }                                                                          \
  |  | 4365|   183k|    if ((temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)         \
  |  |  ------------------
  |  |  |  Branch (4365:9): [True: 183k, False: 0]
  |  |  ------------------
  |  | 4366|   183k|      code_len = temp >> 9, temp &= 511;                                       \
  |  | 4367|   183k|    else {                                                                     \
  |  | 4368|      0|      code_len = TINFL_FAST_LOOKUP_BITS;                                       \
  |  | 4369|      0|      do {                                                                     \
  |  | 4370|      0|        temp = pTree[~temp + ((bit_buf >> code_len++) & 1)];                   \
  |  | 4371|      0|      } while (temp < 0);                                                      \
  |  |  ------------------
  |  |  |  Branch (4371:16): [True: 0, False: 0]
  |  |  ------------------
  |  | 4372|      0|    }                                                                          \
  |  | 4373|   183k|    sym = temp;                                                                \
  |  | 4374|   183k|    bit_buf >>= code_len;                                                      \
  |  | 4375|   183k|    num_bits -= code_len;                                                      \
  |  | 4376|   183k|  }                                                                            \
  |  | 4377|   183k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|   183k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 183k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4605|   183k|            if (dist < 16) {
  ------------------
  |  Branch (4605:17): [True: 171k, False: 12.3k]
  ------------------
 4606|   171k|              r->m_len_codes[counter++] = (mz_uint8)dist;
 4607|   171k|              continue;
 4608|   171k|            }
 4609|  12.3k|            if ((dist == 16) && (!counter)) {
  ------------------
  |  Branch (4609:17): [True: 5.29k, False: 7.06k]
  |  Branch (4609:33): [True: 25, False: 5.26k]
  ------------------
 4610|     25|              TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|     25|  do {                                                                         \
  |  | 4261|     25|    for (;;) {                                                                 \
  |  | 4262|     25|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|     25|  do {                                                                         \
  |  |  |  | 4253|     25|    status = result;                                                           \
  |  |  |  | 4254|     25|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|     25|    goto common_exit;                                                          \
  |  |  |  | 4256|     25|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|     25|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|     25|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|     25|    }                                                                          \
  |  | 4264|     25|  }                                                                            \
  |  | 4265|     25|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     25|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4611|     25|            }
 4612|  12.3k|            num_extra = "\02\03\07"[dist - 16];
 4613|  12.3k|            TINFL_GET_BITS(18, s, num_extra);
  ------------------
  |  | 4297|  12.3k|  do {                                                                         \
  |  | 4298|  12.3k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 45, False: 12.2k]
  |  |  ------------------
  |  | 4299|     45|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|     45|  do {                                                                         \
  |  |  |  | 4282|     45|    mz_uint c;                                                                 \
  |  |  |  | 4283|     45|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|     45|  do {                                                                         \
  |  |  |  |  |  | 4270|     45|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 22, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     22|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     22|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|     44|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 22]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     22|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     22|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     22|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     22|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     22|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     22|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     22|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     22|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     22|    }                                                                          \
  |  |  |  |  |  | 4276|     45|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|     23|  }                                                                            \
  |  |  |  |  |  | 4278|     45|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|     45|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 23]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|     45|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|     23|    num_bits += 8;                                                             \
  |  |  |  | 4286|     23|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|     45|    }                                                                          \
  |  | 4301|  12.3k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|  12.3k|    bit_buf >>= (n);                                                           \
  |  | 4303|  12.3k|    num_bits -= (n);                                                           \
  |  | 4304|  12.3k|  }                                                                            \
  |  | 4305|  12.3k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  12.3k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4614|  12.3k|            s += "\03\03\013"[dist - 16];
 4615|  12.3k|            TINFL_MEMSET(r->m_len_codes + counter,
  ------------------
  |  | 4246|  24.6k|#define TINFL_MEMSET(p, c, l) memset(p, c, l)
  |  |  ------------------
  |  |  |  Branch (4246:41): [True: 5.25k, False: 7.05k]
  |  |  ------------------
  ------------------
 4616|  12.3k|                         (dist == 16) ? r->m_len_codes[counter - 1] : 0, s);
 4617|  12.3k|            counter += s;
 4618|  12.3k|          }
 4619|  1.18k|          if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) {
  ------------------
  |  Branch (4619:15): [True: 51, False: 1.13k]
  ------------------
 4620|     51|            TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|     51|  do {                                                                         \
  |  | 4261|     51|    for (;;) {                                                                 \
  |  | 4262|     51|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|     51|  do {                                                                         \
  |  |  |  | 4253|     51|    status = result;                                                           \
  |  |  |  | 4254|     51|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|     51|    goto common_exit;                                                          \
  |  |  |  | 4256|     51|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|     51|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|     51|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|     51|    }                                                                          \
  |  | 4264|     51|  }                                                                            \
  |  | 4265|     51|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     51|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4621|     51|          }
 4622|  1.13k|          TINFL_MEMCPY(r->m_code_size_0, r->m_len_codes, r->m_table_sizes[0]);
  ------------------
  |  | 4245|  1.13k|#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
  ------------------
 4623|  1.13k|          TINFL_MEMCPY(r->m_code_size_1, r->m_len_codes + r->m_table_sizes[0],
  ------------------
  |  | 4245|  1.13k|#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
  ------------------
 4624|  1.13k|                       r->m_table_sizes[1]);
 4625|  1.13k|        }
 4626|  12.9k|      }
 4627|   887k|      for (;;) {
 4628|   887k|        mz_uint8 *pSrc;
 4629|  1.47M|        for (;;) {
 4630|  1.47M|          if (((pIn_buf_end - pIn_buf_cur) < 4) ||
  ------------------
  |  Branch (4630:15): [True: 28.2k, False: 1.44M]
  ------------------
 4631|  1.44M|              ((pOut_buf_end - pOut_buf_cur) < 2)) {
  ------------------
  |  Branch (4631:15): [True: 871, False: 1.44M]
  ------------------
 4632|  29.1k|            TINFL_HUFF_DECODE(23, counter, r->m_look_up[0], r->m_tree_0);
  ------------------
  |  | 4352|  29.1k|  do {                                                                         \
  |  | 4353|  29.1k|    int temp;                                                                  \
  |  | 4354|  29.1k|    mz_uint code_len, c;                                                       \
  |  | 4355|  29.1k|    if (num_bits < 15) {                                                       \
  |  |  ------------------
  |  |  |  Branch (4355:9): [True: 2.44k, False: 26.6k]
  |  |  ------------------
  |  | 4356|  2.44k|      if ((pIn_buf_end - pIn_buf_cur) < 2) {                                   \
  |  |  ------------------
  |  |  |  Branch (4356:11): [True: 1.64k, False: 798]
  |  |  ------------------
  |  | 4357|  1.64k|        TINFL_HUFF_BITBUF_FILL(state_index, pLookUp, pTree);                   \
  |  |  ------------------
  |  |  |  | 4317|  1.90k|  do {                                                                         \
  |  |  |  | 4318|  1.90k|    temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)];                    \
  |  |  |  | 4319|  1.90k|    if (temp >= 0) {                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4319:9): [True: 1.62k, False: 288]
  |  |  |  |  ------------------
  |  |  |  | 4320|  1.62k|      code_len = temp >> 9;                                                    \
  |  |  |  | 4321|  1.62k|      if ((code_len) && (num_bits >= code_len))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4321:11): [True: 1.56k, False: 61]
  |  |  |  |  |  Branch (4321:25): [True: 1.25k, False: 302]
  |  |  |  |  ------------------
  |  |  |  | 4322|  1.62k|        break;                                                                 \
  |  |  |  | 4323|  1.62k|    } else if (num_bits > TINFL_FAST_LOOKUP_BITS) {                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4323:16): [True: 112, False: 176]
  |  |  |  |  ------------------
  |  |  |  | 4324|    112|      code_len = TINFL_FAST_LOOKUP_BITS;                                       \
  |  |  |  | 4325|    240|      do {                                                                     \
  |  |  |  | 4326|    240|        temp = pTree[~temp + ((bit_buf >> code_len++) & 1)];                   \
  |  |  |  | 4327|    240|      } while ((temp < 0) && (num_bits >= (code_len + 1)));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4327:16): [True: 176, False: 64]
  |  |  |  |  |  Branch (4327:30): [True: 128, False: 48]
  |  |  |  |  ------------------
  |  |  |  | 4328|    112|      if (temp >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4328:11): [True: 64, False: 48]
  |  |  |  |  ------------------
  |  |  |  | 4329|    112|        break;                                                                 \
  |  |  |  | 4330|    112|    }                                                                          \
  |  |  |  | 4331|  1.90k|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|    587|  do {                                                                         \
  |  |  |  |  |  | 4270|    587|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 256, False: 331]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|    256|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|    256|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|    512|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 256]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|    256|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|    256|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|    256|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|    256|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|    256|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|    256|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|    256|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|    256|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|    256|    }                                                                          \
  |  |  |  |  |  | 4276|    587|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|    331|  }                                                                            \
  |  |  |  |  |  | 4278|  1.90k|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|  1.90k|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 331]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4332|    587|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4333|    331|    num_bits += 8;                                                             \
  |  |  |  | 4334|    331|  } while (num_bits < 15);
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4334:12): [True: 260, False: 71]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4358|  1.39k|      } else {                                                                 \
  |  | 4359|    798|        bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) |           \
  |  | 4360|    798|                   (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8));      \
  |  | 4361|    798|        pIn_buf_cur += 2;                                                      \
  |  | 4362|    798|        num_bits += 16;                                                        \
  |  | 4363|    798|      }                                                                        \
  |  | 4364|  2.44k|    }                                                                          \
  |  | 4365|  29.1k|    if ((temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)         \
  |  |  ------------------
  |  |  |  Branch (4365:9): [True: 28.4k, False: 427]
  |  |  ------------------
  |  | 4366|  28.8k|      code_len = temp >> 9, temp &= 511;                                       \
  |  | 4367|  28.8k|    else {                                                                     \
  |  | 4368|    427|      code_len = TINFL_FAST_LOOKUP_BITS;                                       \
  |  | 4369|  1.43k|      do {                                                                     \
  |  | 4370|  1.43k|        temp = pTree[~temp + ((bit_buf >> code_len++) & 1)];                   \
  |  | 4371|  1.43k|      } while (temp < 0);                                                      \
  |  |  ------------------
  |  |  |  Branch (4371:16): [True: 1.00k, False: 427]
  |  |  ------------------
  |  | 4372|    427|    }                                                                          \
  |  | 4373|  28.8k|    sym = temp;                                                                \
  |  | 4374|  28.8k|    bit_buf >>= code_len;                                                      \
  |  | 4375|  28.8k|    num_bits -= code_len;                                                      \
  |  | 4376|  28.8k|  }                                                                            \
  |  | 4377|  29.1k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  29.1k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 28.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4633|  28.8k|            if (counter >= 256)
  ------------------
  |  Branch (4633:17): [True: 1.87k, False: 27.0k]
  ------------------
 4634|  1.87k|              break;
 4635|  27.0k|            while (pOut_buf_cur >= pOut_buf_end) {
  ------------------
  |  Branch (4635:20): [True: 82, False: 26.9k]
  ------------------
 4636|     82|              TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT);
  ------------------
  |  | 4252|     82|  do {                                                                         \
  |  | 4253|     82|    status = result;                                                           \
  |  | 4254|     82|    r->m_state = state_index;                                                  \
  |  | 4255|     82|    goto common_exit;                                                          \
  |  | 4256|     82|  case state_index:;                                                           \
  |  |  ------------------
  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  ------------------
  |  | 4257|      0|  }                                                                            \
  |  | 4258|     82|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     82|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4637|     82|            }
 4638|  26.9k|            *pOut_buf_cur++ = (mz_uint8)counter;
 4639|  1.44M|          } else {
 4640|  1.44M|            int sym2;
 4641|  1.44M|            mz_uint code_len;
 4642|  1.44M|#if TINFL_USE_64BIT_BITBUF
 4643|  1.44M|            if (num_bits < 30) {
  ------------------
  |  Branch (4643:17): [True: 419k, False: 1.02M]
  ------------------
 4644|   419k|              bit_buf |=
 4645|   419k|                  (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits);
  ------------------
  |  |  772|   419k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|   419k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|   419k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|   419k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 4646|   419k|              pIn_buf_cur += 4;
 4647|   419k|              num_bits += 32;
 4648|   419k|            }
 4649|       |#else
 4650|       |            if (num_bits < 15) {
 4651|       |              bit_buf |=
 4652|       |                  (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits);
 4653|       |              pIn_buf_cur += 2;
 4654|       |              num_bits += 16;
 4655|       |            }
 4656|       |#endif
 4657|  1.44M|            if ((sym2 =
  ------------------
  |  Branch (4657:17): [True: 1.38M, False: 66.7k]
  ------------------
 4658|  1.44M|                     r->m_look_up[0][bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >=
 4659|  1.44M|                0)
 4660|  1.38M|              code_len = sym2 >> 9;
 4661|  66.7k|            else {
 4662|  66.7k|              code_len = TINFL_FAST_LOOKUP_BITS;
 4663|   100k|              do {
 4664|   100k|                sym2 = r->m_tree_0[~sym2 + ((bit_buf >> code_len++) & 1)];
 4665|   100k|              } while (sym2 < 0);
  ------------------
  |  Branch (4665:24): [True: 33.6k, False: 66.7k]
  ------------------
 4666|  66.7k|            }
 4667|  1.44M|            counter = sym2;
 4668|  1.44M|            bit_buf >>= code_len;
 4669|  1.44M|            num_bits -= code_len;
 4670|  1.44M|            if (code_len == 0) {
  ------------------
  |  Branch (4670:17): [True: 128, False: 1.44M]
  ------------------
 4671|    128|              TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|    128|  do {                                                                         \
  |  | 4261|    128|    for (;;) {                                                                 \
  |  | 4262|    128|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|    128|  do {                                                                         \
  |  |  |  | 4253|    128|    status = result;                                                           \
  |  |  |  | 4254|    128|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|    128|    goto common_exit;                                                          \
  |  |  |  | 4256|    128|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|    128|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|    128|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|    128|    }                                                                          \
  |  | 4264|    128|  }                                                                            \
  |  | 4265|    128|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|    128|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4672|    128|            }
 4673|  1.44M|            if (counter & 256)
  ------------------
  |  Branch (4673:17): [True: 816k, False: 630k]
  ------------------
 4674|   816k|              break;
 4675|       |
 4676|       |#if !TINFL_USE_64BIT_BITBUF
 4677|       |            if (num_bits < 15) {
 4678|       |              bit_buf |=
 4679|       |                  (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits);
 4680|       |              pIn_buf_cur += 2;
 4681|       |              num_bits += 16;
 4682|       |            }
 4683|       |#endif
 4684|   630k|            if ((sym2 =
  ------------------
  |  Branch (4684:17): [True: 591k, False: 38.8k]
  ------------------
 4685|   630k|                     r->m_look_up[0][bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >=
 4686|   630k|                0)
 4687|   591k|              code_len = sym2 >> 9;
 4688|  38.8k|            else {
 4689|  38.8k|              code_len = TINFL_FAST_LOOKUP_BITS;
 4690|  60.3k|              do {
 4691|  60.3k|                sym2 = r->m_tree_0[~sym2 + ((bit_buf >> code_len++) & 1)];
 4692|  60.3k|              } while (sym2 < 0);
  ------------------
  |  Branch (4692:24): [True: 21.4k, False: 38.8k]
  ------------------
 4693|  38.8k|            }
 4694|   630k|            bit_buf >>= code_len;
 4695|   630k|            num_bits -= code_len;
 4696|   630k|            if (code_len == 0) {
  ------------------
  |  Branch (4696:17): [True: 22, False: 630k]
  ------------------
 4697|     22|              TINFL_CR_RETURN_FOREVER(54, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|     22|  do {                                                                         \
  |  | 4261|     22|    for (;;) {                                                                 \
  |  | 4262|     22|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|     22|  do {                                                                         \
  |  |  |  | 4253|     22|    status = result;                                                           \
  |  |  |  | 4254|     22|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|     22|    goto common_exit;                                                          \
  |  |  |  | 4256|     22|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|     22|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|     22|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|     22|    }                                                                          \
  |  | 4264|     22|  }                                                                            \
  |  | 4265|     22|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     22|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4698|     22|            }
 4699|       |
 4700|   630k|            pOut_buf_cur[0] = (mz_uint8)counter;
 4701|   630k|            if (sym2 & 256) {
  ------------------
  |  Branch (4701:17): [True: 68.8k, False: 561k]
  ------------------
 4702|  68.8k|              pOut_buf_cur++;
 4703|  68.8k|              counter = sym2;
 4704|  68.8k|              break;
 4705|  68.8k|            }
 4706|   561k|            pOut_buf_cur[1] = (mz_uint8)sym2;
 4707|   561k|            pOut_buf_cur += 2;
 4708|   561k|          }
 4709|  1.47M|        }
 4710|   887k|        if ((counter &= 511) == 256)
  ------------------
  |  Branch (4710:13): [True: 4.89k, False: 882k]
  ------------------
 4711|  4.89k|          break;
 4712|       |
 4713|   882k|        num_extra = s_length_extra[counter - 257];
 4714|   882k|        counter = s_length_base[counter - 257];
 4715|   882k|        if (num_extra) {
  ------------------
  |  Branch (4715:13): [True: 857k, False: 24.5k]
  ------------------
 4716|   857k|          mz_uint extra_bits;
 4717|   857k|          TINFL_GET_BITS(25, extra_bits, num_extra);
  ------------------
  |  | 4297|   857k|  do {                                                                         \
  |  | 4298|   857k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 179, False: 857k]
  |  |  ------------------
  |  | 4299|    179|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|    179|  do {                                                                         \
  |  |  |  | 4282|    179|    mz_uint c;                                                                 \
  |  |  |  | 4283|    179|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|    179|  do {                                                                         \
  |  |  |  |  |  | 4270|    179|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 21, False: 158]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     21|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     21|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|     42|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 21]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     21|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     21|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     21|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     21|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     21|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     21|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     21|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     21|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     21|    }                                                                          \
  |  |  |  |  |  | 4276|    179|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|    158|  }                                                                            \
  |  |  |  |  |  | 4278|    179|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|    179|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 158]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|    179|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|    158|    num_bits += 8;                                                             \
  |  |  |  | 4286|    158|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 158]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|    179|    }                                                                          \
  |  | 4301|   857k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|   857k|    bit_buf >>= (n);                                                           \
  |  | 4303|   857k|    num_bits -= (n);                                                           \
  |  | 4304|   857k|  }                                                                            \
  |  | 4305|   857k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|   857k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 857k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4718|   857k|          counter += extra_bits;
 4719|   857k|        }
 4720|       |
 4721|   882k|        TINFL_HUFF_DECODE(26, dist, r->m_look_up[1], r->m_tree_1);
  ------------------
  |  | 4352|   882k|  do {                                                                         \
  |  | 4353|   882k|    int temp;                                                                  \
  |  | 4354|   882k|    mz_uint code_len, c;                                                       \
  |  | 4355|   882k|    if (num_bits < 15) {                                                       \
  |  |  ------------------
  |  |  |  Branch (4355:9): [True: 1.36k, False: 880k]
  |  |  ------------------
  |  | 4356|  1.36k|      if ((pIn_buf_end - pIn_buf_cur) < 2) {                                   \
  |  |  ------------------
  |  |  |  Branch (4356:11): [True: 403, False: 964]
  |  |  ------------------
  |  | 4357|    403|        TINFL_HUFF_BITBUF_FILL(state_index, pLookUp, pTree);                   \
  |  |  ------------------
  |  |  |  | 4317|    482|  do {                                                                         \
  |  |  |  | 4318|    482|    temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)];                    \
  |  |  |  | 4319|    482|    if (temp >= 0) {                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4319:9): [True: 362, False: 120]
  |  |  |  |  ------------------
  |  |  |  | 4320|    362|      code_len = temp >> 9;                                                    \
  |  |  |  | 4321|    362|      if ((code_len) && (num_bits >= code_len))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4321:11): [True: 281, False: 81]
  |  |  |  |  |  Branch (4321:25): [True: 204, False: 77]
  |  |  |  |  ------------------
  |  |  |  | 4322|    362|        break;                                                                 \
  |  |  |  | 4323|    362|    } else if (num_bits > TINFL_FAST_LOOKUP_BITS) {                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4323:16): [True: 62, False: 58]
  |  |  |  |  ------------------
  |  |  |  | 4324|     62|      code_len = TINFL_FAST_LOOKUP_BITS;                                       \
  |  |  |  | 4325|    180|      do {                                                                     \
  |  |  |  | 4326|    180|        temp = pTree[~temp + ((bit_buf >> code_len++) & 1)];                   \
  |  |  |  | 4327|    180|      } while ((temp < 0) && (num_bits >= (code_len + 1)));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4327:16): [True: 138, False: 42]
  |  |  |  |  |  Branch (4327:30): [True: 118, False: 20]
  |  |  |  |  ------------------
  |  |  |  | 4328|     62|      if (temp >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4328:11): [True: 42, False: 20]
  |  |  |  |  ------------------
  |  |  |  | 4329|     62|        break;                                                                 \
  |  |  |  | 4330|     62|    }                                                                          \
  |  |  |  | 4331|    482|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|    236|  do {                                                                         \
  |  |  |  |  |  | 4270|    236|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 120, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|    120|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|    120|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|    240|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 120]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|    120|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|    120|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|    120|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|    120|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|    120|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|    120|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|    120|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|    120|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|    120|    }                                                                          \
  |  |  |  |  |  | 4276|    236|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|    116|  }                                                                            \
  |  |  |  |  |  | 4278|    482|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|    482|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 116]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4332|    236|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4333|    116|    num_bits += 8;                                                             \
  |  |  |  | 4334|    116|  } while (num_bits < 15);
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4334:12): [True: 79, False: 37]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4358|    964|      } else {                                                                 \
  |  | 4359|    964|        bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) |           \
  |  | 4360|    964|                   (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8));      \
  |  | 4361|    964|        pIn_buf_cur += 2;                                                      \
  |  | 4362|    964|        num_bits += 16;                                                        \
  |  | 4363|    964|      }                                                                        \
  |  | 4364|  1.36k|    }                                                                          \
  |  | 4365|   882k|    if ((temp = pLookUp[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)         \
  |  |  ------------------
  |  |  |  Branch (4365:9): [True: 875k, False: 6.51k]
  |  |  ------------------
  |  | 4366|   882k|      code_len = temp >> 9, temp &= 511;                                       \
  |  | 4367|   882k|    else {                                                                     \
  |  | 4368|  6.51k|      code_len = TINFL_FAST_LOOKUP_BITS;                                       \
  |  | 4369|  23.1k|      do {                                                                     \
  |  | 4370|  23.1k|        temp = pTree[~temp + ((bit_buf >> code_len++) & 1)];                   \
  |  | 4371|  23.1k|      } while (temp < 0);                                                      \
  |  |  ------------------
  |  |  |  Branch (4371:16): [True: 16.6k, False: 6.51k]
  |  |  ------------------
  |  | 4372|  6.51k|    }                                                                          \
  |  | 4373|   882k|    sym = temp;                                                                \
  |  | 4374|   882k|    bit_buf >>= code_len;                                                      \
  |  | 4375|   882k|    num_bits -= code_len;                                                      \
  |  | 4376|   882k|  }                                                                            \
  |  | 4377|   882k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|   882k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 882k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4722|   882k|        num_extra = s_dist_extra[dist];
 4723|   882k|        dist = s_dist_base[dist];
 4724|   882k|        if (num_extra) {
  ------------------
  |  Branch (4724:13): [True: 45.9k, False: 836k]
  ------------------
 4725|  45.9k|          mz_uint extra_bits;
 4726|  45.9k|          TINFL_GET_BITS(27, extra_bits, num_extra);
  ------------------
  |  | 4297|  45.9k|  do {                                                                         \
  |  | 4298|  45.9k|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 674, False: 45.2k]
  |  |  ------------------
  |  | 4299|    674|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|    875|  do {                                                                         \
  |  |  |  | 4282|    875|    mz_uint c;                                                                 \
  |  |  |  | 4283|    875|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|    875|  do {                                                                         \
  |  |  |  |  |  | 4270|    875|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 61, False: 814]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|     61|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|     61|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|    122|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 61]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|     61|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|     61|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|     61|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|     61|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|     61|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|     61|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|     61|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|     61|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|     61|    }                                                                          \
  |  |  |  |  |  | 4276|    875|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|    814|  }                                                                            \
  |  |  |  |  |  | 4278|    875|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|    875|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 814]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|    875|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|    814|    num_bits += 8;                                                             \
  |  |  |  | 4286|    814|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 201, False: 613]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|    674|    }                                                                          \
  |  | 4301|  45.9k|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|  45.8k|    bit_buf >>= (n);                                                           \
  |  | 4303|  45.8k|    num_bits -= (n);                                                           \
  |  | 4304|  45.8k|  }                                                                            \
  |  | 4305|  45.9k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  45.9k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 45.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4727|  45.8k|          dist += extra_bits;
 4728|  45.8k|        }
 4729|       |
 4730|   882k|        dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
 4731|   882k|        if ((dist == 0 || dist > dist_from_out_buf_start ||
  ------------------
  |  Branch (4731:14): [True: 54, False: 882k]
  |  Branch (4731:27): [True: 112, False: 881k]
  ------------------
 4732|   881k|             dist_from_out_buf_start == 0) &&
  ------------------
  |  Branch (4732:14): [True: 0, False: 881k]
  ------------------
 4733|    166|            (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) {
  ------------------
  |  Branch (4733:13): [True: 166, False: 0]
  ------------------
 4734|    166|          TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
  ------------------
  |  | 4260|    166|  do {                                                                         \
  |  | 4261|    166|    for (;;) {                                                                 \
  |  | 4262|    166|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|    166|  do {                                                                         \
  |  |  |  | 4253|    166|    status = result;                                                           \
  |  |  |  | 4254|    166|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|    166|    goto common_exit;                                                          \
  |  |  |  | 4256|    166|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|    166|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|    166|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|    166|    }                                                                          \
  |  | 4264|    166|  }                                                                            \
  |  | 4265|    166|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|    166|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4735|    166|        }
 4736|       |
 4737|   881k|        pSrc = pOut_buf_start +
 4738|   881k|               ((dist_from_out_buf_start - dist) & out_buf_size_mask);
 4739|       |
 4740|   881k|        if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) {
  ------------------
  |  |  758|   881k|#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (758:23): [True: 881k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4740:13): [True: 71, False: 881k]
  ------------------
 4741|  2.13k|          while (counter--) {
  ------------------
  |  Branch (4741:18): [True: 2.13k, False: 0]
  ------------------
 4742|  2.13k|            while (pOut_buf_cur >= pOut_buf_end) {
  ------------------
  |  Branch (4742:20): [True: 71, False: 2.06k]
  ------------------
 4743|     71|              TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT);
  ------------------
  |  | 4252|     71|  do {                                                                         \
  |  | 4253|     71|    status = result;                                                           \
  |  | 4254|     71|    r->m_state = state_index;                                                  \
  |  | 4255|     71|    goto common_exit;                                                          \
  |  | 4256|     71|  case state_index:;                                                           \
  |  |  ------------------
  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  ------------------
  |  | 4257|      0|  }                                                                            \
  |  | 4258|     71|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|     71|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4744|     71|            }
 4745|  2.06k|            *pOut_buf_cur++ =
 4746|  2.06k|                pOut_buf_start[(dist_from_out_buf_start++ - dist) &
 4747|  2.06k|                               out_buf_size_mask];
 4748|  2.06k|          }
 4749|      0|          continue;
 4750|     71|        }
 4751|       |#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
 4752|       |        else if ((counter >= 9) && (counter <= dist)) {
 4753|       |          const mz_uint8 *pSrc_end = pSrc + (counter & ~7);
 4754|       |          do {
 4755|       |#ifdef MINIZ_UNALIGNED_USE_MEMCPY
 4756|       |            memcpy(pOut_buf_cur, pSrc, sizeof(mz_uint32) * 2);
 4757|       |#else
 4758|       |            ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0];
 4759|       |            ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1];
 4760|       |#endif
 4761|       |            pOut_buf_cur += 8;
 4762|       |          } while ((pSrc += 8) < pSrc_end);
 4763|       |          if ((counter &= 7) < 3) {
 4764|       |            if (counter) {
 4765|       |              pOut_buf_cur[0] = pSrc[0];
 4766|       |              if (counter > 1)
 4767|       |                pOut_buf_cur[1] = pSrc[1];
 4768|       |              pOut_buf_cur += counter;
 4769|       |            }
 4770|       |            continue;
 4771|       |          }
 4772|       |        }
 4773|       |#endif
 4774|  17.5M|        while (counter > 2) {
  ------------------
  |  Branch (4774:16): [True: 16.6M, False: 881k]
  ------------------
 4775|  16.6M|          pOut_buf_cur[0] = pSrc[0];
 4776|  16.6M|          pOut_buf_cur[1] = pSrc[1];
 4777|  16.6M|          pOut_buf_cur[2] = pSrc[2];
 4778|  16.6M|          pOut_buf_cur += 3;
 4779|  16.6M|          pSrc += 3;
 4780|  16.6M|          counter -= 3;
 4781|  16.6M|        }
 4782|   881k|        if (counter > 0) {
  ------------------
  |  Branch (4782:13): [True: 653k, False: 228k]
  ------------------
 4783|   653k|          pOut_buf_cur[0] = pSrc[0];
 4784|   653k|          if (counter > 1)
  ------------------
  |  Branch (4784:15): [True: 199k, False: 453k]
  ------------------
 4785|   199k|            pOut_buf_cur[1] = pSrc[1];
 4786|   653k|          pOut_buf_cur += counter;
 4787|   653k|        }
 4788|   881k|      }
 4789|  5.82k|    }
 4790|  9.52k|  } while (!(r->m_final & 1));
  ------------------
  |  Branch (4790:12): [True: 7.67k, False: 209]
  ------------------
 4791|       |
 4792|       |  /* Ensure byte alignment and put back any bytes from the bitbuf if we've
 4793|       |   * looked ahead too far on gzip, or other Deflate streams followed by
 4794|       |   * arbitrary data. */
 4795|       |  /* I'm being super conservative here. A number of simplifications can be made
 4796|       |   * to the byte alignment part, and the Adler32 check shouldn't ever need to
 4797|       |   * worry about reading from the bitbuf now. */
 4798|    209|  TINFL_SKIP_BITS(32, num_bits & 7);
  ------------------
  |  | 4288|    209|  do {                                                                         \
  |  | 4289|    209|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4289:9): [True: 0, False: 209]
  |  |  ------------------
  |  | 4290|      0|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|      0|  do {                                                                         \
  |  |  |  | 4282|      0|    mz_uint c;                                                                 \
  |  |  |  | 4283|      0|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|      0|  do {                                                                         \
  |  |  |  |  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|      0|    }                                                                          \
  |  |  |  |  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|      0|  }                                                                            \
  |  |  |  |  |  | 4278|      0|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|      0|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|      0|    num_bits += 8;                                                             \
  |  |  |  | 4286|      0|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4291|      0|    }                                                                          \
  |  | 4292|    209|    bit_buf >>= (n);                                                           \
  |  | 4293|    209|    num_bits -= (n);                                                           \
  |  | 4294|    209|  }                                                                            \
  |  | 4295|  1.87k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  1.87k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 209]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4799|    581|  while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) {
  ------------------
  |  Branch (4799:10): [True: 581, False: 0]
  |  Branch (4799:42): [True: 372, False: 209]
  ------------------
 4800|    372|    --pIn_buf_cur;
 4801|    372|    num_bits -= 8;
 4802|    372|  }
 4803|    209|  bit_buf &= ~(~(tinfl_bit_buf_t)0 << num_bits);
 4804|    209|  MZ_ASSERT(!num_bits); /* if this assert fires then we've read beyond the end
  ------------------
  |  |  746|    209|#define MZ_ASSERT(x) assert(x)
  ------------------
 4805|       |                           of non-deflate/zlib streams with following data (such
 4806|       |                           as gzip streams). */
 4807|       |
 4808|    209|  if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) {
  ------------------
  |  Branch (4808:7): [True: 0, False: 209]
  ------------------
 4809|      0|    for (counter = 0; counter < 4; ++counter) {
  ------------------
  |  Branch (4809:23): [True: 0, False: 0]
  ------------------
 4810|      0|      mz_uint s;
 4811|      0|      if (num_bits)
  ------------------
  |  Branch (4811:11): [True: 0, False: 0]
  ------------------
 4812|      0|        TINFL_GET_BITS(41, s, 8);
  ------------------
  |  | 4297|      0|  do {                                                                         \
  |  | 4298|      0|    if (num_bits < (mz_uint)(n)) {                                             \
  |  |  ------------------
  |  |  |  Branch (4298:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 4299|      0|      TINFL_NEED_BITS(state_index, n);                                         \
  |  |  ------------------
  |  |  |  | 4281|      0|  do {                                                                         \
  |  |  |  | 4282|      0|    mz_uint c;                                                                 \
  |  |  |  | 4283|      0|    TINFL_GET_BYTE(state_index, c);                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 4269|      0|  do {                                                                         \
  |  |  |  |  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  |  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  |  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  |  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  |  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  |  |  |  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  |  |  |  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  |  |  |  |  | 4275|      0|    }                                                                          \
  |  |  |  |  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  |  |  |  |  | 4277|      0|  }                                                                            \
  |  |  |  |  |  | 4278|      0|  MZ_MACRO_END
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 4284|      0|    bit_buf |= (((tinfl_bit_buf_t)c) << num_bits);                             \
  |  |  |  | 4285|      0|    num_bits += 8;                                                             \
  |  |  |  | 4286|      0|  } while (num_bits < (mz_uint)(n))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4286:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4300|      0|    }                                                                          \
  |  | 4301|      0|    b = bit_buf & ((1 << (n)) - 1);                                            \
  |  | 4302|      0|    bit_buf >>= (n);                                                           \
  |  | 4303|      0|    num_bits -= (n);                                                           \
  |  | 4304|      0|  }                                                                            \
  |  | 4305|      0|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4813|      0|      else
 4814|      0|        TINFL_GET_BYTE(42, s);
  ------------------
  |  | 4269|      0|  do {                                                                         \
  |  | 4270|      0|    while (pIn_buf_cur >= pIn_buf_end) {                                       \
  |  |  ------------------
  |  |  |  Branch (4270:12): [True: 0, False: 0]
  |  |  ------------------
  |  | 4271|      0|      TINFL_CR_RETURN(state_index,                                             \
  |  |  ------------------
  |  |  |  | 4252|      0|  do {                                                                         \
  |  |  |  | 4253|      0|    status = result;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4253:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 4254|      0|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|      0|    goto common_exit;                                                          \
  |  |  |  | 4256|      0|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|      0|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4272|      0|                      (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)               \
  |  | 4273|      0|                          ? TINFL_STATUS_NEEDS_MORE_INPUT                      \
  |  | 4274|      0|                          : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);         \
  |  | 4275|      0|    }                                                                          \
  |  | 4276|      0|    c = *pIn_buf_cur++;                                                        \
  |  | 4277|      0|  }                                                                            \
  |  | 4278|      0|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|      0|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4815|      0|      r->m_z_adler32 = (r->m_z_adler32 << 8) | s;
 4816|      0|    }
 4817|      0|  }
 4818|  1.87k|  TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE);
  ------------------
  |  | 4260|    209|  do {                                                                         \
  |  | 4261|    209|    for (;;) {                                                                 \
  |  | 4262|    209|      TINFL_CR_RETURN(state_index, result);                                    \
  |  |  ------------------
  |  |  |  | 4252|    209|  do {                                                                         \
  |  |  |  | 4253|    209|    status = result;                                                           \
  |  |  |  | 4254|    209|    r->m_state = state_index;                                                  \
  |  |  |  | 4255|    209|    goto common_exit;                                                          \
  |  |  |  | 4256|    209|  case state_index:;                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (4256:3): [True: 0, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  | 4257|      0|  }                                                                            \
  |  |  |  | 4258|    209|  MZ_MACRO_END
  |  |  |  |  ------------------
  |  |  |  |  |  |  726|    209|#define MZ_MACRO_END while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4263|    209|    }                                                                          \
  |  | 4264|    209|  }                                                                            \
  |  | 4265|    209|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|    209|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4819|       |
 4820|  1.87k|  TINFL_CR_FINISH
  ------------------
  |  | 4266|  1.87k|#define TINFL_CR_FINISH }
  ------------------
 4821|       |
 4822|  1.87k|common_exit:
 4823|       |  /* As long as we aren't telling the caller that we NEED more input to make
 4824|       |   * forward progress: */
 4825|       |  /* Put back any bytes from the bitbuf in case we've looked ahead too far on
 4826|       |   * gzip, or other Deflate streams followed by arbitrary data. */
 4827|       |  /* We need to be very careful here to NOT push back any bytes we definitely
 4828|       |   * know we need to make forward progress, though, or we'll lock the caller up
 4829|       |   * into an inf loop. */
 4830|  1.87k|  if ((status != TINFL_STATUS_NEEDS_MORE_INPUT) &&
  ------------------
  |  Branch (4830:7): [True: 1.87k, False: 0]
  ------------------
 4831|  1.87k|      (status != TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS)) {
  ------------------
  |  Branch (4831:7): [True: 1.14k, False: 727]
  ------------------
 4832|  2.82k|    while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) {
  ------------------
  |  Branch (4832:12): [True: 2.82k, False: 0]
  |  Branch (4832:44): [True: 1.68k, False: 1.14k]
  ------------------
 4833|  1.68k|      --pIn_buf_cur;
 4834|  1.68k|      num_bits -= 8;
 4835|  1.68k|    }
 4836|  1.14k|  }
 4837|  1.87k|  r->m_num_bits = num_bits;
 4838|  1.87k|  r->m_bit_buf = bit_buf & ~(~(tinfl_bit_buf_t)0 << num_bits);
 4839|  1.87k|  r->m_dist = dist;
 4840|  1.87k|  r->m_counter = counter;
 4841|  1.87k|  r->m_num_extra = num_extra;
 4842|  1.87k|  r->m_dist_from_out_buf_start = dist_from_out_buf_start;
 4843|  1.87k|  *pIn_buf_size = pIn_buf_cur - pIn_buf_next;
 4844|  1.87k|  *pOut_buf_size = pOut_buf_cur - pOut_buf_next;
 4845|  1.87k|  if ((decomp_flags &
  ------------------
  |  Branch (4845:7): [True: 0, False: 1.87k]
  ------------------
 4846|  1.87k|       (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) &&
 4847|      0|      (status >= 0)) {
  ------------------
  |  Branch (4847:7): [True: 0, False: 0]
  ------------------
 4848|      0|    const mz_uint8 *ptr = pOut_buf_next;
 4849|      0|    size_t buf_len = *pOut_buf_size;
 4850|      0|    mz_uint32 i, s1 = r->m_check_adler32 & 0xffff,
 4851|      0|                 s2 = r->m_check_adler32 >> 16;
 4852|      0|    size_t block_len = buf_len % 5552;
 4853|      0|    while (buf_len) {
  ------------------
  |  Branch (4853:12): [True: 0, False: 0]
  ------------------
 4854|      0|      for (i = 0; i + 7 < block_len; i += 8, ptr += 8) {
  ------------------
  |  Branch (4854:19): [True: 0, False: 0]
  ------------------
 4855|      0|        s1 += ptr[0], s2 += s1;
 4856|      0|        s1 += ptr[1], s2 += s1;
 4857|      0|        s1 += ptr[2], s2 += s1;
 4858|      0|        s1 += ptr[3], s2 += s1;
 4859|      0|        s1 += ptr[4], s2 += s1;
 4860|      0|        s1 += ptr[5], s2 += s1;
 4861|      0|        s1 += ptr[6], s2 += s1;
 4862|      0|        s1 += ptr[7], s2 += s1;
 4863|      0|      }
 4864|      0|      for (; i < block_len; ++i)
  ------------------
  |  Branch (4864:14): [True: 0, False: 0]
  ------------------
 4865|      0|        s1 += *ptr++, s2 += s1;
 4866|      0|      s1 %= 65521U, s2 %= 65521U;
 4867|      0|      buf_len -= block_len;
 4868|      0|      block_len = 5552;
 4869|      0|    }
 4870|      0|    r->m_check_adler32 = (s2 << 16) + s1;
 4871|      0|    if ((status == TINFL_STATUS_DONE) &&
  ------------------
  |  Branch (4871:9): [True: 0, False: 0]
  ------------------
 4872|      0|        (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) &&
  ------------------
  |  Branch (4872:9): [True: 0, False: 0]
  ------------------
 4873|      0|        (r->m_check_adler32 != r->m_z_adler32))
  ------------------
  |  Branch (4873:9): [True: 0, False: 0]
  ------------------
 4874|      0|      status = TINFL_STATUS_ADLER32_MISMATCH;
 4875|      0|  }
 4876|  1.87k|  return status;
 4877|  1.87k|}
mz_zip_reader_end:
 6105|  3.07k|mz_bool mz_zip_reader_end(mz_zip_archive *pZip) {
 6106|  3.07k|  return mz_zip_reader_end_internal(pZip, MZ_TRUE);
  ------------------
  |  |  719|  3.07k|#define MZ_TRUE (1)
  ------------------
 6107|  3.07k|}
mz_zip_reader_init_mem:
 6138|  4.52k|                               size_t size, mz_uint flags) {
 6139|  4.52k|  if (!pMem)
  ------------------
  |  Branch (6139:7): [True: 0, False: 4.52k]
  ------------------
 6140|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6141|       |
 6142|  4.52k|  if (size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
  ------------------
  |  Branch (6142:7): [True: 10, False: 4.51k]
  ------------------
 6143|     10|    return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
 6144|       |
 6145|  4.51k|  if (!mz_zip_reader_init_internal(pZip, flags))
  ------------------
  |  Branch (6145:7): [True: 0, False: 4.51k]
  ------------------
 6146|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6147|       |
 6148|  4.51k|  pZip->m_zip_type = MZ_ZIP_TYPE_MEMORY;
 6149|  4.51k|  pZip->m_archive_size = size;
 6150|  4.51k|  pZip->m_pRead = mz_zip_mem_read_func;
 6151|  4.51k|  pZip->m_pIO_opaque = pZip;
 6152|  4.51k|  pZip->m_pNeeds_keepalive = NULL;
 6153|       |
 6154|       |#ifdef __cplusplus
 6155|       |  pZip->m_pState->m_pMem = const_cast<void *>(pMem);
 6156|       |#else
 6157|  4.51k|  pZip->m_pState->m_pMem = (void *)pMem;
 6158|  4.51k|#endif
 6159|       |
 6160|  4.51k|  pZip->m_pState->m_mem_size = size;
 6161|       |
 6162|  4.51k|  if (!mz_zip_reader_read_central_dir(pZip, flags)) {
  ------------------
  |  Branch (6162:7): [True: 1.44k, False: 3.07k]
  ------------------
 6163|  1.44k|    mz_zip_reader_end_internal(pZip, MZ_FALSE);
  ------------------
  |  |  718|  1.44k|#define MZ_FALSE (0)
  ------------------
 6164|  1.44k|    return MZ_FALSE;
  ------------------
  |  |  718|  1.44k|#define MZ_FALSE (0)
  ------------------
 6165|  1.44k|  }
 6166|       |
 6167|  3.07k|  return MZ_TRUE;
  ------------------
  |  |  719|  3.07k|#define MZ_TRUE (1)
  ------------------
 6168|  4.51k|}
mz_zip_reader_is_file_encrypted:
 6296|  24.7k|                                        mz_uint file_index) {
 6297|  24.7k|  mz_uint m_bit_flag;
 6298|  24.7k|  const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
 6299|  24.7k|  if (!p) {
  ------------------
  |  Branch (6299:7): [True: 0, False: 24.7k]
  ------------------
 6300|      0|    mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6301|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6302|      0|  }
 6303|       |
 6304|  24.7k|  m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6305|  24.7k|  return (m_bit_flag &
 6306|  24.7k|          (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED |
 6307|  24.7k|           MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0;
 6308|  24.7k|}
mz_zip_reader_is_file_supported:
 6311|  24.7k|                                        mz_uint file_index) {
 6312|  24.7k|  mz_uint bit_flag;
 6313|  24.7k|  mz_uint method;
 6314|       |
 6315|  24.7k|  const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
 6316|  24.7k|  if (!p) {
  ------------------
  |  Branch (6316:7): [True: 0, False: 24.7k]
  ------------------
 6317|      0|    mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6318|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6319|      0|  }
 6320|       |
 6321|  24.7k|  method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6322|  24.7k|  bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6323|       |
 6324|  24.7k|  if ((method != 0) && (method != MZ_DEFLATED)) {
  ------------------
  |  |  316|  17.3k|#define MZ_DEFLATED 8
  ------------------
  |  Branch (6324:7): [True: 17.3k, False: 7.39k]
  |  Branch (6324:24): [True: 7.43k, False: 9.89k]
  ------------------
 6325|  7.43k|    mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD);
 6326|  7.43k|    return MZ_FALSE;
  ------------------
  |  |  718|  7.43k|#define MZ_FALSE (0)
  ------------------
 6327|  7.43k|  }
 6328|       |
 6329|  17.2k|  if (bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED |
  ------------------
  |  Branch (6329:7): [True: 2.30k, False: 14.9k]
  ------------------
 6330|  17.2k|                  MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) {
 6331|  2.30k|    mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION);
 6332|  2.30k|    return MZ_FALSE;
  ------------------
  |  |  718|  2.30k|#define MZ_FALSE (0)
  ------------------
 6333|  2.30k|  }
 6334|       |
 6335|  14.9k|  if (bit_flag & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG) {
  ------------------
  |  Branch (6335:7): [True: 272, False: 14.7k]
  ------------------
 6336|    272|    mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE);
 6337|    272|    return MZ_FALSE;
  ------------------
  |  |  718|    272|#define MZ_FALSE (0)
  ------------------
 6338|    272|  }
 6339|       |
 6340|  14.7k|  return MZ_TRUE;
  ------------------
  |  |  719|  14.7k|#define MZ_TRUE (1)
  ------------------
 6341|  14.9k|}
mz_zip_reader_is_file_a_directory:
 6344|  24.7k|                                          mz_uint file_index) {
 6345|  24.7k|  mz_uint filename_len, attribute_mapping_id, external_attr;
 6346|  24.7k|  const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
 6347|  24.7k|  if (!p) {
  ------------------
  |  Branch (6347:7): [True: 0, False: 24.7k]
  ------------------
 6348|      0|    mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6349|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6350|      0|  }
 6351|       |
 6352|  24.7k|  filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6353|  24.7k|  if (filename_len) {
  ------------------
  |  Branch (6353:7): [True: 23.6k, False: 1.12k]
  ------------------
 6354|  23.6k|    if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/')
  ------------------
  |  Branch (6354:9): [True: 358, False: 23.2k]
  ------------------
 6355|    358|      return MZ_TRUE;
  ------------------
  |  |  719|    358|#define MZ_TRUE (1)
  ------------------
 6356|  23.6k|  }
 6357|       |
 6358|       |  /* Bugfix: This code was also checking if the internal attribute was non-zero,
 6359|       |   * which wasn't correct. */
 6360|       |  /* Most/all zip writers (hopefully) set DOS file/directory attributes in the
 6361|       |   * low 16-bits, so check for the DOS directory flag and ignore the source OS
 6362|       |   * ID in the created by field. */
 6363|       |  /* FIXME: Remove this check? Is it necessary - we already check the filename.
 6364|       |   */
 6365|  24.3k|  attribute_mapping_id = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS) >> 8;
  ------------------
  |  |  769|  24.3k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.3k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6366|  24.3k|  (void)attribute_mapping_id;
 6367|       |
 6368|  24.3k|  external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
  ------------------
  |  |  772|  24.3k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  24.3k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  24.3k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  24.3k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 6369|  24.3k|  if ((external_attr & MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG) != 0) {
  ------------------
  |  Branch (6369:7): [True: 5.95k, False: 18.4k]
  ------------------
 6370|  5.95k|    return MZ_TRUE;
  ------------------
  |  |  719|  5.95k|#define MZ_TRUE (1)
  ------------------
 6371|  5.95k|  }
 6372|       |
 6373|  18.4k|  return MZ_FALSE;
  ------------------
  |  |  718|  18.4k|#define MZ_FALSE (0)
  ------------------
 6374|  24.3k|}
mz_zip_reader_locate_file:
 6581|  5.90k|                              const char *pComment, mz_uint flags) {
 6582|  5.90k|  mz_uint32 index;
 6583|  5.90k|  if (!mz_zip_reader_locate_file_v2(pZip, pName, pComment, flags, &index))
  ------------------
  |  Branch (6583:7): [True: 757, False: 5.15k]
  ------------------
 6584|    757|    return -1;
 6585|  5.15k|  else
 6586|  5.15k|    return (int)index;
 6587|  5.90k|}
mz_zip_reader_locate_file_v2:
 6591|  5.90k|                                     mz_uint32 *pIndex) {
 6592|  5.90k|  mz_uint file_index;
 6593|  5.90k|  size_t name_len, comment_len;
 6594|       |
 6595|  5.90k|  if (pIndex)
  ------------------
  |  Branch (6595:7): [True: 5.90k, False: 0]
  ------------------
 6596|  5.90k|    *pIndex = 0;
 6597|       |
 6598|  5.90k|  if ((!pZip) || (!pZip->m_pState) || (!pName))
  ------------------
  |  Branch (6598:7): [True: 0, False: 5.90k]
  |  Branch (6598:18): [True: 0, False: 5.90k]
  |  Branch (6598:39): [True: 0, False: 5.90k]
  ------------------
 6599|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6600|       |
 6601|       |  /* See if we can use a binary search */
 6602|  5.90k|  if (((pZip->m_pState->m_init_flags &
  ------------------
  |  Branch (6602:7): [True: 5.90k, False: 0]
  ------------------
 6603|  5.90k|        MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0) &&
 6604|  5.90k|      (pZip->m_zip_mode == MZ_ZIP_MODE_READING) &&
  ------------------
  |  Branch (6604:7): [True: 5.90k, False: 0]
  ------------------
 6605|  5.90k|      ((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) &&
  ------------------
  |  Branch (6605:7): [True: 0, False: 5.90k]
  ------------------
 6606|      0|      (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size)) {
  ------------------
  |  Branch (6606:7): [True: 0, False: 0]
  |  Branch (6606:22): [True: 0, False: 0]
  ------------------
 6607|      0|    return mz_zip_locate_file_binary_search(pZip, pName, pIndex);
 6608|      0|  }
 6609|       |
 6610|       |  /* Locate the entry by scanning the entire central directory */
 6611|  5.90k|  name_len = strlen(pName);
 6612|  5.90k|  if (name_len > MZ_UINT16_MAX)
  ------------------
  |  |  793|  5.90k|#define MZ_UINT16_MAX (0xFFFFU)
  ------------------
  |  Branch (6612:7): [True: 0, False: 5.90k]
  ------------------
 6613|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6614|       |
 6615|  5.90k|  comment_len = pComment ? strlen(pComment) : 0;
  ------------------
  |  Branch (6615:17): [True: 0, False: 5.90k]
  ------------------
 6616|  5.90k|  if (comment_len > MZ_UINT16_MAX)
  ------------------
  |  |  793|  5.90k|#define MZ_UINT16_MAX (0xFFFFU)
  ------------------
  |  Branch (6616:7): [True: 0, False: 5.90k]
  ------------------
 6617|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6618|       |
 6619|  21.3k|  for (file_index = 0; file_index < pZip->m_total_files; file_index++) {
  ------------------
  |  Branch (6619:24): [True: 20.5k, False: 757]
  ------------------
 6620|  20.5k|    const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT(
  ------------------
  |  | 5365|  20.5k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 6621|  20.5k|        &pZip->m_pState->m_central_dir, mz_uint8,
 6622|  20.5k|        MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32,
 6623|  20.5k|                             file_index));
 6624|  20.5k|    mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|  20.5k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  20.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6625|  20.5k|    const char *pFilename =
 6626|  20.5k|        (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
 6627|  20.5k|    if (filename_len < name_len)
  ------------------
  |  Branch (6627:9): [True: 2.72k, False: 17.8k]
  ------------------
 6628|  2.72k|      continue;
 6629|  17.8k|    if (comment_len) {
  ------------------
  |  Branch (6629:9): [True: 0, False: 17.8k]
  ------------------
 6630|      0|      mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS),
  ------------------
  |  |  769|      0|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|      0|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6631|      0|              file_comment_len =
 6632|      0|                  MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS);
  ------------------
  |  |  769|      0|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|      0|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6633|      0|      const char *pFile_comment = pFilename + filename_len + file_extra_len;
 6634|      0|      if ((file_comment_len != comment_len) ||
  ------------------
  |  Branch (6634:11): [True: 0, False: 0]
  ------------------
 6635|      0|          (!mz_zip_string_equal(pComment, pFile_comment, file_comment_len,
  ------------------
  |  Branch (6635:11): [True: 0, False: 0]
  ------------------
 6636|      0|                                flags)))
 6637|      0|        continue;
 6638|      0|    }
 6639|  17.8k|    if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len)) {
  ------------------
  |  Branch (6639:9): [True: 0, False: 17.8k]
  |  Branch (6639:46): [True: 0, False: 0]
  ------------------
 6640|      0|      int ofs = filename_len - 1;
 6641|      0|      do {
 6642|      0|        if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') ||
  ------------------
  |  Branch (6642:13): [True: 0, False: 0]
  |  Branch (6642:40): [True: 0, False: 0]
  ------------------
 6643|      0|            (pFilename[ofs] == ':'))
  ------------------
  |  Branch (6643:13): [True: 0, False: 0]
  ------------------
 6644|      0|          break;
 6645|      0|      } while (--ofs >= 0);
  ------------------
  |  Branch (6645:16): [True: 0, False: 0]
  ------------------
 6646|      0|      ofs++;
 6647|      0|      pFilename += ofs;
 6648|      0|      filename_len -= ofs;
 6649|      0|    }
 6650|  17.8k|    if ((filename_len == name_len) &&
  ------------------
  |  Branch (6650:9): [True: 10.2k, False: 7.64k]
  ------------------
 6651|  10.2k|        (mz_zip_string_equal(pName, pFilename, filename_len, flags))) {
  ------------------
  |  Branch (6651:9): [True: 5.15k, False: 5.06k]
  ------------------
 6652|  5.15k|      if (pIndex)
  ------------------
  |  Branch (6652:11): [True: 5.15k, False: 0]
  ------------------
 6653|  5.15k|        *pIndex = file_index;
 6654|  5.15k|      return MZ_TRUE;
  ------------------
  |  |  719|  5.15k|#define MZ_TRUE (1)
  ------------------
 6655|  5.15k|    }
 6656|  17.8k|  }
 6657|       |
 6658|    757|  return mz_zip_set_error(pZip, MZ_ZIP_FILE_NOT_FOUND);
 6659|  5.90k|}
mz_zip_reader_extract_to_mem_no_alloc:
 6825|  3.30k|                                              size_t user_read_buf_size) {
 6826|  3.30k|  return mz_zip_reader_extract_to_mem_no_alloc1(pZip, file_index, pBuf,
 6827|  3.30k|                                                buf_size, flags, pUser_read_buf,
 6828|       |                                                user_read_buf_size, NULL);
 6829|  3.30k|}
mz_zip_reader_file_stat:
10231|  24.7k|                                mz_zip_archive_file_stat *pStat) {
10232|  24.7k|  return mz_zip_file_stat_internal(
10233|       |      pZip, file_index, mz_zip_get_cdh(pZip, file_index), pStat, NULL);
10234|  24.7k|}
zip.c:tinfl_clear_tree:
 4379|  13.1k|static void tinfl_clear_tree(tinfl_decompressor *r) {
 4380|  13.1k|  if (r->m_type == 0)
  ------------------
  |  Branch (4380:7): [True: 5.87k, False: 7.24k]
  ------------------
 4381|  5.87k|    MZ_CLEAR_ARR(r->m_tree_0);
  ------------------
  |  |  761|  5.87k|#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
  ------------------
 4382|  7.24k|  else if (r->m_type == 1)
  ------------------
  |  Branch (4382:12): [True: 5.87k, False: 1.37k]
  ------------------
 4383|  5.87k|    MZ_CLEAR_ARR(r->m_tree_1);
  ------------------
  |  |  761|  5.87k|#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
  ------------------
 4384|  1.37k|  else
 4385|  1.37k|    MZ_CLEAR_ARR(r->m_tree_2);
  ------------------
  |  |  761|  1.37k|#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
  ------------------
 4386|  13.1k|}
zip.c:mz_zip_reader_end_internal:
 6063|  4.51k|                                          mz_bool set_last_error) {
 6064|  4.51k|  mz_bool status = MZ_TRUE;
  ------------------
  |  |  719|  4.51k|#define MZ_TRUE (1)
  ------------------
 6065|       |
 6066|  4.51k|  if (!pZip)
  ------------------
  |  Branch (6066:7): [True: 0, False: 4.51k]
  ------------------
 6067|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6068|       |
 6069|  4.51k|  if ((!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) ||
  ------------------
  |  Branch (6069:7): [True: 0, False: 4.51k]
  |  Branch (6069:28): [True: 0, False: 4.51k]
  |  Branch (6069:49): [True: 0, False: 4.51k]
  ------------------
 6070|  4.51k|      (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) {
  ------------------
  |  Branch (6070:7): [True: 0, False: 4.51k]
  ------------------
 6071|      0|    if (set_last_error)
  ------------------
  |  Branch (6071:9): [True: 0, False: 0]
  ------------------
 6072|      0|      pZip->m_last_error = MZ_ZIP_INVALID_PARAMETER;
 6073|       |
 6074|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6075|      0|  }
 6076|       |
 6077|  4.51k|  if (pZip->m_pState) {
  ------------------
  |  Branch (6077:7): [True: 4.51k, False: 0]
  ------------------
 6078|  4.51k|    mz_zip_internal_state *pState = pZip->m_pState;
 6079|  4.51k|    pZip->m_pState = NULL;
 6080|       |
 6081|  4.51k|    mz_zip_array_clear(pZip, &pState->m_central_dir);
 6082|  4.51k|    mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
 6083|  4.51k|    mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
 6084|       |
 6085|       |#ifndef MINIZ_NO_STDIO
 6086|       |    if (pState->m_pFile) {
 6087|       |      if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) {
 6088|       |        if (MZ_FCLOSE(pState->m_pFile) == EOF) {
 6089|       |          if (set_last_error)
 6090|       |            pZip->m_last_error = MZ_ZIP_FILE_CLOSE_FAILED;
 6091|       |          status = MZ_FALSE;
 6092|       |        }
 6093|       |      }
 6094|       |      pState->m_pFile = NULL;
 6095|       |    }
 6096|       |#endif /* #ifndef MINIZ_NO_STDIO */
 6097|       |
 6098|  4.51k|    pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
 6099|  4.51k|  }
 6100|  4.51k|  pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
 6101|       |
 6102|  4.51k|  return status;
 6103|  4.51k|}
zip.c:mz_zip_set_error:
 5513|  16.1k|                                               mz_zip_error err_num) {
 5514|  16.1k|  if (pZip)
  ------------------
  |  Branch (5514:7): [True: 16.1k, False: 0]
  ------------------
 5515|  16.1k|    pZip->m_last_error = err_num;
 5516|  16.1k|  return MZ_FALSE;
  ------------------
  |  |  718|  16.1k|#define MZ_FALSE (0)
  ------------------
 5517|  16.1k|}
zip.c:mz_zip_reader_init_internal:
 5520|  4.51k|                                           mz_uint flags) {
 5521|  4.51k|  (void)flags;
 5522|  4.51k|  if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
  ------------------
  |  Branch (5522:7): [True: 0, False: 4.51k]
  |  Branch (5522:18): [True: 0, False: 4.51k]
  |  Branch (5522:38): [True: 0, False: 4.51k]
  ------------------
 5523|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 5524|       |
 5525|  4.51k|  if (!pZip->m_pAlloc)
  ------------------
  |  Branch (5525:7): [True: 4.51k, False: 0]
  ------------------
 5526|  4.51k|    pZip->m_pAlloc = miniz_def_alloc_func;
 5527|  4.51k|  if (!pZip->m_pFree)
  ------------------
  |  Branch (5527:7): [True: 4.51k, False: 0]
  ------------------
 5528|  4.51k|    pZip->m_pFree = miniz_def_free_func;
 5529|  4.51k|  if (!pZip->m_pRealloc)
  ------------------
  |  Branch (5529:7): [True: 4.51k, False: 0]
  ------------------
 5530|  4.51k|    pZip->m_pRealloc = miniz_def_realloc_func;
 5531|       |
 5532|  4.51k|  pZip->m_archive_size = 0;
 5533|  4.51k|  pZip->m_central_directory_file_ofs = 0;
 5534|  4.51k|  pZip->m_total_files = 0;
 5535|  4.51k|  pZip->m_last_error = MZ_ZIP_NO_ERROR;
 5536|       |
 5537|  4.51k|  if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(
  ------------------
  |  Branch (5537:7): [True: 0, False: 4.51k]
  ------------------
 5538|  4.51k|                   pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
 5539|      0|    return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
 5540|       |
 5541|  4.51k|  memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
 5542|  4.51k|  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir,
  ------------------
  |  | 5352|  4.51k|  (array_ptr)->m_element_size = element_size
  ------------------
 5543|  4.51k|                                sizeof(mz_uint8));
 5544|  4.51k|  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets,
  ------------------
  |  | 5352|  4.51k|  (array_ptr)->m_element_size = element_size
  ------------------
 5545|  4.51k|                                sizeof(mz_uint32));
 5546|  4.51k|  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets,
  ------------------
  |  | 5352|  4.51k|  (array_ptr)->m_element_size = element_size
  ------------------
 5547|  4.51k|                                sizeof(mz_uint32));
 5548|  4.51k|  pZip->m_pState->m_init_flags = flags;
 5549|  4.51k|  pZip->m_pState->m_zip64 = MZ_FALSE;
  ------------------
  |  |  718|  4.51k|#define MZ_FALSE (0)
  ------------------
 5550|  4.51k|  pZip->m_pState->m_zip64_has_extended_info_fields = MZ_FALSE;
  ------------------
  |  |  718|  4.51k|#define MZ_FALSE (0)
  ------------------
 5551|       |
 5552|  4.51k|  pZip->m_zip_mode = MZ_ZIP_MODE_READING;
 5553|       |
 5554|  4.51k|  return MZ_TRUE;
  ------------------
  |  |  719|  4.51k|#define MZ_TRUE (1)
  ------------------
 5555|  4.51k|}
zip.c:mz_zip_reader_read_central_dir:
 5715|  4.51k|                                              mz_uint flags) {
 5716|  4.51k|  mz_uint cdir_size = 0, cdir_entries_on_this_disk = 0, num_this_disk = 0,
 5717|  4.51k|          cdir_disk_index = 0;
 5718|  4.51k|  mz_uint64 cdir_ofs = 0, eocd_ofs = 0, archive_ofs = 0;
 5719|  4.51k|  mz_int64 cur_file_ofs = 0;
 5720|  4.51k|  const mz_uint8 *p;
 5721|       |
 5722|  4.51k|  mz_uint32 buf_u32[4096 / sizeof(mz_uint32)];
 5723|  4.51k|  mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
 5724|  4.51k|  mz_bool sort_central_dir =
 5725|  4.51k|      ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
 5726|  4.51k|  mz_uint32 zip64_end_of_central_dir_locator_u32
 5727|  4.51k|      [(MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + sizeof(mz_uint32) - 1) /
 5728|  4.51k|       sizeof(mz_uint32)];
 5729|  4.51k|  mz_uint8 *pZip64_locator = (mz_uint8 *)zip64_end_of_central_dir_locator_u32;
 5730|       |
 5731|  4.51k|  mz_uint32 zip64_end_of_central_dir_header_u32
 5732|  4.51k|      [(MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) /
 5733|  4.51k|       sizeof(mz_uint32)];
 5734|  4.51k|  mz_uint8 *pZip64_end_of_central_dir =
 5735|  4.51k|      (mz_uint8 *)zip64_end_of_central_dir_header_u32;
 5736|       |
 5737|  4.51k|  mz_uint64 zip64_end_of_central_dir_ofs = 0;
 5738|       |
 5739|       |  /* Basic sanity checks - reject files which are too small, and check the first
 5740|       |   * 4 bytes of the file to make sure a local header is there. */
 5741|  4.51k|  if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
  ------------------
  |  Branch (5741:7): [True: 0, False: 4.51k]
  ------------------
 5742|      0|    return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
 5743|       |
 5744|  4.51k|  if (!mz_zip_reader_locate_header_sig(
  ------------------
  |  Branch (5744:7): [True: 78, False: 4.43k]
  ------------------
 5745|  4.51k|          pZip, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG,
 5746|  4.51k|          MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, &cur_file_ofs))
 5747|     78|    return mz_zip_set_error(pZip, MZ_ZIP_FAILED_FINDING_CENTRAL_DIR);
 5748|       |
 5749|  4.43k|  eocd_ofs = cur_file_ofs;
 5750|       |  /* Read and verify the end of central directory record. */
 5751|  4.43k|  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf,
  ------------------
  |  Branch (5751:7): [True: 0, False: 4.43k]
  ------------------
 5752|  4.43k|                    MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) !=
 5753|  4.43k|      MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
 5754|      0|    return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
 5755|       |
 5756|  4.43k|  if (MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) !=
  ------------------
  |  |  772|  4.43k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  4.43k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  4.43k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  4.43k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (5756:7): [True: 0, False: 4.43k]
  ------------------
 5757|  4.43k|      MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
 5758|      0|    return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
 5759|       |
 5760|  4.43k|  if (cur_file_ofs >= (MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE +
  ------------------
  |  Branch (5760:7): [True: 2.53k, False: 1.89k]
  ------------------
 5761|  4.43k|                       MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)) {
 5762|  2.53k|    if (pZip->m_pRead(pZip->m_pIO_opaque,
  ------------------
  |  Branch (5762:9): [True: 2.53k, False: 0]
  ------------------
 5763|  2.53k|                      cur_file_ofs - MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE,
 5764|  2.53k|                      pZip64_locator,
 5765|  2.53k|                      MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) ==
 5766|  2.53k|        MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) {
 5767|  2.53k|      if (MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_SIG_OFS) ==
  ------------------
  |  |  772|  2.53k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  2.53k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  2.53k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  2.53k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (5767:11): [True: 620, False: 1.91k]
  ------------------
 5768|  2.53k|          MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG) {
 5769|    620|        pZip->m_pState->m_zip64 = MZ_TRUE;
  ------------------
  |  |  719|    620|#define MZ_TRUE (1)
  ------------------
 5770|    620|      }
 5771|  2.53k|    }
 5772|  2.53k|  }
 5773|       |
 5774|  4.43k|  if (pZip->m_pState->m_zip64) {
  ------------------
  |  Branch (5774:7): [True: 620, False: 3.81k]
  ------------------
 5775|       |    /* Try locating the EOCD64 right before the EOCD64 locator. This works even
 5776|       |     * when the effective start of the zip header is not yet known. */
 5777|    620|    if (cur_file_ofs < MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE +
  ------------------
  |  Branch (5777:9): [True: 0, False: 620]
  ------------------
 5778|    620|                           MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)
 5779|      0|      return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
 5780|       |
 5781|    620|    zip64_end_of_central_dir_ofs = cur_file_ofs -
 5782|    620|                                   MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE -
 5783|    620|                                   MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE;
 5784|       |
 5785|    620|    if (!mz_zip_reader_eocd64_valid(pZip, zip64_end_of_central_dir_ofs,
  ------------------
  |  Branch (5785:9): [True: 422, False: 198]
  ------------------
 5786|    620|                                    pZip64_end_of_central_dir)) {
 5787|       |      /* That failed, try reading where the locator tells us to. */
 5788|    422|      zip64_end_of_central_dir_ofs = MZ_READ_LE64(
  ------------------
  |  |  779|    422|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    422|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    422|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    422|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    422|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    422|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    422|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    422|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    422|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    422|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    422|    << 32U))
  ------------------
 5789|    422|          pZip64_locator + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS);
 5790|       |
 5791|    422|      if (zip64_end_of_central_dir_ofs >
  ------------------
  |  Branch (5791:11): [True: 105, False: 317]
  ------------------
 5792|    422|          (pZip->m_archive_size - MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE))
 5793|    105|        return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
 5794|       |
 5795|    317|      if (!mz_zip_reader_eocd64_valid(pZip, zip64_end_of_central_dir_ofs,
  ------------------
  |  Branch (5795:11): [True: 59, False: 258]
  ------------------
 5796|    317|                                      pZip64_end_of_central_dir))
 5797|     59|        return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
 5798|    317|    }
 5799|    620|  }
 5800|       |
 5801|  4.27k|  pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS);
  ------------------
  |  |  769|  4.27k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5802|  4.27k|  cdir_entries_on_this_disk =
 5803|  4.27k|      MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS);
  ------------------
  |  |  769|  4.27k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5804|  4.27k|  num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS);
  ------------------
  |  |  769|  4.27k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5805|  4.27k|  cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS);
  ------------------
  |  |  769|  4.27k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5806|  4.27k|  cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS);
  ------------------
  |  |  772|  4.27k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5807|  4.27k|  cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);
  ------------------
  |  |  772|  4.27k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  4.27k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5808|       |
 5809|  4.27k|  if (pZip->m_pState->m_zip64) {
  ------------------
  |  Branch (5809:7): [True: 456, False: 3.81k]
  ------------------
 5810|    456|    mz_uint32 zip64_total_num_of_disks =
 5811|    456|        MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS);
  ------------------
  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5812|    456|    mz_uint64 zip64_cdir_total_entries = MZ_READ_LE64(
  ------------------
  |  |  779|    456|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    456|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    456|    << 32U))
  ------------------
 5813|    456|        pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS);
 5814|    456|    mz_uint64 zip64_cdir_total_entries_on_this_disk = MZ_READ_LE64(
  ------------------
  |  |  779|    456|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    456|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    456|    << 32U))
  ------------------
 5815|    456|        pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS);
 5816|    456|    mz_uint64 zip64_size_of_end_of_central_dir_record = MZ_READ_LE64(
  ------------------
  |  |  779|    456|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    456|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    456|    << 32U))
  ------------------
 5817|    456|        pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS);
 5818|    456|    mz_uint64 zip64_size_of_central_directory =
 5819|    456|        MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_SIZE_OFS);
  ------------------
  |  |  779|    456|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    456|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    456|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    456|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    456|    << 32U))
  ------------------
 5820|       |
 5821|    456|    if (zip64_size_of_end_of_central_dir_record <
  ------------------
  |  Branch (5821:9): [True: 5, False: 451]
  ------------------
 5822|    456|        (MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - 12))
 5823|      5|      return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5824|       |
 5825|    451|    if (zip64_total_num_of_disks != 1U)
  ------------------
  |  Branch (5825:9): [True: 47, False: 404]
  ------------------
 5826|     47|      return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
 5827|       |
 5828|       |    /* Check for miniz's practical limits */
 5829|    404|    if (zip64_cdir_total_entries > MZ_UINT32_MAX)
  ------------------
  |  |  794|    404|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (5829:9): [True: 60, False: 344]
  ------------------
 5830|     60|      return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
 5831|       |
 5832|    344|    pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries;
 5833|       |
 5834|    344|    if (zip64_cdir_total_entries_on_this_disk > MZ_UINT32_MAX)
  ------------------
  |  |  794|    344|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (5834:9): [True: 58, False: 286]
  ------------------
 5835|     58|      return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
 5836|       |
 5837|    286|    cdir_entries_on_this_disk =
 5838|    286|        (mz_uint32)zip64_cdir_total_entries_on_this_disk;
 5839|       |
 5840|       |    /* Check for miniz's current practical limits (sorry, this should be enough
 5841|       |     * for millions of files) */
 5842|    286|    if (zip64_size_of_central_directory > MZ_UINT32_MAX)
  ------------------
  |  |  794|    286|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (5842:9): [True: 51, False: 235]
  ------------------
 5843|     51|      return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE);
 5844|       |
 5845|    235|    cdir_size = (mz_uint32)zip64_size_of_central_directory;
 5846|       |
 5847|    235|    num_this_disk = MZ_READ_LE32(pZip64_end_of_central_dir +
  ------------------
  |  |  772|    235|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5848|    235|                                 MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS);
 5849|       |
 5850|    235|    cdir_disk_index = MZ_READ_LE32(pZip64_end_of_central_dir +
  ------------------
  |  |  772|    235|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5851|    235|                                   MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS);
 5852|       |
 5853|    235|    cdir_ofs =
 5854|    235|        MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_OFS_OFS);
  ------------------
  |  |  779|    235|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    235|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    235|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    235|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    235|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    235|    << 32U))
  ------------------
 5855|    235|  }
 5856|       |
 5857|  4.05k|  if (pZip->m_total_files != cdir_entries_on_this_disk)
  ------------------
  |  Branch (5857:7): [True: 105, False: 3.94k]
  ------------------
 5858|    105|    return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
 5859|       |
 5860|  3.94k|  if (((num_this_disk | cdir_disk_index) != 0) &&
  ------------------
  |  Branch (5860:7): [True: 1.55k, False: 2.39k]
  ------------------
 5861|  1.55k|      ((num_this_disk != 1) || (cdir_disk_index != 1)))
  ------------------
  |  Branch (5861:8): [True: 73, False: 1.47k]
  |  Branch (5861:32): [True: 57, False: 1.42k]
  ------------------
 5862|    130|    return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
 5863|       |
 5864|  3.81k|  if (cdir_size <
  ------------------
  |  Branch (5864:7): [True: 46, False: 3.77k]
  ------------------
 5865|  3.81k|      (mz_uint64)pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
 5866|     46|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5867|       |
 5868|  3.77k|  if (cdir_size > pZip->m_archive_size ||
  ------------------
  |  Branch (5868:7): [True: 54, False: 3.71k]
  ------------------
 5869|  3.71k|      cdir_ofs > pZip->m_archive_size - cdir_size)
  ------------------
  |  Branch (5869:7): [True: 133, False: 3.58k]
  ------------------
 5870|    187|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5871|       |
 5872|  3.58k|  if (eocd_ofs < cdir_ofs + cdir_size)
  ------------------
  |  Branch (5872:7): [True: 15, False: 3.57k]
  ------------------
 5873|     15|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5874|       |
 5875|       |  /* The end of central dir follows the central dir, unless the zip file has
 5876|       |   * some trailing data (e.g. it is appended to an executable file). */
 5877|  3.57k|  archive_ofs = eocd_ofs - (cdir_ofs + cdir_size);
 5878|  3.57k|  if (pZip->m_pState->m_zip64) {
  ------------------
  |  Branch (5878:7): [True: 27, False: 3.54k]
  ------------------
 5879|     27|    if (archive_ofs < MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE +
  ------------------
  |  Branch (5879:9): [True: 2, False: 25]
  ------------------
 5880|     27|                          MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE)
 5881|      2|      return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5882|       |
 5883|     25|    archive_ofs -= MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE +
 5884|     25|                   MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE;
 5885|     25|  }
 5886|       |
 5887|       |  /* Update the archive start position, but only if not specified. */
 5888|  3.56k|  if ((pZip->m_zip_type == MZ_ZIP_TYPE_FILE ||
  ------------------
  |  Branch (5888:8): [True: 0, False: 3.56k]
  ------------------
 5889|  3.56k|       pZip->m_zip_type == MZ_ZIP_TYPE_CFILE ||
  ------------------
  |  Branch (5889:8): [True: 0, False: 3.56k]
  ------------------
 5890|  3.56k|       pZip->m_zip_type == MZ_ZIP_TYPE_USER) &&
  ------------------
  |  Branch (5890:8): [True: 0, False: 3.56k]
  ------------------
 5891|      0|      pZip->m_pState->m_file_archive_start_ofs == 0) {
  ------------------
  |  Branch (5891:7): [True: 0, False: 0]
  ------------------
 5892|      0|    pZip->m_pState->m_file_archive_start_ofs = archive_ofs;
 5893|      0|    pZip->m_archive_size -= archive_ofs;
 5894|      0|  }
 5895|       |
 5896|  3.56k|  pZip->m_central_directory_file_ofs = cdir_ofs;
 5897|       |
 5898|  3.56k|  if (pZip->m_total_files) {
  ------------------
  |  Branch (5898:7): [True: 3.53k, False: 36]
  ------------------
 5899|  3.53k|    mz_uint i, n;
 5900|       |    /* Read the entire central directory into a heap block, and allocate another
 5901|       |     * heap block to hold the unsorted central dir file record offsets, and
 5902|       |     * possibly another to hold the sorted indices. */
 5903|  3.53k|    if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size,
  ------------------
  |  Branch (5903:9): [True: 0, False: 3.53k]
  ------------------
 5904|  3.53k|                              MZ_FALSE)) ||
  ------------------
  |  |  718|  3.53k|#define MZ_FALSE (0)
  ------------------
 5905|  3.53k|        (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets,
  ------------------
  |  Branch (5905:9): [True: 0, False: 3.53k]
  ------------------
 5906|  3.53k|                              pZip->m_total_files, MZ_FALSE)))
  ------------------
  |  |  718|  3.53k|#define MZ_FALSE (0)
  ------------------
 5907|      0|      return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
 5908|       |
 5909|  3.53k|    if (sort_central_dir) {
  ------------------
  |  Branch (5909:9): [True: 3.53k, False: 0]
  ------------------
 5910|  3.53k|      if (!mz_zip_array_resize(pZip,
  ------------------
  |  Branch (5910:11): [True: 0, False: 3.53k]
  ------------------
 5911|  3.53k|                               &pZip->m_pState->m_sorted_central_dir_offsets,
 5912|  3.53k|                               pZip->m_total_files, MZ_FALSE))
  ------------------
  |  |  718|  3.53k|#define MZ_FALSE (0)
  ------------------
 5913|      0|        return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
 5914|  3.53k|    }
 5915|       |
 5916|  3.53k|    if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs,
  ------------------
  |  Branch (5916:9): [True: 0, False: 3.53k]
  ------------------
 5917|  3.53k|                      pZip->m_pState->m_central_dir.m_p,
 5918|  3.53k|                      cdir_size) != cdir_size)
 5919|      0|      return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
 5920|       |
 5921|       |    /* Now create an index into the central directory file records, do some
 5922|       |     * basic sanity checking on each record */
 5923|  3.53k|    p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p;
 5924|  20.6k|    for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i) {
  ------------------
  |  Branch (5924:32): [True: 17.6k, False: 3.03k]
  ------------------
 5925|  17.6k|      mz_uint total_header_size, disk_index, bit_flags, filename_size,
 5926|  17.6k|          ext_data_size;
 5927|  17.6k|      mz_uint64 comp_size, decomp_size, local_header_ofs;
 5928|       |
 5929|  17.6k|      if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) ||
  ------------------
  |  Branch (5929:11): [True: 8, False: 17.6k]
  ------------------
 5930|  17.6k|          (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG))
  ------------------
  |  |  772|  17.6k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  17.6k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  17.6k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  17.6k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (5930:11): [True: 70, False: 17.5k]
  ------------------
 5931|     78|        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5932|       |
 5933|  17.5k|      MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32,
  ------------------
  |  | 5365|  17.5k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 5934|  17.5k|                           i) =
 5935|  17.5k|          (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p);
 5936|       |
 5937|  17.5k|      if (sort_central_dir)
  ------------------
  |  Branch (5937:11): [True: 17.5k, False: 0]
  ------------------
 5938|  17.5k|        MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets,
  ------------------
  |  | 5365|  17.5k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 5939|  17.5k|                             mz_uint32, i) = i;
 5940|       |
 5941|  17.5k|      comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
  ------------------
  |  |  772|  17.5k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5942|  17.5k|      decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
  ------------------
  |  |  772|  17.5k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5943|  17.5k|      local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
  ------------------
  |  |  772|  17.5k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5944|  17.5k|      filename_size = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|  17.5k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5945|  17.5k|      ext_data_size = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS);
  ------------------
  |  |  769|  17.5k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.5k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5946|       |
 5947|  17.5k|      if ((!pZip->m_pState->m_zip64_has_extended_info_fields) &&
  ------------------
  |  Branch (5947:11): [True: 8.66k, False: 8.89k]
  ------------------
 5948|  8.66k|          (ext_data_size) &&
  ------------------
  |  Branch (5948:11): [True: 5.06k, False: 3.60k]
  ------------------
 5949|  5.06k|          (MZ_MAX(MZ_MAX(comp_size, decomp_size), local_header_ofs) ==
  ------------------
  |  |  758|  10.1k|#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (758:23): [True: 4.55k, False: 512]
  |  |  |  Branch (758:25): [True: 1.78k, False: 3.27k]
  |  |  |  Branch (758:38): [True: 1.58k, False: 2.96k]
  |  |  ------------------
  ------------------
  |  Branch (5949:11): [True: 1.62k, False: 3.44k]
  ------------------
 5950|  5.06k|           MZ_UINT32_MAX)) {
  ------------------
  |  |  794|  5.06k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
 5951|       |        /* Attempt to find zip64 extended information field in the entry's extra
 5952|       |         * data */
 5953|  1.62k|        mz_uint32 extra_size_remaining = ext_data_size;
 5954|       |
 5955|  1.62k|        if (extra_size_remaining) {
  ------------------
  |  Branch (5955:13): [True: 1.62k, False: 0]
  ------------------
 5956|  1.62k|          const mz_uint8 *pExtra_data;
 5957|  1.62k|          void *buf = NULL;
 5958|       |
 5959|  1.62k|          if (MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + ext_data_size >
  ------------------
  |  Branch (5959:15): [True: 109, False: 1.51k]
  ------------------
 5960|  1.62k|              n) {
 5961|    109|            buf = MZ_MALLOC(ext_data_size);
  ------------------
  |  |  753|    109|#define MZ_MALLOC(x) malloc(x)
  ------------------
 5962|    109|            if (buf == NULL)
  ------------------
  |  Branch (5962:17): [True: 0, False: 109]
  ------------------
 5963|      0|              return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
 5964|       |
 5965|    109|            if (pZip->m_pRead(pZip->m_pIO_opaque,
  ------------------
  |  Branch (5965:17): [True: 49, False: 60]
  ------------------
 5966|    109|                              cdir_ofs + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
 5967|    109|                                  filename_size,
 5968|    109|                              buf, ext_data_size) != ext_data_size) {
 5969|     49|              MZ_FREE(buf);
  ------------------
  |  |  754|     49|#define MZ_FREE(x) free(x)
  ------------------
 5970|     49|              return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
 5971|     49|            }
 5972|       |
 5973|     60|            pExtra_data = (mz_uint8 *)buf;
 5974|  1.51k|          } else {
 5975|  1.51k|            pExtra_data = p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size;
 5976|  1.51k|          }
 5977|       |
 5978|  2.54k|          do {
 5979|  2.54k|            mz_uint32 field_id;
 5980|  2.54k|            mz_uint32 field_data_size;
 5981|       |
 5982|  2.54k|            if (extra_size_remaining < (sizeof(mz_uint16) * 2)) {
  ------------------
  |  Branch (5982:17): [True: 13, False: 2.52k]
  ------------------
 5983|     13|              MZ_FREE(buf);
  ------------------
  |  |  754|     13|#define MZ_FREE(x) free(x)
  ------------------
 5984|     13|              return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5985|     13|            }
 5986|       |
 5987|  2.52k|            field_id = MZ_READ_LE16(pExtra_data);
  ------------------
  |  |  769|  2.52k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  2.52k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5988|  2.52k|            field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16));
  ------------------
  |  |  769|  2.52k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  2.52k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5989|       |
 5990|  2.52k|            if ((field_data_size + sizeof(mz_uint16) * 2) >
  ------------------
  |  Branch (5990:17): [True: 49, False: 2.47k]
  ------------------
 5991|  2.52k|                extra_size_remaining) {
 5992|     49|              MZ_FREE(buf);
  ------------------
  |  |  754|     49|#define MZ_FREE(x) free(x)
  ------------------
 5993|     49|              return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 5994|     49|            }
 5995|       |
 5996|  2.47k|            if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) {
  ------------------
  |  Branch (5996:17): [True: 754, False: 1.72k]
  ------------------
 5997|       |              /* Ok, the archive didn't have any zip64 headers but it uses a
 5998|       |               * zip64 extended information field so mark it as zip64 anyway
 5999|       |               * (this can occur with infozip's zip util when it reads
 6000|       |               * compresses files from stdin). */
 6001|    754|              pZip->m_pState->m_zip64 = MZ_TRUE;
  ------------------
  |  |  719|    754|#define MZ_TRUE (1)
  ------------------
 6002|    754|              pZip->m_pState->m_zip64_has_extended_info_fields = MZ_TRUE;
  ------------------
  |  |  719|    754|#define MZ_TRUE (1)
  ------------------
 6003|    754|              break;
 6004|    754|            }
 6005|       |
 6006|  1.72k|            pExtra_data += sizeof(mz_uint16) * 2 + field_data_size;
 6007|  1.72k|            extra_size_remaining =
 6008|  1.72k|                extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size;
 6009|  1.72k|          } while (extra_size_remaining);
  ------------------
  |  Branch (6009:20): [True: 969, False: 755]
  ------------------
 6010|       |
 6011|  1.50k|          MZ_FREE(buf);
  ------------------
  |  |  754|  1.50k|#define MZ_FREE(x) free(x)
  ------------------
 6012|  1.50k|        }
 6013|  1.62k|      }
 6014|       |
 6015|       |      /* I've seen archives that aren't marked as zip64 that uses zip64 ext
 6016|       |       * data, argh */
 6017|  17.4k|      if ((comp_size != MZ_UINT32_MAX) && (decomp_size != MZ_UINT32_MAX)) {
  ------------------
  |  |  794|  17.4k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
                    if ((comp_size != MZ_UINT32_MAX) && (decomp_size != MZ_UINT32_MAX)) {
  ------------------
  |  |  794|  8.69k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (6017:11): [True: 8.69k, False: 8.76k]
  |  Branch (6017:43): [True: 8.10k, False: 583]
  ------------------
 6018|  8.10k|        if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) &&
  ------------------
  |  |  772|  8.10k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  8.10k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  8.10k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  8.10k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (6018:14): [True: 365, False: 7.74k]
  ------------------
 6019|    365|             (decomp_size != comp_size)) ||
  ------------------
  |  Branch (6019:14): [True: 72, False: 293]
  ------------------
 6020|  8.03k|            (decomp_size && !comp_size))
  ------------------
  |  Branch (6020:14): [True: 6.58k, False: 1.45k]
  |  Branch (6020:29): [True: 12, False: 6.56k]
  ------------------
 6021|     84|          return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6022|  8.10k|      }
 6023|       |
 6024|  17.3k|      disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS);
  ------------------
  |  |  769|  17.3k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.3k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6025|  17.3k|      if ((disk_index == MZ_UINT16_MAX) ||
  ------------------
  |  |  793|  17.3k|#define MZ_UINT16_MAX (0xFFFFU)
  ------------------
  |  Branch (6025:11): [True: 9, False: 17.3k]
  ------------------
 6026|  17.3k|          ((disk_index != num_this_disk) && (disk_index != 1)))
  ------------------
  |  Branch (6026:12): [True: 9.71k, False: 7.64k]
  |  Branch (6026:45): [True: 91, False: 9.61k]
  ------------------
 6027|    100|        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);
 6028|       |
 6029|  17.2k|      if (comp_size != MZ_UINT32_MAX) {
  ------------------
  |  |  794|  17.2k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (6029:11): [True: 8.51k, False: 8.75k]
  ------------------
 6030|  8.51k|        if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) +
  ------------------
  |  |  772|  8.51k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  8.51k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  8.51k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  8.51k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (6030:13): [True: 78, False: 8.43k]
  ------------------
 6031|  8.51k|             MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
 6032|     78|          return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6033|  8.51k|      }
 6034|       |
 6035|  17.1k|      bit_flags = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
  ------------------
  |  |  769|  17.1k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.1k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6036|  17.1k|      if (bit_flags & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED)
  ------------------
  |  Branch (6036:11): [True: 2, False: 17.1k]
  ------------------
 6037|      2|        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION);
 6038|       |
 6039|  17.1k|      if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
  ------------------
  |  Branch (6039:11): [True: 43, False: 17.1k]
  ------------------
 6040|  17.1k|                               MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) +
  ------------------
  |  |  769|  17.1k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.1k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6041|  17.1k|                               MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) +
  ------------------
  |  |  769|  17.1k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.1k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6042|  17.1k|                               MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) >
  ------------------
  |  |  769|  17.1k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  17.1k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6043|  17.1k|          n)
 6044|     43|        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6045|       |
 6046|  17.1k|      n -= total_header_size;
 6047|  17.1k|      p += total_header_size;
 6048|  17.1k|    }
 6049|  3.53k|  }
 6050|       |
 6051|  3.07k|  if (sort_central_dir)
  ------------------
  |  Branch (6051:7): [True: 3.07k, False: 0]
  ------------------
 6052|  3.07k|    mz_zip_reader_sort_central_dir_offsets_by_filename(pZip);
 6053|       |
 6054|  3.07k|  return MZ_TRUE;
  ------------------
  |  |  719|  3.07k|#define MZ_TRUE (1)
  ------------------
 6055|  3.56k|}
zip.c:mz_zip_reader_locate_header_sig:
 5655|  4.51k|                                               mz_int64 *pOfs) {
 5656|  4.51k|  mz_int64 cur_file_ofs;
 5657|  4.51k|  mz_uint32 buf_u32[4096 / sizeof(mz_uint32)];
 5658|  4.51k|  mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
 5659|       |
 5660|       |  /* Basic sanity checks - reject files which are too small */
 5661|  4.51k|  if (pZip->m_archive_size < record_size)
  ------------------
  |  Branch (5661:7): [True: 0, False: 4.51k]
  ------------------
 5662|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 5663|       |
 5664|       |  /* Find the record by scanning the file from the end towards the beginning. */
 5665|  4.51k|  cur_file_ofs =
 5666|  4.51k|      MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0);
  ------------------
  |  |  758|  4.51k|#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (758:23): [True: 385, False: 4.13k]
  |  |  ------------------
  ------------------
 5667|  4.77k|  for (;;) {
 5668|  4.77k|    int i,
 5669|  4.77k|        n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs);
  ------------------
  |  |  759|  4.77k|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 256, False: 4.51k]
  |  |  ------------------
  ------------------
 5670|       |
 5671|  4.77k|    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n)
  ------------------
  |  Branch (5671:9): [True: 23, False: 4.74k]
  ------------------
 5672|     23|      return MZ_FALSE;
  ------------------
  |  |  718|     23|#define MZ_FALSE (0)
  ------------------
 5673|       |
 5674|  1.25M|    for (i = n - 4; i >= 0; --i) {
  ------------------
  |  Branch (5674:21): [True: 1.25M, False: 311]
  ------------------
 5675|  1.25M|      mz_uint s = MZ_READ_LE32(pBuf + i);
  ------------------
  |  |  772|  1.25M|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  1.25M|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  1.25M|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  1.25M|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 5676|  1.25M|      if (s == record_sig) {
  ------------------
  |  Branch (5676:11): [True: 4.48k, False: 1.25M]
  ------------------
 5677|  4.48k|        if ((pZip->m_archive_size - (cur_file_ofs + i)) >= record_size)
  ------------------
  |  Branch (5677:13): [True: 4.43k, False: 48]
  ------------------
 5678|  4.43k|          break;
 5679|  4.48k|      }
 5680|  1.25M|    }
 5681|       |
 5682|  4.74k|    if (i >= 0) {
  ------------------
  |  Branch (5682:9): [True: 4.43k, False: 311]
  ------------------
 5683|  4.43k|      cur_file_ofs += i;
 5684|  4.43k|      break;
 5685|  4.43k|    }
 5686|       |
 5687|       |    /* Give up if we've searched the entire file, or we've gone back "too far"
 5688|       |     * (~64kb) */
 5689|    311|    if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >=
  ------------------
  |  Branch (5689:9): [True: 51, False: 260]
  |  Branch (5689:28): [True: 4, False: 256]
  ------------------
 5690|    260|                            ((mz_uint64)(MZ_UINT16_MAX) + record_size)))
  ------------------
  |  |  793|    260|#define MZ_UINT16_MAX (0xFFFFU)
  ------------------
 5691|     55|      return MZ_FALSE;
  ------------------
  |  |  718|     55|#define MZ_FALSE (0)
  ------------------
 5692|       |
 5693|    256|    cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0);
  ------------------
  |  |  758|    256|#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (758:23): [True: 251, False: 5]
  |  |  ------------------
  ------------------
 5694|    256|  }
 5695|       |
 5696|  4.43k|  *pOfs = cur_file_ofs;
 5697|  4.43k|  return MZ_TRUE;
  ------------------
  |  |  719|  4.43k|#define MZ_TRUE (1)
  ------------------
 5698|  4.51k|}
zip.c:mz_zip_reader_eocd64_valid:
 5701|    937|                                          uint8_t *buf) {
 5702|    937|  if (pZip->m_pRead(pZip->m_pIO_opaque, offset, buf,
  ------------------
  |  Branch (5702:7): [True: 937, False: 0]
  ------------------
 5703|    937|                    MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) ==
 5704|    937|      MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) {
 5705|    937|    if (MZ_READ_LE32(buf + MZ_ZIP64_ECDH_SIG_OFS) ==
  ------------------
  |  |  772|    937|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|    937|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|    937|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|    937|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (5705:9): [True: 456, False: 481]
  ------------------
 5706|    937|        MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG) {
 5707|    456|      return MZ_TRUE;
  ------------------
  |  |  719|    456|#define MZ_TRUE (1)
  ------------------
 5708|    456|    }
 5709|    937|  }
 5710|       |
 5711|    481|  return MZ_FALSE;
  ------------------
  |  |  718|    481|#define MZ_FALSE (0)
  ------------------
 5712|    937|}
zip.c:mz_zip_reader_sort_central_dir_offsets_by_filename:
 5596|  3.07k|mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip) {
 5597|  3.07k|  mz_zip_internal_state *pState = pZip->m_pState;
 5598|  3.07k|  const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
 5599|  3.07k|  const mz_zip_array *pCentral_dir = &pState->m_central_dir;
 5600|  3.07k|  mz_uint32 *pIndices;
 5601|  3.07k|  mz_uint32 start, end;
 5602|  3.07k|  const mz_uint32 size = pZip->m_total_files;
 5603|       |
 5604|  3.07k|  if (size <= 1U)
  ------------------
  |  Branch (5604:7): [True: 1.85k, False: 1.21k]
  ------------------
 5605|  1.85k|    return;
 5606|       |
 5607|  1.21k|  pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets,
  ------------------
  |  | 5365|  1.21k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 5608|  1.21k|                                   mz_uint32, 0);
 5609|       |
 5610|  1.21k|  start = (size - 2U) >> 1U;
 5611|  6.90k|  for (;;) {
 5612|  6.90k|    mz_uint64 child, root = start;
 5613|  14.0k|    for (;;) {
 5614|  14.0k|      if ((child = (root << 1U) + 1U) >= size)
  ------------------
  |  Branch (5614:11): [True: 3.38k, False: 10.6k]
  ------------------
 5615|  3.38k|        break;
 5616|  10.6k|      child += (((child + 1U) < size) &&
  ------------------
  |  Branch (5616:17): [True: 9.97k, False: 709]
  ------------------
 5617|  9.97k|                (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets,
  ------------------
  |  Branch (5617:17): [True: 3.65k, False: 6.32k]
  ------------------
 5618|  9.97k|                                             pIndices[child],
 5619|  9.97k|                                             pIndices[child + 1U])));
 5620|  10.6k|      if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets,
  ------------------
  |  Branch (5620:11): [True: 3.51k, False: 7.16k]
  ------------------
 5621|  10.6k|                                       pIndices[root], pIndices[child]))
 5622|  3.51k|        break;
 5623|  7.16k|      MZ_SWAP_UINT32(pIndices[root], pIndices[child]);
  ------------------
  |  | 5585|  7.16k|  do {                                                                         \
  |  | 5586|  7.16k|    mz_uint32 t = a;                                                           \
  |  | 5587|  7.16k|    a = b;                                                                     \
  |  | 5588|  7.16k|    b = t;                                                                     \
  |  | 5589|  7.16k|  }                                                                            \
  |  | 5590|  10.6k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  10.6k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 7.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5624|  7.16k|      root = child;
 5625|  7.16k|    }
 5626|  6.90k|    if (!start)
  ------------------
  |  Branch (5626:9): [True: 1.21k, False: 5.69k]
  ------------------
 5627|  1.21k|      break;
 5628|  5.69k|    start--;
 5629|  5.69k|  }
 5630|       |
 5631|  1.21k|  end = size - 1;
 5632|  14.4k|  while (end > 0) {
  ------------------
  |  Branch (5632:10): [True: 13.2k, False: 1.21k]
  ------------------
 5633|  13.2k|    mz_uint64 child, root = 0;
 5634|  13.2k|    MZ_SWAP_UINT32(pIndices[end], pIndices[0]);
  ------------------
  |  | 5585|  13.2k|  do {                                                                         \
  |  | 5586|  13.2k|    mz_uint32 t = a;                                                           \
  |  | 5587|  13.2k|    a = b;                                                                     \
  |  | 5588|  13.2k|    b = t;                                                                     \
  |  | 5589|  13.2k|  }                                                                            \
  |  | 5590|  13.2k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  13.2k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 13.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5635|  51.1k|    for (;;) {
 5636|  51.1k|      if ((child = (root << 1U) + 1U) >= end)
  ------------------
  |  Branch (5636:11): [True: 7.61k, False: 43.4k]
  ------------------
 5637|  7.61k|        break;
 5638|  43.4k|      child +=
 5639|  43.4k|          (((child + 1U) < end) &&
  ------------------
  |  Branch (5639:12): [True: 42.0k, False: 1.40k]
  ------------------
 5640|  42.0k|           mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets,
  ------------------
  |  Branch (5640:12): [True: 17.0k, False: 25.0k]
  ------------------
 5641|  42.0k|                                       pIndices[child], pIndices[child + 1U]));
 5642|  43.4k|      if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets,
  ------------------
  |  Branch (5642:11): [True: 5.63k, False: 37.8k]
  ------------------
 5643|  43.4k|                                       pIndices[root], pIndices[child]))
 5644|  5.63k|        break;
 5645|  37.8k|      MZ_SWAP_UINT32(pIndices[root], pIndices[child]);
  ------------------
  |  | 5585|  37.8k|  do {                                                                         \
  |  | 5586|  37.8k|    mz_uint32 t = a;                                                           \
  |  | 5587|  37.8k|    a = b;                                                                     \
  |  | 5588|  37.8k|    b = t;                                                                     \
  |  | 5589|  37.8k|  }                                                                            \
  |  | 5590|  43.4k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  43.4k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 37.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5646|  37.8k|      root = child;
 5647|  37.8k|    }
 5648|  13.2k|    end--;
 5649|  13.2k|  }
 5650|  1.21k|}
zip.c:mz_zip_reader_filename_less:
 5560|   106k|                            mz_uint l_index, mz_uint r_index) {
 5561|   106k|  const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(
  ------------------
  |  | 5365|   106k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 5562|   106k|                     pCentral_dir_array, mz_uint8,
 5563|   106k|                     MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32,
 5564|   106k|                                          l_index)),
 5565|   106k|                 *pE;
 5566|   106k|  const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT(
  ------------------
  |  | 5365|   106k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 5567|   106k|      pCentral_dir_array, mz_uint8,
 5568|   106k|      MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index));
 5569|   106k|  mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS),
  ------------------
  |  |  769|   106k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|   106k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5570|   106k|          r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|   106k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|   106k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 5571|   106k|  mz_uint8 l = 0, r = 0;
 5572|   106k|  pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
 5573|   106k|  pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
 5574|   106k|  pE = pL + MZ_MIN(l_len, r_len);
  ------------------
  |  |  759|   106k|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 23.4k, False: 82.7k]
  |  |  ------------------
  ------------------
 5575|   315k|  while (pL < pE) {
  ------------------
  |  Branch (5575:10): [True: 273k, False: 41.9k]
  ------------------
 5576|   273k|    if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
  ------------------
  |  | 5225|   273k|#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
  |  |  ------------------
  |  |  |  Branch (5225:25): [True: 160k, False: 113k]
  |  |  |  Branch (5225:41): [True: 19.0k, False: 141k]
  |  |  ------------------
  ------------------
                  if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
  ------------------
  |  | 5225|   273k|#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
  |  |  ------------------
  |  |  |  Branch (5225:25): [True: 180k, False: 93.7k]
  |  |  |  Branch (5225:41): [True: 19.2k, False: 160k]
  |  |  ------------------
  ------------------
  |  Branch (5576:9): [True: 64.2k, False: 209k]
  ------------------
 5577|  64.2k|      break;
 5578|   209k|    pL++;
 5579|   209k|    pR++;
 5580|   209k|  }
 5581|   106k|  return (pL == pE) ? (l_len < r_len) : (l < r);
  ------------------
  |  Branch (5581:10): [True: 41.9k, False: 64.2k]
  ------------------
 5582|   106k|}
zip.c:mz_zip_mem_read_func:
 6128|  19.1k|                                   void *pBuf, size_t n) {
 6129|  19.1k|  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
 6130|  19.1k|  size_t s = (file_ofs >= pZip->m_archive_size)
  ------------------
  |  Branch (6130:14): [True: 175, False: 19.0k]
  ------------------
 6131|  19.1k|                 ? 0
 6132|  19.1k|                 : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n);
  ------------------
  |  |  759|  19.0k|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 68, False: 18.9k]
  |  |  ------------------
  ------------------
 6133|  19.1k|  memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
 6134|  19.1k|  return s;
 6135|  19.1k|}
zip.c:mz_zip_get_cdh:
 6286|  98.9k|                                                     mz_uint file_index) {
 6287|  98.9k|  if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files))
  ------------------
  |  Branch (6287:7): [True: 0, False: 98.9k]
  |  Branch (6287:18): [True: 0, False: 98.9k]
  |  Branch (6287:39): [True: 0, False: 98.9k]
  ------------------
 6288|      0|    return NULL;
 6289|  98.9k|  return &MZ_ZIP_ARRAY_ELEMENT(
  ------------------
  |  | 5365|  98.9k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 6290|  98.9k|      &pZip->m_pState->m_central_dir, mz_uint8,
 6291|  98.9k|      MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32,
 6292|  98.9k|                           file_index));
 6293|  98.9k|}
zip.c:mz_zip_string_equal:
 6507|  10.2k|                                                  mz_uint flags) {
 6508|  10.2k|  mz_uint i;
 6509|  10.2k|  if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE)
  ------------------
  |  Branch (6509:7): [True: 10.2k, False: 0]
  ------------------
 6510|  10.2k|    return 0 == memcmp(pA, pB, len);
 6511|      0|  for (i = 0; i < len; ++i)
  ------------------
  |  Branch (6511:15): [True: 0, False: 0]
  ------------------
 6512|      0|    if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i]))
  ------------------
  |  | 5225|      0|#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
  |  |  ------------------
  |  |  |  Branch (5225:25): [True: 0, False: 0]
  |  |  |  Branch (5225:41): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i]))
  ------------------
  |  | 5225|      0|#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
  |  |  ------------------
  |  |  |  Branch (5225:25): [True: 0, False: 0]
  |  |  |  Branch (5225:41): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6512:9): [True: 0, False: 0]
  ------------------
 6513|      0|      return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6514|      0|  return MZ_TRUE;
  ------------------
  |  |  719|      0|#define MZ_TRUE (1)
  ------------------
 6515|      0|}
zip.c:mz_zip_reader_extract_to_mem_no_alloc1:
 6664|  3.30k|    const mz_zip_archive_file_stat *st) {
 6665|  3.30k|  int status = TINFL_STATUS_DONE;
 6666|  3.30k|  mz_uint64 needed_size, cur_file_ofs, comp_remaining,
 6667|  3.30k|      out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail;
 6668|  3.30k|  mz_zip_archive_file_stat file_stat;
 6669|  3.30k|  void *pRead_buf;
 6670|  3.30k|  mz_uint32
 6671|  3.30k|      local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) /
 6672|  3.30k|                       sizeof(mz_uint32)];
 6673|  3.30k|  mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
 6674|  3.30k|  tinfl_decompressor inflator;
 6675|       |
 6676|  3.30k|  if ((!pZip) || (!pZip->m_pState) || ((buf_size) && (!pBuf)) ||
  ------------------
  |  Branch (6676:7): [True: 0, False: 3.30k]
  |  Branch (6676:18): [True: 0, False: 3.30k]
  |  Branch (6676:40): [True: 2.61k, False: 681]
  |  Branch (6676:54): [True: 0, False: 2.61k]
  ------------------
 6677|  3.30k|      ((user_read_buf_size) && (!pUser_read_buf)) || (!pZip->m_pRead))
  ------------------
  |  Branch (6677:8): [True: 0, False: 3.30k]
  |  Branch (6677:32): [True: 0, False: 0]
  |  Branch (6677:54): [True: 0, False: 3.30k]
  ------------------
 6678|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6679|       |
 6680|  3.30k|  if (st) {
  ------------------
  |  Branch (6680:7): [True: 0, False: 3.30k]
  ------------------
 6681|      0|    file_stat = *st;
 6682|  3.30k|  } else if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
  ------------------
  |  Branch (6682:14): [True: 0, False: 3.30k]
  ------------------
 6683|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6684|       |
 6685|       |  /* A directory or zero length file */
 6686|  3.30k|  if ((file_stat.m_is_directory) || (!file_stat.m_comp_size))
  ------------------
  |  Branch (6686:7): [True: 314, False: 2.98k]
  |  Branch (6686:37): [True: 126, False: 2.86k]
  ------------------
 6687|    440|    return MZ_TRUE;
  ------------------
  |  |  719|    440|#define MZ_TRUE (1)
  ------------------
 6688|       |
 6689|       |  /* Encryption and patch files are not supported. */
 6690|  2.86k|  if (file_stat.m_bit_flag &
  ------------------
  |  Branch (6690:7): [True: 111, False: 2.74k]
  ------------------
 6691|  2.86k|      (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED |
 6692|  2.86k|       MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION |
 6693|  2.86k|       MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG))
 6694|    111|    return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION);
 6695|       |
 6696|       |  /* This function only supports decompressing stored and deflate. */
 6697|  2.74k|  if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) &&
  ------------------
  |  Branch (6697:7): [True: 2.74k, False: 0]
  |  Branch (6697:51): [True: 2.33k, False: 416]
  ------------------
 6698|  2.33k|      (file_stat.m_method != MZ_DEFLATED))
  ------------------
  |  |  316|  2.33k|#define MZ_DEFLATED 8
  ------------------
  |  Branch (6698:7): [True: 170, False: 2.16k]
  ------------------
 6699|    170|    return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD);
 6700|       |
 6701|       |  /* Ensure supplied output buffer is large enough. */
 6702|  2.57k|  needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size
  ------------------
  |  Branch (6702:17): [True: 0, False: 2.57k]
  ------------------
 6703|  2.57k|                                                      : file_stat.m_uncomp_size;
 6704|  2.57k|  if (buf_size < needed_size)
  ------------------
  |  Branch (6704:7): [True: 0, False: 2.57k]
  ------------------
 6705|      0|    return mz_zip_set_error(pZip, MZ_ZIP_BUF_TOO_SMALL);
 6706|       |
 6707|       |  /* Read and parse the local directory entry. */
 6708|  2.57k|  cur_file_ofs = file_stat.m_local_header_ofs;
 6709|  2.57k|  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header,
  ------------------
  |  Branch (6709:7): [True: 121, False: 2.45k]
  ------------------
 6710|  2.57k|                    MZ_ZIP_LOCAL_DIR_HEADER_SIZE) !=
 6711|  2.57k|      MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
 6712|    121|    return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
 6713|       |
 6714|  2.45k|  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
  ------------------
  |  |  772|  2.45k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  2.45k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  2.45k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  2.45k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
  |  Branch (6714:7): [True: 263, False: 2.19k]
  ------------------
 6715|    263|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6716|       |
 6717|  2.19k|  cur_file_ofs += (mz_uint64)(MZ_ZIP_LOCAL_DIR_HEADER_SIZE) +
 6718|  2.19k|                  MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) +
  ------------------
  |  |  769|  2.19k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  2.19k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6719|  2.19k|                  MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
  ------------------
  |  |  769|  2.19k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  2.19k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6720|  2.19k|  if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
  ------------------
  |  Branch (6720:7): [True: 54, False: 2.14k]
  ------------------
 6721|     54|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6722|       |
 6723|  2.14k|  if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) {
  ------------------
  |  Branch (6723:7): [True: 0, False: 2.14k]
  |  Branch (6723:48): [True: 271, False: 1.87k]
  ------------------
 6724|       |    /* The file is stored or the caller has requested the compressed data. */
 6725|    271|    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf,
  ------------------
  |  Branch (6725:9): [True: 50, False: 221]
  ------------------
 6726|    271|                      (size_t)needed_size) != needed_size)
 6727|     50|      return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
 6728|       |
 6729|    221|#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
 6730|    221|    if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) == 0) {
  ------------------
  |  Branch (6730:9): [True: 221, False: 0]
  ------------------
 6731|    221|      if (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf,
  ------------------
  |  |  300|    221|#define MZ_CRC32_INIT (0)
  ------------------
  |  Branch (6731:11): [True: 197, False: 24]
  ------------------
 6732|    221|                   (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32)
 6733|    197|        return mz_zip_set_error(pZip, MZ_ZIP_CRC_CHECK_FAILED);
 6734|    221|    }
 6735|     24|#endif
 6736|       |
 6737|     24|    return MZ_TRUE;
  ------------------
  |  |  719|     24|#define MZ_TRUE (1)
  ------------------
 6738|    221|  }
 6739|       |
 6740|       |  /* Decompress the file either directly from memory or from a file input
 6741|       |   * buffer. */
 6742|  1.87k|  tinfl_init(&inflator);
  ------------------
  |  | 1191|  1.87k|  do {                                                                         \
  |  | 1192|  1.87k|    (r)->m_state = 0;                                                          \
  |  | 1193|  1.87k|  }                                                                            \
  |  | 1194|  2.14k|  MZ_MACRO_END
  |  |  ------------------
  |  |  |  |  726|  2.14k|#define MZ_MACRO_END while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (726:29): [Folded, False: 1.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6743|       |
 6744|  1.87k|  if (pZip->m_pState->m_pMem) {
  ------------------
  |  Branch (6744:7): [True: 1.87k, False: 0]
  ------------------
 6745|       |    /* Read directly from the archive in memory. */
 6746|  1.87k|    pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
 6747|  1.87k|    read_buf_size = read_buf_avail = file_stat.m_comp_size;
 6748|  1.87k|    comp_remaining = 0;
 6749|  1.87k|  } else if (pUser_read_buf) {
  ------------------
  |  Branch (6749:14): [True: 0, False: 0]
  ------------------
 6750|       |    /* Use a user provided read buffer. */
 6751|      0|    if (!user_read_buf_size)
  ------------------
  |  Branch (6751:9): [True: 0, False: 0]
  ------------------
 6752|      0|      return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6753|      0|    pRead_buf = (mz_uint8 *)pUser_read_buf;
 6754|      0|    read_buf_size = user_read_buf_size;
 6755|      0|    read_buf_avail = 0;
 6756|      0|    comp_remaining = file_stat.m_comp_size;
 6757|      0|  } else {
 6758|       |    /* Temporarily allocate a read buffer. */
 6759|      0|    read_buf_size =
 6760|      0|        MZ_MIN(file_stat.m_comp_size, (mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE);
  ------------------
  |  |  759|      0|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6761|      0|    if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
  ------------------
  |  Branch (6761:9): [Folded, False: 0]
  |  Branch (6761:52): [True: 0, False: 0]
  ------------------
 6762|      0|      return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);
 6763|       |
 6764|      0|    if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1,
  ------------------
  |  Branch (6764:9): [True: 0, False: 0]
  ------------------
 6765|      0|                                            (size_t)read_buf_size)))
 6766|      0|      return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
 6767|       |
 6768|      0|    read_buf_avail = 0;
 6769|      0|    comp_remaining = file_stat.m_comp_size;
 6770|      0|  }
 6771|       |
 6772|  1.87k|  do {
 6773|       |    /* The size_t cast here should be OK because we've verified that the output
 6774|       |     * buffer is >= file_stat.m_uncomp_size above */
 6775|  1.87k|    size_t in_buf_size,
 6776|  1.87k|        out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs);
 6777|  1.87k|    if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) {
  ------------------
  |  Branch (6777:9): [True: 0, False: 1.87k]
  |  Branch (6777:30): [True: 0, False: 0]
  ------------------
 6778|      0|      read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
  ------------------
  |  |  759|      0|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6779|      0|      if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf,
  ------------------
  |  Branch (6779:11): [True: 0, False: 0]
  ------------------
 6780|      0|                        (size_t)read_buf_avail) != read_buf_avail) {
 6781|      0|        status = TINFL_STATUS_FAILED;
 6782|      0|        mz_zip_set_error(pZip, MZ_ZIP_DECOMPRESSION_FAILED);
 6783|      0|        break;
 6784|      0|      }
 6785|      0|      cur_file_ofs += read_buf_avail;
 6786|      0|      comp_remaining -= read_buf_avail;
 6787|      0|      read_buf_ofs = 0;
 6788|      0|    }
 6789|  1.87k|    in_buf_size = (size_t)read_buf_avail;
 6790|  1.87k|    status = tinfl_decompress(
 6791|  1.87k|        &inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size,
 6792|  1.87k|        (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size,
 6793|  1.87k|        TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF |
 6794|  1.87k|            (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0));
  ------------------
  |  Branch (6794:14): [True: 0, False: 1.87k]
  ------------------
 6795|  1.87k|    read_buf_avail -= in_buf_size;
 6796|  1.87k|    read_buf_ofs += in_buf_size;
 6797|  1.87k|    out_buf_ofs += out_buf_size;
 6798|  1.87k|  } while (status == TINFL_STATUS_NEEDS_MORE_INPUT);
  ------------------
  |  Branch (6798:12): [True: 0, False: 1.87k]
  ------------------
 6799|       |
 6800|  1.87k|  if (status == TINFL_STATUS_DONE) {
  ------------------
  |  Branch (6800:7): [True: 209, False: 1.66k]
  ------------------
 6801|       |    /* Make sure the entire file was decompressed, and check its CRC. */
 6802|    209|    if (out_buf_ofs != file_stat.m_uncomp_size) {
  ------------------
  |  Branch (6802:9): [True: 96, False: 113]
  ------------------
 6803|     96|      mz_zip_set_error(pZip, MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE);
 6804|     96|      status = TINFL_STATUS_FAILED;
 6805|     96|    }
 6806|    113|#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
 6807|    113|    else if (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf,
  ------------------
  |  |  300|    113|#define MZ_CRC32_INIT (0)
  ------------------
  |  Branch (6807:14): [True: 95, False: 18]
  ------------------
 6808|    113|                      (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32) {
 6809|     95|      mz_zip_set_error(pZip, MZ_ZIP_CRC_CHECK_FAILED);
 6810|     95|      status = TINFL_STATUS_FAILED;
 6811|     95|    }
 6812|    209|#endif
 6813|    209|  }
 6814|       |
 6815|  1.87k|  if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf))
  ------------------
  |  Branch (6815:7): [True: 0, False: 1.87k]
  |  Branch (6815:36): [True: 0, False: 0]
  ------------------
 6816|      0|    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
 6817|       |
 6818|  1.87k|  return status == TINFL_STATUS_DONE;
 6819|  1.87k|}
zip.c:mz_zip_file_stat_internal:
 6380|  24.7k|                                         mz_bool *pFound_zip64_extra_data) {
 6381|  24.7k|  mz_uint n;
 6382|  24.7k|  const mz_uint8 *p = pCentral_dir_header;
 6383|       |
 6384|  24.7k|  if (pFound_zip64_extra_data)
  ------------------
  |  Branch (6384:7): [True: 0, False: 24.7k]
  ------------------
 6385|      0|    *pFound_zip64_extra_data = MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 6386|       |
 6387|  24.7k|  if ((!p) || (!pStat))
  ------------------
  |  Branch (6387:7): [True: 0, False: 24.7k]
  |  Branch (6387:15): [True: 0, False: 24.7k]
  ------------------
 6388|      0|    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
 6389|       |
 6390|       |  /* Extract fields from the central directory record. */
 6391|  24.7k|  pStat->m_file_index = file_index;
 6392|  24.7k|  pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT(
  ------------------
  |  | 5365|  24.7k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
 6393|  24.7k|      &pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index);
 6394|  24.7k|  pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6395|  24.7k|  pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6396|  24.7k|  pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6397|  24.7k|  pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6398|  24.7k|#ifndef MINIZ_NO_TIME
 6399|  24.7k|  pStat->m_time =
 6400|  24.7k|      mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS),
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6401|  24.7k|                           MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS));
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6402|  24.7k|#endif
 6403|  24.7k|  pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS);
  ------------------
  |  |  772|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 6404|  24.7k|  pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
  ------------------
  |  |  772|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 6405|  24.7k|  pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
  ------------------
  |  |  772|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 6406|  24.7k|  pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6407|  24.7k|  pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
  ------------------
  |  |  772|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 6408|  24.7k|  pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
  ------------------
  |  |  772|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  773|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  774|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  775|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  ------------------
 6409|       |
 6410|       |  /* Copy as much of the filename and comment as possible. */
 6411|  24.7k|  n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6412|  24.7k|  n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1);
  ------------------
  |  |  759|  24.7k|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 24.4k, False: 267]
  |  |  ------------------
  ------------------
 6413|  24.7k|  memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
 6414|  24.7k|  pStat->m_filename[n] = '\0';
 6415|       |
 6416|  24.7k|  n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS);
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6417|  24.7k|  n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1);
  ------------------
  |  |  759|  24.7k|#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (759:23): [True: 24.6k, False: 124]
  |  |  ------------------
  ------------------
 6418|  24.7k|  pStat->m_comment_size = n;
 6419|  24.7k|  memcpy(pStat->m_comment,
 6420|  24.7k|         p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
 6421|  24.7k|             MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) +
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6422|  24.7k|             MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS),
  ------------------
  |  |  769|  24.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  24.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6423|  24.7k|         n);
 6424|  24.7k|  pStat->m_comment[n] = '\0';
 6425|       |
 6426|       |  /* Set some flags for convienance */
 6427|  24.7k|  pStat->m_is_directory = mz_zip_reader_is_file_a_directory(pZip, file_index);
 6428|  24.7k|  pStat->m_is_encrypted = mz_zip_reader_is_file_encrypted(pZip, file_index);
 6429|  24.7k|  pStat->m_is_supported = mz_zip_reader_is_file_supported(pZip, file_index);
 6430|       |
 6431|       |  /* See if we need to read any zip64 extended information fields. */
 6432|       |  /* Confusingly, these zip64 fields can be present even on non-zip64 archives
 6433|       |   * (Debian zip on a huge files from stdin piped to stdout creates them). */
 6434|  24.7k|  if (MZ_MAX(MZ_MAX(pStat->m_comp_size, pStat->m_uncomp_size),
  ------------------
  |  |  758|  49.4k|#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (758:23): [True: 21.2k, False: 3.47k]
  |  |  |  Branch (758:25): [True: 12.2k, False: 12.4k]
  |  |  |  Branch (758:38): [True: 10.4k, False: 10.8k]
  |  |  ------------------
  ------------------
  |  Branch (6434:7): [True: 10.7k, False: 14.0k]
  ------------------
 6435|  24.7k|             pStat->m_local_header_ofs) == MZ_UINT32_MAX) {
  ------------------
  |  |  794|  24.7k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
 6436|       |    /* Attempt to find zip64 extended information field in the entry's extra
 6437|       |     * data */
 6438|  10.7k|    mz_uint32 extra_size_remaining = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS);
  ------------------
  |  |  769|  10.7k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  10.7k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6439|       |
 6440|  10.7k|    if (extra_size_remaining) {
  ------------------
  |  Branch (6440:9): [True: 7.67k, False: 3.03k]
  ------------------
 6441|  7.67k|      const mz_uint8 *pExtra_data =
 6442|  7.67k|          p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
 6443|  7.67k|          MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|  7.67k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  7.67k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6444|       |
 6445|  9.02k|      do {
 6446|  9.02k|        mz_uint32 field_id;
 6447|  9.02k|        mz_uint32 field_data_size;
 6448|       |
 6449|  9.02k|        if (extra_size_remaining < (sizeof(mz_uint16) * 2))
  ------------------
  |  Branch (6449:13): [True: 171, False: 8.85k]
  ------------------
 6450|    171|          return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6451|       |
 6452|  8.85k|        field_id = MZ_READ_LE16(pExtra_data);
  ------------------
  |  |  769|  8.85k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  8.85k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6453|  8.85k|        field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16));
  ------------------
  |  |  769|  8.85k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  8.85k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 6454|       |
 6455|  8.85k|        if ((field_data_size + sizeof(mz_uint16) * 2) > extra_size_remaining)
  ------------------
  |  Branch (6455:13): [True: 1.74k, False: 7.10k]
  ------------------
 6456|  1.74k|          return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6457|       |
 6458|  7.10k|        if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) {
  ------------------
  |  Branch (6458:13): [True: 4.01k, False: 3.09k]
  ------------------
 6459|  4.01k|          const mz_uint8 *pField_data = pExtra_data + sizeof(mz_uint16) * 2;
 6460|  4.01k|          mz_uint32 field_data_remaining = field_data_size;
 6461|       |
 6462|  4.01k|          if (pFound_zip64_extra_data)
  ------------------
  |  Branch (6462:15): [True: 0, False: 4.01k]
  ------------------
 6463|      0|            *pFound_zip64_extra_data = MZ_TRUE;
  ------------------
  |  |  719|      0|#define MZ_TRUE (1)
  ------------------
 6464|       |
 6465|  4.01k|          if (pStat->m_uncomp_size == MZ_UINT32_MAX) {
  ------------------
  |  |  794|  4.01k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (6465:15): [True: 1.18k, False: 2.82k]
  ------------------
 6466|  1.18k|            if (field_data_remaining < sizeof(mz_uint64))
  ------------------
  |  Branch (6466:17): [True: 271, False: 915]
  ------------------
 6467|    271|              return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6468|       |
 6469|    915|            pStat->m_uncomp_size = MZ_READ_LE64(pField_data);
  ------------------
  |  |  779|    915|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    915|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    915|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    915|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    915|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    915|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    915|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    915|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    915|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    915|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    915|    << 32U))
  ------------------
 6470|    915|            pField_data += sizeof(mz_uint64);
 6471|    915|            field_data_remaining -= sizeof(mz_uint64);
 6472|    915|          }
 6473|       |
 6474|  3.74k|          if (pStat->m_comp_size == MZ_UINT32_MAX) {
  ------------------
  |  |  794|  3.74k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (6474:15): [True: 3.43k, False: 314]
  ------------------
 6475|  3.43k|            if (field_data_remaining < sizeof(mz_uint64))
  ------------------
  |  Branch (6475:17): [True: 466, False: 2.96k]
  ------------------
 6476|    466|              return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6477|       |
 6478|  2.96k|            pStat->m_comp_size = MZ_READ_LE64(pField_data);
  ------------------
  |  |  779|  2.96k|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|  2.96k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|  2.96k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|  2.96k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|  2.96k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|  2.96k|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|  2.96k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|  2.96k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|  2.96k|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|  2.96k|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|  2.96k|    << 32U))
  ------------------
 6479|  2.96k|            pField_data += sizeof(mz_uint64);
 6480|  2.96k|            field_data_remaining -= sizeof(mz_uint64);
 6481|  2.96k|          }
 6482|       |
 6483|  3.27k|          if (pStat->m_local_header_ofs == MZ_UINT32_MAX) {
  ------------------
  |  |  794|  3.27k|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (6483:15): [True: 339, False: 2.93k]
  ------------------
 6484|    339|            if (field_data_remaining < sizeof(mz_uint64))
  ------------------
  |  Branch (6484:17): [True: 61, False: 278]
  ------------------
 6485|     61|              return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
 6486|       |
 6487|    278|            pStat->m_local_header_ofs = MZ_READ_LE64(pField_data);
  ------------------
  |  |  779|    278|  (((mz_uint64)MZ_READ_LE32(p)) |                                              \
  |  |  ------------------
  |  |  |  |  772|    278|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    278|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    278|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    278|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  780|    278|   (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32)))       \
  |  |  ------------------
  |  |  |  |  772|    278|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  |  |  773|    278|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) |                           \
  |  |  |  |  774|    278|   ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) |                          \
  |  |  |  |  775|    278|   ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
  |  |  ------------------
  |  |  781|    278|    << 32U))
  ------------------
 6488|    278|            pField_data += sizeof(mz_uint64);
 6489|    278|            field_data_remaining -= sizeof(mz_uint64);
 6490|    278|          }
 6491|       |
 6492|  3.21k|          break;
 6493|  3.27k|        }
 6494|       |
 6495|  3.09k|        pExtra_data += sizeof(mz_uint16) * 2 + field_data_size;
 6496|  3.09k|        extra_size_remaining =
 6497|  3.09k|            extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size;
 6498|  3.09k|      } while (extra_size_remaining);
  ------------------
  |  Branch (6498:16): [True: 1.35k, False: 1.73k]
  ------------------
 6499|  7.67k|    }
 6500|  10.7k|  }
 6501|       |
 6502|  22.0k|  return MZ_TRUE;
  ------------------
  |  |  719|  22.0k|#define MZ_TRUE (1)
  ------------------
 6503|  24.7k|}
zip.c:mz_zip_dos_to_time_t:
 5445|  24.7k|static MZ_TIME_T mz_zip_dos_to_time_t(int dos_time, int dos_date) {
 5446|  24.7k|  struct tm tm;
 5447|  24.7k|  memset(&tm, 0, sizeof(tm));
 5448|  24.7k|  tm.tm_isdst = -1;
 5449|  24.7k|  tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900;
 5450|  24.7k|  tm.tm_mon = ((dos_date >> 5) & 15) - 1;
 5451|  24.7k|  tm.tm_mday = dos_date & 31;
 5452|  24.7k|  tm.tm_hour = (dos_time >> 11) & 31;
 5453|  24.7k|  tm.tm_min = (dos_time >> 5) & 63;
 5454|  24.7k|  tm.tm_sec = (dos_time << 1) & 62;
 5455|  24.7k|  return mktime(&tm);
 5456|  24.7k|}
zip.c:mz_zip_array_resize:
 5416|  10.5k|                                                  mz_uint growing) {
 5417|  10.5k|  if (new_size > pArray->m_capacity) {
  ------------------
  |  Branch (5417:7): [True: 10.5k, False: 0]
  ------------------
 5418|  10.5k|    if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing))
  ------------------
  |  Branch (5418:9): [True: 0, False: 10.5k]
  ------------------
 5419|      0|      return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 5420|  10.5k|  }
 5421|  10.5k|  pArray->m_size = new_size;
 5422|  10.5k|  return MZ_TRUE;
  ------------------
  |  |  719|  10.5k|#define MZ_TRUE (1)
  ------------------
 5423|  10.5k|}
zip.c:mz_zip_array_ensure_capacity:
 5383|  10.5k|                                            mz_uint growing) {
 5384|  10.5k|  void *pNew_p;
 5385|  10.5k|  size_t new_capacity = min_new_capacity;
 5386|  10.5k|  MZ_ASSERT(pArray->m_element_size);
  ------------------
  |  |  746|  10.5k|#define MZ_ASSERT(x) assert(x)
  ------------------
 5387|  10.5k|  if (pArray->m_capacity >= min_new_capacity)
  ------------------
  |  Branch (5387:7): [True: 0, False: 10.5k]
  ------------------
 5388|      0|    return MZ_TRUE;
  ------------------
  |  |  719|      0|#define MZ_TRUE (1)
  ------------------
 5389|  10.5k|  if (growing) {
  ------------------
  |  Branch (5389:7): [True: 0, False: 10.5k]
  ------------------
 5390|      0|    new_capacity = MZ_MAX(1, pArray->m_capacity);
  ------------------
  |  |  758|      0|#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (758:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5391|      0|    while (new_capacity < min_new_capacity)
  ------------------
  |  Branch (5391:12): [True: 0, False: 0]
  ------------------
 5392|      0|      new_capacity *= 2;
 5393|      0|  }
 5394|  10.5k|  if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p,
  ------------------
  |  Branch (5394:7): [True: 0, False: 10.5k]
  ------------------
 5395|  10.5k|                                         pArray->m_element_size, new_capacity)))
 5396|      0|    return MZ_FALSE;
  ------------------
  |  |  718|      0|#define MZ_FALSE (0)
  ------------------
 5397|  10.5k|  pArray->m_p = pNew_p;
 5398|  10.5k|  pArray->m_capacity = new_capacity;
 5399|  10.5k|  return MZ_TRUE;
  ------------------
  |  |  719|  10.5k|#define MZ_TRUE (1)
  ------------------
 5400|  10.5k|}
zip.c:mz_zip_array_clear:
 5375|  13.5k|                                              mz_zip_array *pArray) {
 5376|  13.5k|  pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p);
 5377|  13.5k|  memset(pArray, 0, sizeof(mz_zip_array));
 5378|  13.5k|}

zip_close:
 1577|  3.07k|void zip_close(struct zip_t *zip) {
 1578|  3.07k|  if (zip) {
  ------------------
  |  Branch (1578:7): [True: 3.07k, False: 0]
  ------------------
 1579|  3.07k|    mz_zip_archive *pZip = &(zip->archive);
 1580|  3.07k|#if ZIP_ENABLE_DEFLATE
 1581|  3.07k|    if (pZip->m_zip_mode == MZ_ZIP_MODE_WRITING) {
  ------------------
  |  Branch (1581:9): [True: 0, False: 3.07k]
  ------------------
 1582|      0|      mz_zip_writer_finalize_archive(pZip);
 1583|      0|    }
 1584|       |
 1585|  3.07k|    if (pZip->m_zip_mode == MZ_ZIP_MODE_WRITING ||
  ------------------
  |  Branch (1585:9): [True: 0, False: 3.07k]
  ------------------
 1586|  3.07k|        pZip->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED) {
  ------------------
  |  Branch (1586:9): [True: 0, False: 3.07k]
  ------------------
 1587|      0|      zip_archive_truncate(pZip);
 1588|      0|      mz_zip_writer_end(pZip);
 1589|      0|    } else
 1590|  3.07k|#endif
 1591|  3.07k|        if (pZip->m_zip_mode == MZ_ZIP_MODE_READING) {
  ------------------
  |  Branch (1591:13): [True: 3.07k, False: 0]
  ------------------
 1592|  3.07k|      mz_zip_reader_end(pZip);
 1593|  3.07k|    }
 1594|       |
 1595|  3.07k|    CLEANUP(zip->password);
  ------------------
  |  |   72|  3.07k|  do {                                                                         \
  |  |   73|  3.07k|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 0, False: 3.07k]
  |  |  ------------------
  |  |   74|      0|      free((void *)ptr);                                                       \
  |  |   75|      0|      ptr = NULL;                                                              \
  |  |   76|      0|    }                                                                          \
  |  |   77|  3.07k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 3.07k]
  |  |  ------------------
  ------------------
 1596|       |    CLEANUP(zip);
  ------------------
  |  |   72|  3.07k|  do {                                                                         \
  |  |   73|  3.07k|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 3.07k, False: 0]
  |  |  ------------------
  |  |   74|  3.07k|      free((void *)ptr);                                                       \
  |  |   75|  3.07k|      ptr = NULL;                                                              \
  |  |   76|  3.07k|    }                                                                          \
  |  |   77|  3.07k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 3.07k]
  |  |  ------------------
  ------------------
 1597|  3.07k|  }
 1598|  3.07k|}
zip_entry_opencasesensitive:
 1885|  6.59k|int zip_entry_opencasesensitive(struct zip_t *zip, const char *entryname) {
 1886|  6.59k|  return _zip_entry_open(zip, entryname, 1);
 1887|  6.59k|}
zip_entry_openbyindex:
 1889|  16.2k|int zip_entry_openbyindex(struct zip_t *zip, size_t index) {
 1890|  16.2k|  mz_zip_archive *pZip = NULL;
 1891|  16.2k|  mz_zip_archive_file_stat stats;
 1892|  16.2k|  mz_uint namelen;
 1893|  16.2k|  const mz_uint8 *pHeader;
 1894|  16.2k|  const char *pFilename;
 1895|       |
 1896|  16.2k|  if (!zip) {
  ------------------
  |  Branch (1896:7): [True: 0, False: 16.2k]
  ------------------
 1897|       |    // zip_t handler is not initialized
 1898|      0|    return ZIP_ENOINIT;
  ------------------
  |  |   93|      0|#define ZIP_ENOINIT -1      // not initialized
  ------------------
 1899|      0|  }
 1900|       |
 1901|  16.2k|  pZip = &(zip->archive);
 1902|  16.2k|  if (pZip->m_zip_mode != MZ_ZIP_MODE_READING) {
  ------------------
  |  Branch (1902:7): [True: 0, False: 16.2k]
  ------------------
 1903|       |    // open by index requires readonly mode
 1904|      0|    return ZIP_EINVMODE;
  ------------------
  |  |   96|      0|#define ZIP_EINVMODE -4     // invalid zip mode
  ------------------
 1905|      0|  }
 1906|       |
 1907|  16.2k|  if (index >= (size_t)pZip->m_total_files) {
  ------------------
  |  Branch (1907:7): [True: 0, False: 16.2k]
  ------------------
 1908|       |    // index out of range
 1909|      0|    return ZIP_EINVIDX;
  ------------------
  |  |  102|      0|#define ZIP_EINVIDX -10     // invalid index
  ------------------
 1910|      0|  }
 1911|       |
 1912|  16.2k|  if (!(pHeader = &MZ_ZIP_ARRAY_ELEMENT(
  ------------------
  |  | 5365|  16.2k|  ((element_type *)((array_ptr)->m_p))[index]
  ------------------
  |  Branch (1912:7): [True: 0, False: 16.2k]
  ------------------
 1913|  16.2k|            &pZip->m_pState->m_central_dir, mz_uint8,
 1914|  16.2k|            MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets,
 1915|  16.2k|                                 mz_uint32, (mz_uint)index)))) {
 1916|       |    // cannot find header in central directory
 1917|      0|    return ZIP_ENOHDR;
  ------------------
  |  |  103|      0|#define ZIP_ENOHDR -11      // header not found
  ------------------
 1918|      0|  }
 1919|       |
 1920|  16.2k|  namelen = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS);
  ------------------
  |  |  769|  16.2k|  ((mz_uint32)(((const mz_uint8 *)(p))[0]) |                                   \
  |  |  770|  16.2k|   ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
  ------------------
 1921|  16.2k|  pFilename = (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
 1922|       |
 1923|  16.2k|  if (zip->entry.name) {
  ------------------
  |  Branch (1923:7): [True: 0, False: 16.2k]
  ------------------
 1924|      0|    CLEANUP(zip->entry.name);
  ------------------
  |  |   72|      0|  do {                                                                         \
  |  |   73|      0|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|      free((void *)ptr);                                                       \
  |  |   75|      0|      ptr = NULL;                                                              \
  |  |   76|      0|    }                                                                          \
  |  |   77|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1925|      0|  }
 1926|       |
 1927|  16.2k|  zip->entry.name = zip_strclone(pFilename, namelen);
 1928|  16.2k|  if (!zip->entry.name) {
  ------------------
  |  Branch (1928:7): [True: 0, False: 16.2k]
  ------------------
 1929|       |    // local entry name is NULL
 1930|      0|    return ZIP_EINVENTNAME;
  ------------------
  |  |   94|      0|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 1931|      0|  }
 1932|       |
 1933|  16.2k|  if (!mz_zip_reader_file_stat(pZip, (mz_uint)index, &stats)) {
  ------------------
  |  Branch (1933:7): [True: 2.55k, False: 13.7k]
  ------------------
 1934|  2.55k|    return ZIP_ENOENT;
  ------------------
  |  |   95|  2.55k|#define ZIP_ENOENT -3       // entry not found
  ------------------
 1935|  2.55k|  }
 1936|       |
 1937|  13.7k|  zip->entry.index = (ssize_t)index;
 1938|  13.7k|  zip->entry.comp_size = stats.m_comp_size;
 1939|  13.7k|  zip->entry.uncomp_size = stats.m_uncomp_size;
 1940|  13.7k|  zip->entry.uncomp_crc32 = stats.m_crc32;
 1941|  13.7k|  zip->entry.dir_offset = stats.m_central_dir_ofs;
 1942|  13.7k|  zip->entry.header_offset = stats.m_local_header_ofs;
 1943|  13.7k|  zip->entry.method = stats.m_method;
 1944|  13.7k|  zip->entry.version_made_by = stats.m_version_made_by;
 1945|  13.7k|  zip->entry.external_attr = stats.m_external_attr;
 1946|  13.7k|#ifndef MINIZ_NO_TIME
 1947|  13.7k|  zip->entry.m_time = stats.m_time;
 1948|  13.7k|#endif
 1949|       |
 1950|  13.7k|  return 0;
 1951|  16.2k|}
zip_entry_close:
 1953|  21.2k|int zip_entry_close(struct zip_t *zip) {
 1954|  21.2k|  mz_zip_archive *pzip = NULL;
 1955|  21.2k|  int err = 0;
 1956|  21.2k|#if ZIP_ENABLE_DEFLATE
 1957|  21.2k|  mz_uint level;
 1958|  21.2k|  tdefl_status done;
 1959|  21.2k|  mz_uint16 entrylen;
 1960|  21.2k|  mz_uint16 dos_time = 0, dos_date = 0;
 1961|  21.2k|  mz_uint8 *pExtra_data = NULL;
 1962|  21.2k|  mz_uint32 extra_size = 0;
 1963|  21.2k|  mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE];
 1964|  21.2k|  mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64];
 1965|  21.2k|  mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE64;
 1966|  21.2k|#endif
 1967|       |
 1968|  21.2k|  if (!zip) {
  ------------------
  |  Branch (1968:7): [True: 0, False: 21.2k]
  ------------------
 1969|       |    // zip_t handler is not initialized
 1970|      0|    err = ZIP_ENOINIT;
  ------------------
  |  |   93|      0|#define ZIP_ENOINIT -1      // not initialized
  ------------------
 1971|      0|    goto cleanup;
 1972|      0|  }
 1973|       |
 1974|  21.2k|  pzip = &(zip->archive);
 1975|  21.2k|  if (pzip->m_zip_mode == MZ_ZIP_MODE_READING) {
  ------------------
  |  Branch (1975:7): [True: 21.2k, False: 0]
  ------------------
 1976|  21.2k|    goto cleanup;
 1977|  21.2k|  }
 1978|       |
 1979|       |#if !ZIP_ENABLE_DEFLATE
 1980|       |  (void)pzip;
 1981|       |  err = ZIP_EINVMODE;
 1982|       |  goto cleanup;
 1983|       |#else
 1984|      0|  level = zip->level & 0xF;
 1985|      0|  if (level) {
  ------------------
  |  Branch (1985:7): [True: 0, False: 0]
  ------------------
 1986|      0|    done = tdefl_compress_buffer(&(zip->entry.comp), "", 0, TDEFL_FINISH);
 1987|      0|    if (done != TDEFL_STATUS_DONE && done != TDEFL_STATUS_OKAY) {
  ------------------
  |  Branch (1987:9): [True: 0, False: 0]
  |  Branch (1987:38): [True: 0, False: 0]
  ------------------
 1988|      0|      err = ZIP_ETDEFLBUF;
  ------------------
  |  |  104|      0|#define ZIP_ETDEFLBUF -12   // cannot flush tdefl buffer
  ------------------
 1989|      0|      goto cleanup;
 1990|      0|    }
 1991|      0|    zip->entry.comp_size = zip->entry.state.m_comp_size;
 1992|      0|    if (zip->password) {
  ------------------
  |  Branch (1992:9): [True: 0, False: 0]
  ------------------
 1993|      0|      zip->entry.comp_size += ZIP_PKWARE_ENCRYPT_HEADER_SIZE;
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 1994|      0|    }
 1995|      0|    zip->entry.dir_offset = zip->entry.state.m_cur_archive_file_ofs;
 1996|      0|    zip->entry.method = MZ_DEFLATED;
  ------------------
  |  |  316|      0|#define MZ_DEFLATED 8
  ------------------
 1997|      0|  }
 1998|       |
 1999|      0|  entrylen = (mz_uint16)strlen(zip->entry.name);
 2000|      0|#ifndef MINIZ_NO_TIME
 2001|      0|  mz_zip_time_t_to_dos_time(zip->entry.m_time, &dos_time, &dos_date);
 2002|      0|#endif
 2003|       |
 2004|      0|  if (zip->password && zip->entry.enc_header_ofs > 0) {
  ------------------
  |  Branch (2004:7): [True: 0, False: 0]
  |  Branch (2004:24): [True: 0, False: 0]
  ------------------
 2005|      0|    struct zip_pkware_keys_t fix_keys, orig_keys;
 2006|      0|    mz_uint8 enc_header[ZIP_PKWARE_ENCRYPT_HEADER_SIZE];
 2007|      0|    mz_uint8 check_byte = (mz_uint8)(zip->entry.uncomp_crc32 >> 24);
 2008|      0|    mz_uint64 data_ofs, data_size;
 2009|      0|    mz_zip_internal_state *pState = pzip->m_pState;
 2010|      0|    size_t i;
 2011|       |
 2012|      0|    MZ_WRITE_LE32(zip->entry.header + MZ_ZIP_LDH_CRC32_OFS,
  ------------------
  |  | 7913|      0|#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
  ------------------
 2013|      0|                  zip->entry.uncomp_crc32);
 2014|      0|    MZ_WRITE_LE32(zip->entry.header + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS,
  ------------------
  |  | 7913|      0|#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
  |  |  ------------------
  |  |  |  Branch (7913:72): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2015|      0|                  MZ_MIN(zip->entry.comp_size, MZ_UINT32_MAX));
 2016|      0|    MZ_WRITE_LE32(zip->entry.header + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS,
  ------------------
  |  | 7913|      0|#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
  |  |  ------------------
  |  |  |  Branch (7913:72): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2017|      0|                  MZ_MIN(zip->entry.uncomp_size, MZ_UINT32_MAX));
 2018|      0|    if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.header_offset,
  ------------------
  |  Branch (2018:9): [True: 0, False: 0]
  ------------------
 2019|      0|                       zip->entry.header, sizeof(zip->entry.header)) !=
 2020|      0|        sizeof(zip->entry.header)) {
 2021|      0|      err = ZIP_EWRTHDR;
  ------------------
  |  |  106|      0|#define ZIP_EWRTHDR -14     // cannot write entry header
  ------------------
 2022|      0|      goto cleanup;
 2023|      0|    }
 2024|       |
 2025|      0|    zip_pkware_keys_init_password(&fix_keys, zip->password);
 2026|      0|    zip_pkware_keys_init_password(&orig_keys, zip->password);
 2027|       |
 2028|      0|    if (pState->m_pFile) {
  ------------------
  |  Branch (2028:9): [True: 0, False: 0]
  ------------------
 2029|       |#ifndef MINIZ_NO_STDIO
 2030|       |      if (MZ_FSEEK64(pState->m_pFile, (mz_int64)zip->entry.enc_header_ofs,
 2031|       |                     SEEK_SET)) {
 2032|       |        err = ZIP_EFSEEK;
 2033|       |        goto cleanup;
 2034|       |      }
 2035|       |      if (fread(enc_header, 1, ZIP_PKWARE_ENCRYPT_HEADER_SIZE,
 2036|       |                pState->m_pFile) != ZIP_PKWARE_ENCRYPT_HEADER_SIZE) {
 2037|       |        err = ZIP_EFREAD;
 2038|       |        goto cleanup;
 2039|       |      }
 2040|       |#else
 2041|      0|      err = ZIP_ENOFILE;
  ------------------
  |  |  111|      0|#define ZIP_ENOFILE -19     // file not found
  ------------------
 2042|      0|      goto cleanup;
 2043|      0|#endif /* MINIZ_NO_STDIO */
 2044|      0|    } else if (pState->m_pMem) {
  ------------------
  |  Branch (2044:16): [True: 0, False: 0]
  ------------------
 2045|      0|      memcpy(enc_header,
 2046|      0|             (const mz_uint8 *)pState->m_pMem + zip->entry.enc_header_ofs,
 2047|      0|             ZIP_PKWARE_ENCRYPT_HEADER_SIZE);
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 2048|      0|    } else {
 2049|      0|      err = ZIP_EFREAD;
  ------------------
  |  |  120|      0|#define ZIP_EFREAD -28      // fread error
  ------------------
 2050|      0|      goto cleanup;
 2051|      0|    }
 2052|       |
 2053|      0|    for (i = 0; i < ZIP_PKWARE_ENCRYPT_HEADER_SIZE; i++) {
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
  |  Branch (2053:17): [True: 0, False: 0]
  ------------------
 2054|      0|      mz_uint8 plain = zip_pkware_decrypt(&orig_keys, enc_header[i]);
 2055|      0|      if (i == ZIP_PKWARE_ENCRYPT_HEADER_SIZE - 1) {
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
  |  Branch (2055:11): [True: 0, False: 0]
  ------------------
 2056|      0|        enc_header[i] = zip_pkware_encrypt_byte(&fix_keys, check_byte);
 2057|      0|      } else {
 2058|      0|        enc_header[i] = zip_pkware_encrypt_byte(&fix_keys, plain);
 2059|      0|      }
 2060|      0|    }
 2061|       |
 2062|      0|    pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.enc_header_ofs, enc_header,
 2063|      0|                   ZIP_PKWARE_ENCRYPT_HEADER_SIZE);
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 2064|       |
 2065|      0|    data_ofs = zip->entry.enc_header_ofs + ZIP_PKWARE_ENCRYPT_HEADER_SIZE;
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 2066|      0|    if (level) {
  ------------------
  |  Branch (2066:9): [True: 0, False: 0]
  ------------------
 2067|      0|      data_size = zip->entry.state.m_comp_size;
 2068|      0|    } else {
 2069|      0|      data_size = zip->entry.comp_size - ZIP_PKWARE_ENCRYPT_HEADER_SIZE;
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 2070|      0|    }
 2071|       |
 2072|      0|    if (data_size > 0) {
  ------------------
  |  Branch (2072:9): [True: 0, False: 0]
  ------------------
 2073|      0|      mz_uint8 re_buf[4096];
 2074|      0|      mz_uint64 remaining = data_size;
 2075|      0|      mz_uint64 ofs = data_ofs;
 2076|      0|      while (remaining > 0) {
  ------------------
  |  Branch (2076:14): [True: 0, False: 0]
  ------------------
 2077|      0|        size_t chunk =
 2078|      0|            (remaining > sizeof(re_buf)) ? sizeof(re_buf) : (size_t)remaining;
  ------------------
  |  Branch (2078:13): [True: 0, False: 0]
  ------------------
 2079|       |
 2080|      0|        if (pState->m_pFile) {
  ------------------
  |  Branch (2080:13): [True: 0, False: 0]
  ------------------
 2081|       |#ifndef MINIZ_NO_STDIO
 2082|       |          if (MZ_FSEEK64(pState->m_pFile, (mz_int64)ofs, SEEK_SET)) {
 2083|       |            err = ZIP_EFSEEK;
 2084|       |            goto cleanup;
 2085|       |          }
 2086|       |          if (fread(re_buf, 1, chunk, pState->m_pFile) != chunk) {
 2087|       |            err = ZIP_EFREAD;
 2088|       |            goto cleanup;
 2089|       |          }
 2090|       |#else
 2091|      0|          err = ZIP_ENOFILE;
  ------------------
  |  |  111|      0|#define ZIP_ENOFILE -19     // file not found
  ------------------
 2092|      0|          goto cleanup;
 2093|      0|#endif /* MINIZ_NO_STDIO */
 2094|      0|        } else if (pState->m_pMem) {
  ------------------
  |  Branch (2094:20): [True: 0, False: 0]
  ------------------
 2095|      0|          memcpy(re_buf, (const mz_uint8 *)pState->m_pMem + ofs, chunk);
 2096|      0|        } else {
 2097|      0|          err = ZIP_EFREAD;
  ------------------
  |  |  120|      0|#define ZIP_EFREAD -28      // fread error
  ------------------
 2098|      0|          goto cleanup;
 2099|      0|        }
 2100|       |
 2101|      0|        for (i = 0; i < chunk; i++) {
  ------------------
  |  Branch (2101:21): [True: 0, False: 0]
  ------------------
 2102|      0|          mz_uint8 plain = zip_pkware_decrypt(&orig_keys, re_buf[i]);
 2103|      0|          re_buf[i] = zip_pkware_encrypt_byte(&fix_keys, plain);
 2104|      0|        }
 2105|      0|        if (pzip->m_pWrite(pzip->m_pIO_opaque, ofs, re_buf, chunk) != chunk) {
  ------------------
  |  Branch (2105:13): [True: 0, False: 0]
  ------------------
 2106|      0|          err = ZIP_EFWRITE;
  ------------------
  |  |  121|      0|#define ZIP_EFWRITE -29     // fwrite error
  ------------------
 2107|      0|          goto cleanup;
 2108|      0|        }
 2109|      0|        ofs += chunk;
 2110|      0|        remaining -= chunk;
 2111|      0|      }
 2112|      0|    }
 2113|      0|  } else {
 2114|      0|    MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID);
  ------------------
  |  | 7913|      0|#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
  ------------------
 2115|      0|    MZ_WRITE_LE32(local_dir_footer + 4, zip->entry.uncomp_crc32);
  ------------------
  |  | 7913|      0|#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
  ------------------
 2116|      0|    MZ_WRITE_LE64(local_dir_footer + 8, zip->entry.comp_size);
  ------------------
  |  | 7914|      0|#define MZ_WRITE_LE64(p, v) mz_write_le64((mz_uint8 *)(p), (mz_uint64)(v))
  ------------------
 2117|      0|    MZ_WRITE_LE64(local_dir_footer + 16, zip->entry.uncomp_size);
  ------------------
  |  | 7914|      0|#define MZ_WRITE_LE64(p, v) mz_write_le64((mz_uint8 *)(p), (mz_uint64)(v))
  ------------------
 2118|       |
 2119|      0|    if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.dir_offset,
  ------------------
  |  Branch (2119:9): [True: 0, False: 0]
  ------------------
 2120|      0|                       local_dir_footer,
 2121|      0|                       local_dir_footer_size) != local_dir_footer_size) {
 2122|      0|      err = ZIP_EWRTHDR;
  ------------------
  |  |  106|      0|#define ZIP_EWRTHDR -14     // cannot write entry header
  ------------------
 2123|      0|      goto cleanup;
 2124|      0|    }
 2125|      0|    zip->entry.dir_offset += local_dir_footer_size;
 2126|      0|  }
 2127|       |
 2128|      0|  pExtra_data = extra_data;
 2129|      0|  extra_size = mz_zip_writer_create_zip64_extra_data(
 2130|      0|      extra_data,
 2131|      0|      (zip->entry.uncomp_size >= MZ_UINT32_MAX) ? &zip->entry.uncomp_size
  ------------------
  |  |  794|      0|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (2131:7): [True: 0, False: 0]
  ------------------
 2132|      0|                                                : NULL,
 2133|      0|      (zip->entry.comp_size >= MZ_UINT32_MAX) ? &zip->entry.comp_size : NULL,
  ------------------
  |  |  794|      0|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (2133:7): [True: 0, False: 0]
  ------------------
 2134|      0|      (zip->entry.header_offset >= MZ_UINT32_MAX) ? &zip->entry.header_offset
  ------------------
  |  |  794|      0|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (2134:7): [True: 0, False: 0]
  ------------------
 2135|      0|                                                  : NULL);
 2136|       |
 2137|      0|  if ((entrylen) && ISSLASH(zip->entry.name[entrylen - 1]) &&
  ------------------
  |  |   65|      0|#define ISSLASH(C) ((C) == '/' || (C) == '\\')
  |  |  ------------------
  |  |  |  Branch (65:21): [True: 0, False: 0]
  |  |  |  Branch (65:35): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2137:7): [True: 0, False: 0]
  ------------------
 2138|      0|      !zip->entry.uncomp_size) {
  ------------------
  |  Branch (2138:7): [True: 0, False: 0]
  ------------------
 2139|       |    /* Set DOS Subdirectory attribute bit. */
 2140|      0|    zip->entry.external_attr |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG;
 2141|      0|  }
 2142|       |
 2143|      0|  {
 2144|      0|    mz_uint16 gen_flags = MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8;
 2145|      0|    if (zip->password) {
  ------------------
  |  Branch (2145:9): [True: 0, False: 0]
  ------------------
 2146|      0|      gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED;
 2147|      0|    } else {
 2148|      0|      gen_flags |= MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR;
 2149|      0|    }
 2150|       |
 2151|      0|    if (!mz_zip_writer_add_to_central_dir(
  ------------------
  |  Branch (2151:9): [True: 0, False: 0]
  ------------------
 2152|      0|            pzip, zip->entry.name, entrylen, pExtra_data, (mz_uint16)extra_size,
 2153|      0|            "", 0, zip->entry.uncomp_size, zip->entry.comp_size,
 2154|      0|            zip->entry.uncomp_crc32, zip->entry.method, gen_flags, dos_time,
 2155|      0|            dos_date, zip->entry.header_offset, zip->entry.external_attr, NULL,
 2156|      0|            0)) {
 2157|      0|      err = ZIP_EWRTDIR;
  ------------------
  |  |  107|      0|#define ZIP_EWRTDIR -15     // cannot write to central dir
  ------------------
 2158|      0|      goto cleanup;
 2159|      0|    }
 2160|      0|  }
 2161|       |
 2162|      0|  pzip->m_total_files++;
 2163|      0|  pzip->m_archive_size = zip->entry.dir_offset;
 2164|      0|#endif /* ZIP_ENABLE_DEFLATE */
 2165|       |
 2166|  21.2k|cleanup:
 2167|  21.2k|  if (zip) {
  ------------------
  |  Branch (2167:7): [True: 21.2k, False: 0]
  ------------------
 2168|  21.2k|    zip->entry.m_time = 0;
 2169|  21.2k|    zip->entry.index = -1;
 2170|       |    CLEANUP(zip->entry.name);
  ------------------
  |  |   72|  21.2k|  do {                                                                         \
  |  |   73|  21.2k|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 21.2k, False: 0]
  |  |  ------------------
  |  |   74|  21.2k|      free((void *)ptr);                                                       \
  |  |   75|  21.2k|      ptr = NULL;                                                              \
  |  |   76|  21.2k|    }                                                                          \
  |  |   77|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 2171|  21.2k|  }
 2172|  21.2k|  return err;
 2173|      0|}
zip_entry_name:
 2175|  16.2k|const char *zip_entry_name(struct zip_t *zip) {
 2176|  16.2k|  if (!zip) {
  ------------------
  |  Branch (2176:7): [True: 0, False: 16.2k]
  ------------------
 2177|       |    // zip_t handler is not initialized
 2178|      0|    return NULL;
 2179|      0|  }
 2180|  16.2k|  return zip->entry.name;
 2181|  16.2k|}
zip_entry_isdir:
 2192|  16.2k|int zip_entry_isdir(struct zip_t *zip) {
 2193|  16.2k|  mz_uint16 entrylen;
 2194|  16.2k|  if (!zip) {
  ------------------
  |  Branch (2194:7): [True: 0, False: 16.2k]
  ------------------
 2195|       |    // zip_t handler is not initialized
 2196|      0|    return ZIP_ENOINIT;
  ------------------
  |  |   93|      0|#define ZIP_ENOINIT -1      // not initialized
  ------------------
 2197|      0|  }
 2198|       |
 2199|  16.2k|  if (zip->entry.index < (ssize_t)0) {
  ------------------
  |  Branch (2199:7): [True: 2.55k, False: 13.7k]
  ------------------
 2200|       |    // zip entry is not opened
 2201|  2.55k|    return ZIP_EINVIDX;
  ------------------
  |  |  102|  2.55k|#define ZIP_EINVIDX -10     // invalid index
  ------------------
 2202|  2.55k|  }
 2203|       |
 2204|  13.7k|  if (!zip->entry.name) {
  ------------------
  |  Branch (2204:7): [True: 0, False: 13.7k]
  ------------------
 2205|      0|    return ZIP_EINVENTNAME;
  ------------------
  |  |   94|      0|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 2206|      0|  }
 2207|       |
 2208|  13.7k|  entrylen = (mz_uint16)strlen(zip->entry.name);
 2209|  13.7k|  if (entrylen == 0) {
  ------------------
  |  Branch (2209:7): [True: 2.05k, False: 11.6k]
  ------------------
 2210|  2.05k|    return 0;
 2211|  2.05k|  }
 2212|  11.6k|  return ISSLASH(zip->entry.name[entrylen - 1]);
  ------------------
  |  |   65|  11.6k|#define ISSLASH(C) ((C) == '/' || (C) == '\\')
  |  |  ------------------
  |  |  |  Branch (65:21): [True: 283, False: 11.3k]
  |  |  |  Branch (65:35): [True: 290, False: 11.1k]
  |  |  ------------------
  ------------------
 2213|  13.7k|}
zip_entry_size:
 2230|  21.2k|unsigned long long zip_entry_size(struct zip_t *zip) {
 2231|  21.2k|  return zip_entry_uncomp_size(zip);
 2232|  21.2k|}
zip_entry_uncomp_size:
 2234|  21.2k|unsigned long long zip_entry_uncomp_size(struct zip_t *zip) {
 2235|  21.2k|  return zip ? zip->entry.uncomp_size : 0;
  ------------------
  |  Branch (2235:10): [True: 21.2k, False: 0]
  ------------------
 2236|  21.2k|}
zip_entry_comp_size:
 2238|  21.2k|unsigned long long zip_entry_comp_size(struct zip_t *zip) {
 2239|  21.2k|  return zip ? zip->entry.comp_size : 0;
  ------------------
  |  Branch (2239:10): [True: 21.2k, False: 0]
  ------------------
 2240|  21.2k|}
zip_entry_noallocread:
 2562|  3.30k|ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
 2563|  3.30k|  mz_zip_archive *pzip = NULL;
 2564|       |
 2565|  3.30k|  if (!zip) {
  ------------------
  |  Branch (2565:7): [True: 0, False: 3.30k]
  ------------------
 2566|      0|    return (ssize_t)ZIP_ENOINIT;
  ------------------
  |  |   93|      0|#define ZIP_ENOINIT -1      // not initialized
  ------------------
 2567|      0|  }
 2568|       |
 2569|  3.30k|  pzip = &(zip->archive);
 2570|  3.30k|  if (pzip->m_zip_mode != MZ_ZIP_MODE_READING ||
  ------------------
  |  Branch (2570:7): [True: 0, False: 3.30k]
  ------------------
 2571|  3.30k|      zip->entry.index < (ssize_t)0) {
  ------------------
  |  Branch (2571:7): [True: 0, False: 3.30k]
  ------------------
 2572|      0|    return (ssize_t)ZIP_ENOENT;
  ------------------
  |  |   95|      0|#define ZIP_ENOENT -3       // entry not found
  ------------------
 2573|      0|  }
 2574|       |
 2575|  3.30k|  if (zip->password) {
  ------------------
  |  Branch (2575:7): [True: 0, False: 3.30k]
  ------------------
 2576|      0|    void *heap_buf = NULL;
 2577|      0|    size_t heap_size = 0;
 2578|      0|    ssize_t n = zip_entry_decrypt_and_read(zip, &heap_buf, &heap_size);
 2579|      0|    if (n < 0) {
  ------------------
  |  Branch (2579:9): [True: 0, False: 0]
  ------------------
 2580|      0|      return n;
 2581|      0|    }
 2582|      0|    if (heap_size > bufsize) {
  ------------------
  |  Branch (2582:9): [True: 0, False: 0]
  ------------------
 2583|      0|      free(heap_buf);
 2584|      0|      return (ssize_t)ZIP_EMEMNOALLOC;
  ------------------
  |  |  110|      0|#define ZIP_EMEMNOALLOC -18 // extracting data using no memory allocation
  ------------------
 2585|      0|    }
 2586|      0|    memcpy(buf, heap_buf, heap_size);
 2587|      0|    free(heap_buf);
 2588|      0|    return (ssize_t)heap_size;
 2589|      0|  }
 2590|       |
 2591|  3.30k|  if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index,
  ------------------
  |  Branch (2591:7): [True: 2.81k, False: 482]
  ------------------
 2592|  3.30k|                                             buf, bufsize, 0, NULL, 0)) {
 2593|  2.81k|    return (ssize_t)ZIP_EMEMNOALLOC;
  ------------------
  |  |  110|  2.81k|#define ZIP_EMEMNOALLOC -18 // extracting data using no memory allocation
  ------------------
 2594|  2.81k|  }
 2595|       |
 2596|    482|  return (ssize_t)zip->entry.uncomp_size;
 2597|  3.30k|}
zip_entries_total:
 2780|  4.52k|ssize_t zip_entries_total(struct zip_t *zip) {
 2781|  4.52k|  if (!zip) {
  ------------------
  |  Branch (2781:7): [True: 1.45k, False: 3.07k]
  ------------------
 2782|       |    // zip_t handler is not initialized
 2783|  1.45k|    return ZIP_ENOINIT;
  ------------------
  |  |   93|  1.45k|#define ZIP_ENOINIT -1      // not initialized
  ------------------
 2784|  1.45k|  }
 2785|       |
 2786|  3.07k|  return (ssize_t)zip->archive.m_total_files;
 2787|  4.52k|}
zip_stream_open:
 2893|  4.52k|                              char mode) {
 2894|  4.52k|  int errnum = 0;
 2895|  4.52k|  return zip_stream_openwitherror(stream, size, level, mode, &errnum);
 2896|  4.52k|}
zip_stream_openwitherror:
 2911|  4.52k|                                       int level, char mode, int *errnum) {
 2912|  4.52k|#if ZIP_ENABLE_DEFLATE
 2913|  4.52k|  mz_uint wflags = (mode == 'w') ? MZ_ZIP_FLAG_WRITE_ZIP64 : 0;
  ------------------
  |  Branch (2913:20): [True: 0, False: 4.52k]
  ------------------
 2914|  4.52k|#endif
 2915|  4.52k|  struct zip_t *zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t));
 2916|       |#if !ZIP_ENABLE_INFLATE && !ZIP_ENABLE_DEFLATE
 2917|       |  (void)stream;
 2918|       |  (void)size;
 2919|       |#endif
 2920|  4.52k|  if (!zip) {
  ------------------
  |  Branch (2920:7): [True: 0, False: 4.52k]
  ------------------
 2921|       |    // out of memory
 2922|      0|    *errnum = ZIP_EOOMEM;
  ------------------
  |  |  113|      0|#define ZIP_EOOMEM -21      // out of memory
  ------------------
 2923|      0|    return NULL;
 2924|      0|  }
 2925|       |
 2926|  4.52k|  zip->entry.index = -1;
 2927|       |
 2928|  4.52k|  if (level < 0) {
  ------------------
  |  Branch (2928:7): [True: 0, False: 4.52k]
  ------------------
 2929|      0|    level = MZ_DEFAULT_LEVEL;
 2930|      0|  }
 2931|  4.52k|  if ((level & 0xF) > MZ_UBER_COMPRESSION) {
  ------------------
  |  Branch (2931:7): [True: 0, False: 4.52k]
  ------------------
 2932|       |    // Wrong compression level
 2933|      0|    *errnum = ZIP_EINVLVL;
  ------------------
  |  |   97|      0|#define ZIP_EINVLVL -5      // invalid compression level
  ------------------
 2934|      0|    goto cleanup;
 2935|      0|  }
 2936|  4.52k|  zip->level = (mz_uint)level;
 2937|       |
 2938|  4.52k|  switch (mode) {
 2939|      0|#if ZIP_ENABLE_INFLATE
 2940|  4.52k|  case 'r':
  ------------------
  |  Branch (2940:3): [True: 4.52k, False: 0]
  ------------------
 2941|  4.52k|  case ('r' - 64): {
  ------------------
  |  Branch (2941:3): [True: 0, False: 4.52k]
  ------------------
 2942|  4.52k|    if (stream && size > 0) {
  ------------------
  |  Branch (2942:9): [True: 4.52k, False: 0]
  |  Branch (2942:19): [True: 4.52k, False: 0]
  ------------------
 2943|  4.52k|      if (!mz_zip_reader_init_mem(&(zip->archive), stream, size, 0)) {
  ------------------
  |  Branch (2943:11): [True: 1.45k, False: 3.07k]
  ------------------
 2944|  1.45k|        *errnum = ZIP_ERINIT;
  ------------------
  |  |  122|  1.45k|#define ZIP_ERINIT -30      // cannot initialize reader
  ------------------
 2945|  1.45k|        goto cleanup;
 2946|  1.45k|      }
 2947|  4.52k|    } else {
 2948|      0|      *errnum = ZIP_EINVMODE;
  ------------------
  |  |   96|      0|#define ZIP_EINVMODE -4     // invalid zip mode
  ------------------
 2949|      0|      goto cleanup;
 2950|      0|    }
 2951|  4.52k|  } break;
 2952|  3.07k|#endif
 2953|       |
 2954|  3.07k|#if ZIP_ENABLE_DEFLATE
 2955|  3.07k|  case 'd':
  ------------------
  |  Branch (2955:3): [True: 0, False: 4.52k]
  ------------------
 2956|      0|  case ('d' - 64): {
  ------------------
  |  Branch (2956:3): [True: 0, False: 4.52k]
  ------------------
 2957|      0|    if (stream && size > 0) {
  ------------------
  |  Branch (2957:9): [True: 0, False: 0]
  |  Branch (2957:19): [True: 0, False: 0]
  ------------------
 2958|      0|      if (!mz_zip_reader_init_mem(
  ------------------
  |  Branch (2958:11): [True: 0, False: 0]
  ------------------
 2959|      0|              &(zip->archive), stream, size,
 2960|      0|              zip->level | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY)) {
 2961|      0|        *errnum = ZIP_ERINIT;
  ------------------
  |  |  122|      0|#define ZIP_ERINIT -30      // cannot initialize reader
  ------------------
 2962|      0|        goto cleanup;
 2963|      0|      }
 2964|      0|      if (!mz_zip_writer_init_from_reader_v2(&(zip->archive), NULL, 0)) {
  ------------------
  |  Branch (2964:11): [True: 0, False: 0]
  ------------------
 2965|      0|        *errnum = ZIP_EWRINIT;
  ------------------
  |  |  124|      0|#define ZIP_EWRINIT -32     // cannot initialize writer from reader
  ------------------
 2966|      0|        mz_zip_reader_end(&(zip->archive));
 2967|      0|        goto cleanup;
 2968|      0|      }
 2969|      0|      zip->archive.m_pWrite = zip_stream_delete_write_func;
 2970|       |      // init_from_reader sets m_mem_capacity to the size of the caller-owned
 2971|       |      // stream buffer and assumes it is heap-resizable. It is not ours to
 2972|       |      // resize, so clear the capacity: the first write then copies it into a
 2973|       |      // library-owned block (see zip_stream_delete_write_func) and a non-zero
 2974|       |      // capacity afterwards reliably marks that owned block.
 2975|      0|      zip->archive.m_pState->m_mem_capacity = 0;
 2976|      0|    } else {
 2977|      0|      *errnum = ZIP_EINVMODE;
  ------------------
  |  |   96|      0|#define ZIP_EINVMODE -4     // invalid zip mode
  ------------------
 2978|      0|      goto cleanup;
 2979|      0|    }
 2980|      0|  } break;
 2981|       |
 2982|      0|  case 'w':
  ------------------
  |  Branch (2982:3): [True: 0, False: 4.52k]
  ------------------
 2983|      0|  case ('w' - 64): {
  ------------------
  |  Branch (2983:3): [True: 0, False: 4.52k]
  ------------------
 2984|      0|    if (stream == NULL && size == 0) {
  ------------------
  |  Branch (2984:9): [True: 0, False: 0]
  |  Branch (2984:27): [True: 0, False: 0]
  ------------------
 2985|      0|      if (!mz_zip_writer_init_heap_v2(&(zip->archive), 0, 1024, wflags)) {
  ------------------
  |  Branch (2985:11): [True: 0, False: 0]
  ------------------
 2986|      0|        *errnum = ZIP_EWINIT;
  ------------------
  |  |  123|      0|#define ZIP_EWINIT -31      // cannot initialize writer
  ------------------
 2987|      0|        goto cleanup;
 2988|      0|      }
 2989|      0|    } else {
 2990|      0|      *errnum = ZIP_EINVMODE;
  ------------------
  |  |   96|      0|#define ZIP_EINVMODE -4     // invalid zip mode
  ------------------
 2991|      0|      goto cleanup;
 2992|      0|    }
 2993|      0|  } break;
 2994|      0|#endif
 2995|       |
 2996|      0|  default:
  ------------------
  |  Branch (2996:3): [True: 0, False: 4.52k]
  ------------------
 2997|      0|    *errnum = ZIP_EINVMODE;
  ------------------
  |  |   96|      0|#define ZIP_EINVMODE -4     // invalid zip mode
  ------------------
 2998|      0|    goto cleanup;
 2999|  4.52k|  }
 3000|       |
 3001|  3.07k|  *errnum = 0;
 3002|  3.07k|  return zip;
 3003|       |
 3004|  1.45k|cleanup:
 3005|  1.45k|  CLEANUP(zip);
  ------------------
  |  |   72|  1.45k|  do {                                                                         \
  |  |   73|  1.45k|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1.45k, False: 0]
  |  |  ------------------
  |  |   74|  1.45k|      free((void *)ptr);                                                       \
  |  |   75|  1.45k|      ptr = NULL;                                                              \
  |  |   76|  1.45k|    }                                                                          \
  |  |   77|  1.45k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 1.45k]
  |  |  ------------------
  ------------------
 3006|       |  return NULL;
 3007|  4.52k|}
zip.c:_zip_entry_open:
 1620|  6.59k|                           int case_sensitive) {
 1621|  6.59k|  size_t entrylen = 0;
 1622|  6.59k|  mz_zip_archive *pzip = NULL;
 1623|  6.59k|  mz_zip_archive_file_stat stats;
 1624|  6.59k|#if ZIP_ENABLE_DEFLATE
 1625|  6.59k|  int err = 0;
 1626|  6.59k|  mz_uint num_alignment_padding_bytes, level;
 1627|  6.59k|  mz_uint16 dos_time = 0, dos_date = 0;
 1628|  6.59k|  mz_uint32 extra_size = 0;
 1629|  6.59k|  mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE];
 1630|  6.59k|  mz_uint64 local_dir_header_ofs = 0;
 1631|  6.59k|#endif
 1632|       |
 1633|  6.59k|  if (!zip) {
  ------------------
  |  Branch (1633:7): [True: 0, False: 6.59k]
  ------------------
 1634|      0|    return ZIP_ENOINIT;
  ------------------
  |  |   93|      0|#define ZIP_ENOINIT -1      // not initialized
  ------------------
 1635|      0|  }
 1636|       |
 1637|  6.59k|#if ZIP_ENABLE_DEFLATE
 1638|  6.59k|  local_dir_header_ofs = zip->archive.m_archive_size;
 1639|  6.59k|#endif
 1640|       |
 1641|  6.59k|  if (!entryname) {
  ------------------
  |  Branch (1641:7): [True: 0, False: 6.59k]
  ------------------
 1642|      0|    return ZIP_EINVENTNAME;
  ------------------
  |  |   94|      0|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 1643|      0|  }
 1644|       |
 1645|  6.59k|  entrylen = strlen(entryname);
 1646|  6.59k|  if (entrylen == 0) {
  ------------------
  |  Branch (1646:7): [True: 684, False: 5.90k]
  ------------------
 1647|    684|    return ZIP_EINVENTNAME;
  ------------------
  |  |   94|    684|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 1648|    684|  }
 1649|       |
 1650|       |  // the zip filename length is a 16-bit field; a longer name is truncated by
 1651|       |  // the (mz_uint16) cast in the local/central header while the full name is
 1652|       |  // still written, leaving a corrupt entry
 1653|  5.90k|  if (entrylen > MZ_UINT16_MAX) {
  ------------------
  |  |  793|  5.90k|#define MZ_UINT16_MAX (0xFFFFU)
  ------------------
  |  Branch (1653:7): [True: 0, False: 5.90k]
  ------------------
 1654|      0|    return ZIP_EINVENTNAME;
  ------------------
  |  |   94|      0|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 1655|      0|  }
 1656|       |
 1657|  5.90k|  if (zip->entry.name) {
  ------------------
  |  Branch (1657:7): [True: 0, False: 5.90k]
  ------------------
 1658|      0|    CLEANUP(zip->entry.name);
  ------------------
  |  |   72|      0|  do {                                                                         \
  |  |   73|      0|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|      free((void *)ptr);                                                       \
  |  |   75|      0|      ptr = NULL;                                                              \
  |  |   76|      0|    }                                                                          \
  |  |   77|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1659|      0|  }
 1660|       |
 1661|  5.90k|  pzip = &(zip->archive);
 1662|  5.90k|  if (pzip->m_zip_mode == MZ_ZIP_MODE_READING) {
  ------------------
  |  Branch (1662:7): [True: 5.90k, False: 0]
  ------------------
 1663|  5.90k|    zip->entry.name = zip_strclone(entryname, entrylen);
 1664|  5.90k|    if (!zip->entry.name) {
  ------------------
  |  Branch (1664:9): [True: 0, False: 5.90k]
  ------------------
 1665|       |      // Cannot parse zip entry name
 1666|      0|      return ZIP_EINVENTNAME;
  ------------------
  |  |   94|      0|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 1667|      0|    }
 1668|       |
 1669|  5.90k|    zip->entry.index = (ssize_t)mz_zip_reader_locate_file(
 1670|  5.90k|        pzip, zip->entry.name, NULL,
 1671|  5.90k|        case_sensitive ? MZ_ZIP_FLAG_CASE_SENSITIVE : 0);
  ------------------
  |  Branch (1671:9): [True: 5.90k, False: 0]
  ------------------
 1672|  5.90k|    if (zip->entry.index < (ssize_t)0) {
  ------------------
  |  Branch (1672:9): [True: 757, False: 5.15k]
  ------------------
 1673|    757|      CLEANUP(zip->entry.name);
  ------------------
  |  |   72|    757|  do {                                                                         \
  |  |   73|    757|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 757, False: 0]
  |  |  ------------------
  |  |   74|    757|      free((void *)ptr);                                                       \
  |  |   75|    757|      ptr = NULL;                                                              \
  |  |   76|    757|    }                                                                          \
  |  |   77|    757|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 757]
  |  |  ------------------
  ------------------
 1674|    757|      return ZIP_ENOENT;
  ------------------
  |  |   95|    757|#define ZIP_ENOENT -3       // entry not found
  ------------------
 1675|    757|    }
 1676|       |
 1677|  5.15k|    if (!mz_zip_reader_file_stat(pzip, (mz_uint)zip->entry.index, &stats)) {
  ------------------
  |  Branch (1677:9): [True: 167, False: 4.98k]
  ------------------
 1678|    167|      CLEANUP(zip->entry.name);
  ------------------
  |  |   72|    167|  do {                                                                         \
  |  |   73|    167|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 167, False: 0]
  |  |  ------------------
  |  |   74|    167|      free((void *)ptr);                                                       \
  |  |   75|    167|      ptr = NULL;                                                              \
  |  |   76|    167|    }                                                                          \
  |  |   77|    167|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 167]
  |  |  ------------------
  ------------------
 1679|    167|      return ZIP_ENOENT;
  ------------------
  |  |   95|    167|#define ZIP_ENOENT -3       // entry not found
  ------------------
 1680|    167|    }
 1681|       |
 1682|  4.98k|    zip->entry.comp_size = stats.m_comp_size;
 1683|  4.98k|    zip->entry.uncomp_size = stats.m_uncomp_size;
 1684|  4.98k|    zip->entry.uncomp_crc32 = stats.m_crc32;
 1685|  4.98k|    zip->entry.dir_offset = stats.m_central_dir_ofs;
 1686|  4.98k|    zip->entry.header_offset = stats.m_local_header_ofs;
 1687|  4.98k|    zip->entry.method = stats.m_method;
 1688|  4.98k|    zip->entry.version_made_by = stats.m_version_made_by;
 1689|  4.98k|    zip->entry.external_attr = stats.m_external_attr;
 1690|  4.98k|#ifndef MINIZ_NO_TIME
 1691|  4.98k|    zip->entry.m_time = stats.m_time;
 1692|  4.98k|#endif
 1693|       |
 1694|  4.98k|    return 0;
 1695|  5.15k|  }
 1696|       |
 1697|       |#if !ZIP_ENABLE_DEFLATE
 1698|       |  return ZIP_EINVMODE;
 1699|       |#else
 1700|       |  /*
 1701|       |    .ZIP File Format Specification Version: 6.3.3
 1702|       |
 1703|       |    4.4.17.1 The name of the file, with optional relative path.
 1704|       |    The path stored MUST not contain a drive or
 1705|       |    device letter, or a leading slash.  All slashes
 1706|       |    MUST be forward slashes '/' as opposed to
 1707|       |    backwards slashes '\' for compatibility with Amiga
 1708|       |    and UNIX file systems etc.  If input came from standard
 1709|       |    input, there is no file name field.
 1710|       |  */
 1711|      0|  zip->entry.name = zip_strrpl(entryname, entrylen, '\\', '/');
 1712|      0|  if (!zip->entry.name) {
  ------------------
  |  Branch (1712:7): [True: 0, False: 0]
  ------------------
 1713|       |    // Cannot parse zip entry name
 1714|      0|    return ZIP_EINVENTNAME;
  ------------------
  |  |   94|      0|#define ZIP_EINVENTNAME -2  // invalid entry name
  ------------------
 1715|      0|  }
 1716|       |
 1717|      0|  level = zip->level & 0xF;
 1718|       |
 1719|      0|  zip->entry.index = (ssize_t)zip->archive.m_total_files;
 1720|      0|  zip->entry.comp_size = 0;
 1721|      0|  zip->entry.uncomp_size = 0;
 1722|      0|  zip->entry.uncomp_crc32 = MZ_CRC32_INIT;
  ------------------
  |  |  300|      0|#define MZ_CRC32_INIT (0)
  ------------------
 1723|      0|  zip->entry.dir_offset = zip->archive.m_archive_size;
 1724|      0|  zip->entry.header_offset = zip->archive.m_archive_size;
 1725|      0|  memset(zip->entry.header, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE * sizeof(mz_uint8));
 1726|      0|  zip->entry.method = level ? MZ_DEFLATED : 0;
  ------------------
  |  |  316|      0|#define MZ_DEFLATED 8
  ------------------
  |  Branch (1726:23): [True: 0, False: 0]
  ------------------
 1727|      0|  zip->entry.version_made_by = 0;
 1728|       |
 1729|       |  // UNIX or APPLE
 1730|       |#if MZ_PLATFORM == 3 || MZ_PLATFORM == 19
 1731|       |  // regular file with rw-r--r-- permissions
 1732|       |  zip->entry.external_attr = (mz_uint32)(0100644) << 16;
 1733|       |#else
 1734|      0|  zip->entry.external_attr = 0;
 1735|      0|#endif
 1736|       |
 1737|      0|  num_alignment_padding_bytes =
 1738|      0|      mz_zip_writer_compute_padding_needed_for_file_alignment(pzip);
 1739|       |
 1740|      0|  if (!pzip->m_pState || (pzip->m_zip_mode != MZ_ZIP_MODE_WRITING)) {
  ------------------
  |  Branch (1740:7): [True: 0, False: 0]
  |  Branch (1740:26): [True: 0, False: 0]
  ------------------
 1741|       |    // Invalid zip mode
 1742|      0|    err = ZIP_EINVMODE;
  ------------------
  |  |   96|      0|#define ZIP_EINVMODE -4     // invalid zip mode
  ------------------
 1743|      0|    goto cleanup;
 1744|      0|  }
 1745|      0|  if (zip->level & MZ_ZIP_FLAG_COMPRESSED_DATA) {
  ------------------
  |  Branch (1745:7): [True: 0, False: 0]
  ------------------
 1746|       |    // Invalid zip compression level
 1747|      0|    err = ZIP_EINVLVL;
  ------------------
  |  |   97|      0|#define ZIP_EINVLVL -5      // invalid compression level
  ------------------
 1748|      0|    goto cleanup;
 1749|      0|  }
 1750|       |
 1751|      0|  if (!mz_zip_writer_write_zeros(pzip, zip->entry.dir_offset,
  ------------------
  |  Branch (1751:7): [True: 0, False: 0]
  ------------------
 1752|      0|                                 num_alignment_padding_bytes)) {
 1753|       |    // Cannot memset zip entry header
 1754|      0|    err = ZIP_EMEMSET;
  ------------------
  |  |   99|      0|#define ZIP_EMEMSET -7      // memset error
  ------------------
 1755|      0|    goto cleanup;
 1756|      0|  }
 1757|      0|  local_dir_header_ofs += num_alignment_padding_bytes;
 1758|       |
 1759|      0|  zip->entry.m_time = time(NULL);
 1760|      0|#ifndef MINIZ_NO_TIME
 1761|      0|  mz_zip_time_t_to_dos_time(zip->entry.m_time, &dos_time, &dos_date);
 1762|      0|#endif
 1763|       |
 1764|       |  // ZIP64 header with NULL sizes (sizes will be in the data descriptor, just
 1765|       |  // after file data)
 1766|      0|  extra_size = mz_zip_writer_create_zip64_extra_data(
 1767|      0|      extra_data, NULL, NULL,
 1768|      0|      (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs : NULL);
  ------------------
  |  |  794|      0|#define MZ_UINT32_MAX (0xFFFFFFFFU)
  ------------------
  |  Branch (1768:7): [True: 0, False: 0]
  ------------------
 1769|       |
 1770|      0|  {
 1771|      0|    mz_uint16 gen_flags = MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8;
 1772|      0|    if (zip->password) {
  ------------------
  |  Branch (1772:9): [True: 0, False: 0]
  ------------------
 1773|      0|      gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED;
 1774|      0|    } else {
 1775|      0|      gen_flags |= MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR;
 1776|      0|    }
 1777|       |
 1778|      0|    if (!mz_zip_writer_create_local_dir_header(
  ------------------
  |  Branch (1778:9): [True: 0, False: 0]
  ------------------
 1779|      0|            pzip, zip->entry.header, (mz_uint16)entrylen, (mz_uint16)extra_size,
 1780|      0|            0, 0, 0, zip->entry.method, gen_flags, dos_time, dos_date)) {
 1781|      0|      err = ZIP_EMEMSET;
  ------------------
  |  |   99|      0|#define ZIP_EMEMSET -7      // memset error
  ------------------
 1782|      0|      goto cleanup;
 1783|      0|    }
 1784|      0|  }
 1785|       |
 1786|      0|  zip->entry.header_offset =
 1787|      0|      zip->entry.dir_offset + num_alignment_padding_bytes;
 1788|       |
 1789|      0|  if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.header_offset,
  ------------------
  |  Branch (1789:7): [True: 0, False: 0]
  ------------------
 1790|      0|                     zip->entry.header,
 1791|      0|                     sizeof(zip->entry.header)) != sizeof(zip->entry.header)) {
 1792|      0|    err = ZIP_EMEMSET;
  ------------------
  |  |   99|      0|#define ZIP_EMEMSET -7      // memset error
  ------------------
 1793|      0|    goto cleanup;
 1794|      0|  }
 1795|       |
 1796|      0|  if (pzip->m_file_offset_alignment) {
  ------------------
  |  Branch (1796:7): [True: 0, False: 0]
  ------------------
 1797|      0|    MZ_ASSERT(
  ------------------
  |  |  746|      0|#define MZ_ASSERT(x) assert(x)
  ------------------
 1798|      0|        (zip->entry.header_offset & (pzip->m_file_offset_alignment - 1)) == 0);
 1799|      0|  }
 1800|      0|  zip->entry.dir_offset +=
 1801|      0|      num_alignment_padding_bytes + sizeof(zip->entry.header);
 1802|       |
 1803|      0|  if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.dir_offset, zip->entry.name,
  ------------------
  |  Branch (1803:7): [True: 0, False: 0]
  ------------------
 1804|      0|                     entrylen) != entrylen) {
 1805|      0|    err = ZIP_EWRTENT;
  ------------------
  |  |  100|      0|#define ZIP_EWRTENT -8      // cannot write data to entry
  ------------------
 1806|      0|    goto cleanup;
 1807|      0|  }
 1808|       |
 1809|      0|  zip->entry.dir_offset += entrylen;
 1810|       |
 1811|      0|  if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.dir_offset, extra_data,
  ------------------
  |  Branch (1811:7): [True: 0, False: 0]
  ------------------
 1812|      0|                     extra_size) != extra_size) {
 1813|      0|    err = ZIP_EWRTENT;
  ------------------
  |  |  100|      0|#define ZIP_EWRTENT -8      // cannot write data to entry
  ------------------
 1814|      0|    goto cleanup;
 1815|      0|  }
 1816|      0|  zip->entry.dir_offset += extra_size;
 1817|       |
 1818|      0|  if (zip->password) {
  ------------------
  |  Branch (1818:7): [True: 0, False: 0]
  ------------------
 1819|      0|    mz_uint8 enc_header[ZIP_PKWARE_ENCRYPT_HEADER_SIZE];
 1820|      0|    size_t i;
 1821|       |
 1822|      0|    zip_pkware_keys_init_password(&zip->entry.enc_keys, zip->password);
 1823|       |
 1824|      0|    for (i = 0; i < ZIP_PKWARE_ENCRYPT_HEADER_SIZE - 1; i++) {
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
  |  Branch (1824:17): [True: 0, False: 0]
  ------------------
 1825|      0|      mz_uint8 rnd =
 1826|      0|          (mz_uint8)(mz_crc32(MZ_CRC32_INIT, enc_header, i) >> (i & 7));
  ------------------
  |  |  300|      0|#define MZ_CRC32_INIT (0)
  ------------------
 1827|      0|      enc_header[i] = zip_pkware_encrypt_byte(&zip->entry.enc_keys, rnd);
 1828|      0|    }
 1829|      0|    enc_header[ZIP_PKWARE_ENCRYPT_HEADER_SIZE - 1] = zip_pkware_encrypt_byte(
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 1830|      0|        &zip->entry.enc_keys, (mz_uint8)(dos_time >> 8));
 1831|       |
 1832|      0|    zip->entry.enc_header_ofs = zip->entry.dir_offset;
 1833|       |
 1834|      0|    if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.dir_offset, enc_header,
  ------------------
  |  Branch (1834:9): [True: 0, False: 0]
  ------------------
 1835|      0|                       ZIP_PKWARE_ENCRYPT_HEADER_SIZE) !=
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 1836|      0|        ZIP_PKWARE_ENCRYPT_HEADER_SIZE) {
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 1837|      0|      err = ZIP_EWRTENT;
  ------------------
  |  |  100|      0|#define ZIP_EWRTENT -8      // cannot write data to entry
  ------------------
 1838|      0|      goto cleanup;
 1839|      0|    }
 1840|      0|    zip->entry.dir_offset += ZIP_PKWARE_ENCRYPT_HEADER_SIZE;
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 1841|      0|    zip->entry.comp_size += ZIP_PKWARE_ENCRYPT_HEADER_SIZE;
  ------------------
  |  |  142|      0|#define ZIP_PKWARE_ENCRYPT_HEADER_SIZE 12
  ------------------
 1842|      0|  }
 1843|       |
 1844|      0|  if (level) {
  ------------------
  |  Branch (1844:7): [True: 0, False: 0]
  ------------------
 1845|      0|    zip->entry.state.m_pZip = pzip;
 1846|      0|    zip->entry.state.m_cur_archive_file_ofs = zip->entry.dir_offset;
 1847|      0|    zip->entry.state.m_comp_size = 0;
 1848|       |
 1849|      0|    if (zip->password) {
  ------------------
  |  Branch (1849:9): [True: 0, False: 0]
  ------------------
 1850|      0|      zip->entry.enc_state.inner_state = &(zip->entry.state);
 1851|      0|      zip->entry.enc_state.keys = &(zip->entry.enc_keys);
 1852|       |
 1853|      0|      if (tdefl_init(&(zip->entry.comp), zip_encrypt_put_buf_callback,
  ------------------
  |  Branch (1853:11): [True: 0, False: 0]
  ------------------
 1854|      0|                     &(zip->entry.enc_state),
 1855|      0|                     (int)tdefl_create_comp_flags_from_zip_params(
 1856|      0|                         (int)level, -15, MZ_DEFAULT_STRATEGY)) !=
 1857|      0|          TDEFL_STATUS_OKAY) {
 1858|      0|        err = ZIP_ETDEFLINIT;
  ------------------
  |  |  101|      0|#define ZIP_ETDEFLINIT -9   // cannot initialize tdefl compressor
  ------------------
 1859|      0|        goto cleanup;
 1860|      0|      }
 1861|      0|    } else {
 1862|      0|      if (tdefl_init(&(zip->entry.comp), mz_zip_writer_add_put_buf_callback,
  ------------------
  |  Branch (1862:11): [True: 0, False: 0]
  ------------------
 1863|      0|                     &(zip->entry.state),
 1864|      0|                     (int)tdefl_create_comp_flags_from_zip_params(
 1865|      0|                         (int)level, -15, MZ_DEFAULT_STRATEGY)) !=
 1866|      0|          TDEFL_STATUS_OKAY) {
 1867|      0|        err = ZIP_ETDEFLINIT;
  ------------------
  |  |  101|      0|#define ZIP_ETDEFLINIT -9   // cannot initialize tdefl compressor
  ------------------
 1868|      0|        goto cleanup;
 1869|      0|      }
 1870|      0|    }
 1871|      0|  }
 1872|       |
 1873|      0|  return 0;
 1874|       |
 1875|      0|cleanup:
 1876|       |  CLEANUP(zip->entry.name);
  ------------------
  |  |   72|      0|  do {                                                                         \
  |  |   73|      0|    if (ptr) {                                                                 \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|      free((void *)ptr);                                                       \
  |  |   75|      0|      ptr = NULL;                                                              \
  |  |   76|      0|    }                                                                          \
  |  |   77|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (77:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1877|      0|  return err;
 1878|      0|#endif /* ZIP_ENABLE_DEFLATE */
 1879|      0|}
zip.c:zip_strclone:
  439|  22.1k|static char *zip_strclone(const char *str, size_t n) {
  440|  22.1k|  char c;
  441|  22.1k|  size_t i;
  442|  22.1k|  char *rpl = (char *)calloc((1 + n), sizeof(char));
  443|  22.1k|  char *begin = rpl;
  444|  22.1k|  if (!rpl) {
  ------------------
  |  Branch (444:7): [True: 0, False: 22.1k]
  ------------------
  445|      0|    return NULL;
  446|      0|  }
  447|       |
  448|  4.58M|  for (i = 0; (i < n) && (c = *str++); ++i) {
  ------------------
  |  Branch (448:15): [True: 4.56M, False: 17.4k]
  |  Branch (448:26): [True: 4.56M, False: 4.77k]
  ------------------
  449|  4.56M|    *rpl++ = c;
  450|  4.56M|  }
  451|       |
  452|  22.1k|  return begin;
  453|  22.1k|}

LLVMFuzzerTestOneInput:
   43|  4.52k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   44|  4.52k|  if (size < 1)
  ------------------
  |  Branch (44:7): [True: 0, False: 4.52k]
  ------------------
   45|      0|    return 0;
   46|       |
   47|  4.52k|  global_init();
   48|       |
   49|  4.52k|  Ogre::String name = "fuzz.zip";
   50|  4.52k|  g_zipFactory->addEmbbeddedFile(name, data, size, nullptr);
   51|       |
   52|  4.52k|  Ogre::Archive *arch = g_zipFactory->createInstance(name, true);
   53|  4.52k|  if (arch) {
  ------------------
  |  Branch (53:7): [True: 4.52k, False: 0]
  ------------------
   54|  4.52k|    try {
   55|  4.52k|      arch->load();
   56|       |
   57|       |      // List files
   58|  4.52k|      Ogre::StringVectorPtr files = arch->list();
   59|       |
   60|       |      // Try to open first few files
   61|  4.52k|      int count = 0;
   62|  6.71k|      for (auto &f : *files) {
  ------------------
  |  Branch (62:20): [True: 6.71k, False: 4.40k]
  ------------------
   63|  6.71k|        if (count++ > 10) break;
  ------------------
  |  Branch (63:13): [True: 124, False: 6.59k]
  ------------------
   64|  6.59k|        try {
   65|  6.59k|          Ogre::DataStreamPtr stream = arch->open(f);
   66|  6.59k|          if (stream) {
  ------------------
  |  Branch (66:15): [True: 482, False: 6.11k]
  ------------------
   67|       |            // Read some data
   68|    482|            char buf[1024];
   69|    482|            stream->read(buf, std::min((size_t)1024, (size_t)stream->size()));
   70|    482|          }
   71|  6.59k|        } catch (...) {}
   72|  6.59k|      }
   73|       |
   74|  4.52k|      arch->unload();
   75|  4.52k|    } catch (...) {}
   76|  4.52k|    g_zipFactory->destroyInstance(arch);
   77|  4.52k|  }
   78|       |
   79|  4.52k|  return 0;
   80|  4.52k|}
zip_fuzz.cpp:_ZL11global_initv:
   26|  4.52k|static void global_init() {
   27|  4.52k|  if (g_initialized)
  ------------------
  |  Branch (27:7): [True: 4.52k, False: 1]
  ------------------
   28|  4.52k|    return;
   29|       |
   30|      1|  auto *logMgr = new Ogre::LogManager();
   31|      1|  logMgr->createLog("fuzz_zip.log", true, false, true);
   32|      1|  logMgr->setMinLogLevel(Ogre::LML_CRITICAL);
   33|       |
   34|      1|  new Ogre::ResourceGroupManager();
   35|      1|  new Ogre::ArchiveManager();
   36|       |
   37|      1|  g_zipFactory = new Ogre::EmbeddedZipArchiveFactory();
   38|      1|  Ogre::ArchiveManager::getSingleton().addArchiveFactory(g_zipFactory);
   39|       |
   40|      1|  g_initialized = true;
   41|      1|}

