_ZN6icu_7810CharString6appendEcR10UErrorCode:
  113|  1.11k|CharString &CharString::append(char c, UErrorCode &errorCode) {
  114|  1.11k|    if(ensureCapacity(len+2, 0, errorCode)) {
  ------------------
  |  Branch (114:8): [True: 1.11k, False: 0]
  ------------------
  115|  1.11k|        buffer[len++]=c;
  116|  1.11k|        buffer[len]=0;
  117|  1.11k|    }
  118|  1.11k|    return *this;
  119|  1.11k|}
_ZN6icu_7810CharString6appendEPKciR10UErrorCode:
  121|  5.00k|CharString &CharString::append(const char *s, int32_t sLength, UErrorCode &errorCode) {
  122|  5.00k|    if(U_FAILURE(errorCode)) {
  ------------------
  |  Branch (122:8): [True: 0, False: 5.00k]
  ------------------
  123|      0|        return *this;
  124|      0|    }
  125|  5.00k|    if(sLength<-1 || (s==nullptr && sLength!=0)) {
  ------------------
  |  Branch (125:8): [True: 0, False: 5.00k]
  |  Branch (125:23): [True: 0, False: 5.00k]
  |  Branch (125:37): [True: 0, False: 0]
  ------------------
  126|      0|        errorCode=U_ILLEGAL_ARGUMENT_ERROR;
  127|      0|        return *this;
  128|      0|    }
  129|  5.00k|    if(sLength<0) {
  ------------------
  |  Branch (129:8): [True: 0, False: 5.00k]
  ------------------
  130|      0|        sLength= static_cast<int32_t>(uprv_strlen(s));
  ------------------
  |  |   37|      0|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  131|      0|    }
  132|  5.00k|    if(sLength>0) {
  ------------------
  |  Branch (132:8): [True: 5.00k, False: 0]
  ------------------
  133|  5.00k|        if(s==(buffer.getAlias()+len)) {
  ------------------
  |  Branch (133:12): [True: 0, False: 5.00k]
  ------------------
  134|       |            // The caller wrote into the getAppendBuffer().
  135|      0|            if(sLength>=(buffer.getCapacity()-len)) {
  ------------------
  |  Branch (135:16): [True: 0, False: 0]
  ------------------
  136|       |                // The caller wrote too much.
  137|      0|                errorCode=U_INTERNAL_PROGRAM_ERROR;
  138|      0|            } else {
  139|      0|                buffer[len+=sLength]=0;
  140|      0|            }
  141|  5.00k|        } else if(buffer.getAlias()<=s && s<(buffer.getAlias()+len) &&
  ------------------
  |  Branch (141:19): [True: 1.16k, False: 3.84k]
  |  Branch (141:43): [True: 0, False: 1.16k]
  ------------------
  142|  5.00k|                  sLength>=(buffer.getCapacity()-len)
  ------------------
  |  Branch (142:19): [True: 0, False: 0]
  ------------------
  143|  5.00k|        ) {
  144|       |            // (Part of) this string is appended to itself which requires reallocation,
  145|       |            // so we have to make a copy of the substring and append that.
  146|      0|            return append(CharString(s, sLength, errorCode), errorCode);
  147|  5.00k|        } else if(ensureCapacity(len+sLength+1, 0, errorCode)) {
  ------------------
  |  Branch (147:19): [True: 5.00k, False: 0]
  ------------------
  148|  5.00k|            uprv_memcpy(buffer.getAlias()+len, s, sLength);
  ------------------
  |  |   42|  5.00k|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  5.00k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  5.00k|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  5.00k|    _Pragma("clang diagnostic push") \
  |  |   45|  5.00k|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  5.00k|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  5.00k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  5.00k|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  5.00k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  5.00k|    _Pragma("clang diagnostic pop") \
  |  |   49|  5.00k|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  5.00k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  5.00k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  5.00k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|  5.00k|            buffer[len+=sLength]=0;
  150|  5.00k|        }
  151|  5.00k|    }
  152|  5.00k|    return *this;
  153|  5.00k|}
_ZN6icu_7810CharString14ensureCapacityEiiR10UErrorCode:
  230|  6.11k|                                 UErrorCode &errorCode) {
  231|  6.11k|    if(U_FAILURE(errorCode)) {
  ------------------
  |  Branch (231:8): [True: 0, False: 6.11k]
  ------------------
  232|      0|        return false;
  233|      0|    }
  234|  6.11k|    if(capacity>buffer.getCapacity()) {
  ------------------
  |  Branch (234:8): [True: 8, False: 6.11k]
  ------------------
  235|      8|        if(desiredCapacityHint==0) {
  ------------------
  |  Branch (235:12): [True: 8, False: 0]
  ------------------
  236|      8|            desiredCapacityHint=capacity+buffer.getCapacity();
  237|      8|        }
  238|      8|        if( (desiredCapacityHint<=capacity || buffer.resize(desiredCapacityHint, len+1)==nullptr) &&
  ------------------
  |  Branch (238:14): [True: 0, False: 8]
  |  Branch (238:47): [True: 0, False: 8]
  ------------------
  239|      8|            buffer.resize(capacity, len+1)==nullptr
  ------------------
  |  Branch (239:13): [True: 0, False: 0]
  ------------------
  240|      8|        ) {
  241|      0|            errorCode=U_MEMORY_ALLOCATION_ERROR;
  242|      0|            return false;
  243|      0|        }
  244|      8|    }
  245|  6.11k|    return true;
  246|  6.11k|}

_ZN6icu_7810CharString4dataEv:
   85|  1.66k|    char *data() { return buffer.getAlias(); }
_ZN6icu_7810CharStringD2Ev:
   56|  2.22k|    ~CharString() {}
_ZN6icu_7810CharString6appendENS_11StringPieceER10UErrorCode:
  131|  3.89k|    CharString &append(StringPiece s, UErrorCode &errorCode) {
  132|  3.89k|        return append(s.data(), s.length(), errorCode);
  133|  3.89k|    }
_ZN6icu_7810CharStringC2Ev:
   43|  2.22k|    CharString() : len(0) { buffer[0]=0; }
_ZNK6icu_7810CharString7isEmptyEv:
   79|    556|    UBool isEmpty() const { return len==0; }
_ZNK6icu_7810CharString6lengthEv:
   80|  1.66k|    int32_t length() const { return len; }
_ZNK6icu_7810CharString4dataEv:
   84|  1.11k|    const char *data() const { return buffer.getAlias(); }
_ZN6icu_7810CharString6appendERKS0_R10UErrorCode:
  134|  1.11k|    CharString &append(const CharString &s, UErrorCode &errorCode) {
  135|  1.11k|        return append(s.data(), s.length(), errorCode);
  136|  1.11k|    }

uprv_malloc_78:
   45|  12.5k|uprv_malloc(size_t s) {
   46|       |#if U_DEBUG && defined(UPRV_MALLOC_COUNT)
   47|       |#if 1
   48|       |  putchar('>');
   49|       |  fflush(stdout);
   50|       |#else
   51|       |  fprintf(stderr,"MALLOC\t#%d\t%ul bytes\t%ul total\n", ++n,s,(b+=s)); fflush(stderr);
   52|       |#endif
   53|       |#endif
   54|  12.5k|    if (s > 0) {
  ------------------
  |  Branch (54:9): [True: 12.5k, False: 0]
  ------------------
   55|  12.5k|        if (pAlloc) {
  ------------------
  |  Branch (55:13): [True: 0, False: 12.5k]
  ------------------
   56|      0|            return (*pAlloc)(pContext, s);
   57|  12.5k|        } else {
   58|  12.5k|            return uprv_default_malloc(s);
  ------------------
  |  |  615|  12.5k|# define uprv_default_malloc(x) malloc(x)
  ------------------
   59|  12.5k|        }
   60|  12.5k|    } else {
   61|      0|        return (void *)zeroMem;
   62|      0|    }
   63|  12.5k|}
uprv_free_78:
   90|  12.1k|uprv_free(void *buffer) {
   91|       |#if U_DEBUG && defined(UPRV_MALLOC_COUNT)
   92|       |  putchar('<');
   93|       |  fflush(stdout);
   94|       |#endif
   95|  12.1k|    if (buffer != zeroMem) {
  ------------------
  |  Branch (95:9): [True: 12.1k, False: 0]
  ------------------
   96|  12.1k|        if (pFree) {
  ------------------
  |  Branch (96:13): [True: 0, False: 12.1k]
  ------------------
   97|      0|            (*pFree)(pContext, buffer);
   98|  12.1k|        } else {
   99|  12.1k|            uprv_default_free(buffer);
  ------------------
  |  |  617|  12.1k|# define uprv_default_free(x) free(x)
  ------------------
  100|  12.1k|        }
  101|  12.1k|    }
  102|  12.1k|}
uprv_calloc_78:
  105|    238|uprv_calloc(size_t num, size_t size) {
  106|    238|    void *mem = nullptr;
  107|    238|    size *= num;
  108|    238|    mem = uprv_malloc(size);
  ------------------
  |  | 1524|    238|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|    238|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    238|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    238|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|    238|    if (mem) {
  ------------------
  |  Branch (109:9): [True: 238, False: 0]
  ------------------
  110|    238|        uprv_memset(mem, 0, size);
  ------------------
  |  |  100|    238|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|    238|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  111|    238|    }
  112|    238|    return mem;
  113|    238|}

_ZN6icu_7815MaybeStackArrayIcLi40EEC2Ev:
  344|  2.22k|    MaybeStackArray() : ptr(stackArray), capacity(stackCapacity), needToRelease(false) {}
_ZN6icu_7815MaybeStackArrayIcLi40EED2Ev:
  363|  2.22k|    ~MaybeStackArray() { releaseArray(); }
_ZNK6icu_7815MaybeStackArrayIcLi40EE11getCapacityEv:
  376|  6.12k|    int32_t getCapacity() const { return capacity; }
_ZNK6icu_7815MaybeStackArrayIcLi40EE8getAliasEv:
  381|  18.9k|    T *getAlias() const { return ptr; }
_ZN6icu_7815MaybeStackArrayIcLi40EEixEl:
  402|  9.45k|    T &operator[](ptrdiff_t i) { return ptr[i]; }
_ZN6icu_7815MaybeStackArrayIcLi40EE6resizeEii:
  505|      8|inline T *MaybeStackArray<T, stackCapacity>::resize(int32_t newCapacity, int32_t length) {
  506|      8|    if(newCapacity>0) {
  ------------------
  |  Branch (506:8): [True: 8, False: 0]
  ------------------
  507|       |#if U_DEBUG && defined(UPRV_MALLOC_COUNT)
  508|       |        ::fprintf(::stderr, "MaybeStackArray (resize) alloc %d * %lu\n", newCapacity, sizeof(T));
  509|       |#endif
  510|      8|        T *p=(T *)uprv_malloc(newCapacity*sizeof(T));
  ------------------
  |  | 1524|      8|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      8|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      8|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      8|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  511|      8|        if(p!=nullptr) {
  ------------------
  |  Branch (511:12): [True: 8, False: 0]
  ------------------
  512|      8|            if(length>0) {
  ------------------
  |  Branch (512:16): [True: 8, False: 0]
  ------------------
  513|      8|                if(length>capacity) {
  ------------------
  |  Branch (513:20): [True: 0, False: 8]
  ------------------
  514|      0|                    length=capacity;
  515|      0|                }
  516|      8|                if(length>newCapacity) {
  ------------------
  |  Branch (516:20): [True: 0, False: 8]
  ------------------
  517|      0|                    length=newCapacity;
  518|      0|                }
  519|      8|                uprv_memcpy(p, ptr, (size_t)length*sizeof(T));
  ------------------
  |  |   42|      8|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      8|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      8|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      8|    _Pragma("clang diagnostic push") \
  |  |   45|      8|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      8|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      8|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      8|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      8|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      8|    _Pragma("clang diagnostic pop") \
  |  |   49|      8|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      8|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      8|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      8|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  520|      8|            }
  521|      8|            releaseArray();
  522|      8|            ptr=p;
  523|      8|            capacity=newCapacity;
  524|      8|            needToRelease=true;
  525|      8|        }
  526|      8|        return p;
  527|      8|    } else {
  528|      0|        return nullptr;
  529|      0|    }
  530|      8|}
_ZN6icu_7815MaybeStackArrayIcLi40EE12releaseArrayEv:
  458|  2.23k|    void releaseArray() {
  459|  2.23k|        if(needToRelease) {
  ------------------
  |  Branch (459:12): [True: 8, False: 2.22k]
  ------------------
  460|      8|            uprv_free(ptr);
  ------------------
  |  | 1503|      8|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      8|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      8|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      8|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  461|      8|        }
  462|  2.23k|    }
umutex.cpp:_ZZN6icu_78L9umtx_initEvENK3$_0clEv:
  144|      1|#define STATIC_NEW(type) [] () { \
  145|      1|    alignas(type) static char storage[sizeof(type)]; \
  146|      1|    return new(storage) type();} ()
umutex.cpp:_ZZN6icu_78L9umtx_initEvENK3$_1clEv:
  144|      1|#define STATIC_NEW(type) [] () { \
  145|      1|    alignas(type) static char storage[sizeof(type)]; \
  146|      1|    return new(storage) type();} ()

_ZN6icu_785MutexC2EPNS_6UMutexE:
   58|    696|    Mutex(UMutex *mutex = nullptr) : fMutex(mutex) {
   59|    696|        umtx_lock(fMutex);
  ------------------
  |  | 1250|    696|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|    696|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    696|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    696|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   60|    696|    }
_ZN6icu_785MutexD2Ev:
   61|    696|    ~Mutex() {
   62|    696|        umtx_unlock(fMutex);
  ------------------
  |  | 1251|    696|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|    696|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    696|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    696|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   63|    696|    }

u_setDataDirectory_78:
 1316|      1|u_setDataDirectory(const char *directory) {
 1317|      1|    char *newDataDir;
 1318|      1|    int32_t length;
 1319|       |
 1320|      1|    if(directory==nullptr || *directory==0) {
  ------------------
  |  Branch (1320:8): [True: 0, False: 1]
  |  Branch (1320:30): [True: 1, False: 0]
  ------------------
 1321|       |        /* A small optimization to prevent the malloc and copy when the
 1322|       |        shared library is used, and this is a way to make sure that nullptr
 1323|       |        is never returned.
 1324|       |        */
 1325|      1|        newDataDir = (char *)"";
 1326|      1|    }
 1327|      0|    else {
 1328|      0|        length=(int32_t)uprv_strlen(directory);
  ------------------
  |  |   37|      0|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1329|      0|        newDataDir = (char *)uprv_malloc(length + 2);
  ------------------
  |  | 1524|      0|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1330|       |        /* Exit out if newDataDir could not be created. */
 1331|      0|        if (newDataDir == nullptr) {
  ------------------
  |  Branch (1331:13): [True: 0, False: 0]
  ------------------
 1332|      0|            return;
 1333|      0|        }
 1334|      0|        uprv_strcpy(newDataDir, directory);
  ------------------
  |  |   36|      0|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1335|       |
 1336|       |#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
 1337|       |        {
 1338|       |            char *p;
 1339|       |            while((p = uprv_strchr(newDataDir, U_FILE_ALT_SEP_CHAR)) != nullptr) {
 1340|       |                *p = U_FILE_SEP_CHAR;
 1341|       |            }
 1342|       |        }
 1343|       |#endif
 1344|      0|    }
 1345|       |
 1346|      1|    if (gDataDirectory && *gDataDirectory) {
  ------------------
  |  Branch (1346:9): [True: 0, False: 1]
  |  Branch (1346:27): [True: 0, False: 0]
  ------------------
 1347|      0|        uprv_free(gDataDirectory);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1348|      0|    }
 1349|      1|    gDataDirectory = newDataDir;
 1350|      1|    ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
  ------------------
  |  |  617|      1|#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1351|      1|}
u_getDataDirectory_78:
 1499|    557|u_getDataDirectory() {
 1500|    557|    umtx_initOnce(gDataDirInitOnce, &dataDirectoryInitFn);
 1501|    557|    return gDataDirectory;
 1502|    557|}
putil.cpp:_ZL19dataDirectoryInitFnv:
 1424|      1|static void U_CALLCONV dataDirectoryInitFn() {
 1425|       |    /* If we already have the directory, then return immediately. Will happen if user called
 1426|       |     * u_setDataDirectory().
 1427|       |     */
 1428|      1|    if (gDataDirectory) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 1]
  ------------------
 1429|      0|        return;
 1430|      0|    }
 1431|       |
 1432|      1|    const char *path = nullptr;
 1433|       |#if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
 1434|       |    char datadir_path_buffer[PATH_MAX];
 1435|       |#endif
 1436|       |
 1437|       |    /*
 1438|       |    When ICU_NO_USER_DATA_OVERRIDE is defined, users aren't allowed to
 1439|       |    override ICU's data with the ICU_DATA environment variable. This prevents
 1440|       |    problems where multiple custom copies of ICU's specific version of data
 1441|       |    are installed on a system. Either the application must define the data
 1442|       |    directory with u_setDataDirectory, define ICU_DATA_DIR when compiling
 1443|       |    ICU, set the data with udata_setCommonData or trust that all of the
 1444|       |    required data is contained in ICU's data library that contains
 1445|       |    the entry point defined by U_ICUDATA_ENTRY_POINT.
 1446|       |
 1447|       |    There may also be some platforms where environment variables
 1448|       |    are not allowed.
 1449|       |    */
 1450|      1|#   if !defined(ICU_NO_USER_DATA_OVERRIDE) && !UCONFIG_NO_FILE_IO
 1451|       |    /* First try to get the environment variable */
 1452|      1|#     if U_PLATFORM_HAS_WINUWP_API == 0  // Windows UWP does not support getenv
 1453|      1|        path=getenv("ICU_DATA");
 1454|      1|#     endif
 1455|      1|#   endif
 1456|       |
 1457|       |    /* ICU_DATA_DIR may be set as a compile option.
 1458|       |     * U_ICU_DATA_DEFAULT_DIR is provided and is set by ICU at compile time
 1459|       |     * and is used only when data is built in archive mode eliminating the need
 1460|       |     * for ICU_DATA_DIR to be set. U_ICU_DATA_DEFAULT_DIR is set to the installation
 1461|       |     * directory of the data dat file. Users should use ICU_DATA_DIR if they want to
 1462|       |     * set their own path.
 1463|       |     */
 1464|       |#if defined(ICU_DATA_DIR) || defined(U_ICU_DATA_DEFAULT_DIR)
 1465|       |    if(path==nullptr || *path==0) {
 1466|       |# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
 1467|       |        const char *prefix = getenv(ICU_DATA_DIR_PREFIX_ENV_VAR);
 1468|       |# endif
 1469|       |# ifdef ICU_DATA_DIR
 1470|       |        path=ICU_DATA_DIR;
 1471|       |# else
 1472|       |        path=U_ICU_DATA_DEFAULT_DIR;
 1473|       |# endif
 1474|       |# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
 1475|       |        if (prefix != nullptr) {
 1476|       |            snprintf(datadir_path_buffer, sizeof(datadir_path_buffer), "%s%s", prefix, path);
 1477|       |            path=datadir_path_buffer;
 1478|       |        }
 1479|       |# endif
 1480|       |    }
 1481|       |#endif
 1482|       |
 1483|       |#if defined(ICU_DATA_DIR_WINDOWS)
 1484|       |    char datadir_path_buffer[MAX_PATH];
 1485|       |    if (getIcuDataDirectoryUnderWindowsDirectory(datadir_path_buffer, UPRV_LENGTHOF(datadir_path_buffer))) {
 1486|       |        path = datadir_path_buffer;
 1487|       |    }
 1488|       |#endif
 1489|       |
 1490|      1|    if(path==nullptr) {
  ------------------
  |  Branch (1490:8): [True: 1, False: 0]
  ------------------
 1491|       |        /* It looks really bad, set it to something. */
 1492|      1|        path = "";
 1493|      1|    }
 1494|       |
 1495|      1|    u_setDataDirectory(path);
  ------------------
  |  |  347|      1|#define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1496|      1|}

_ZN6icu_7810FileTracer9traceOpenEPKcS2_S2_:
  140|    556|    static void traceOpen(const char*, const char*, const char*) {}

_ZN6icu_7811StringPieceC2EPKc:
   19|  3.89k|    : ptr_(str), length_((str == nullptr) ? 0 : static_cast<int32_t>(uprv_strlen(str))) { }
  ------------------
  |  |   37|  3.89k|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|  3.89k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (19:26): [True: 0, False: 3.89k]
  ------------------

ucln_common_registerCleanup_78:
   67|      7|{
   68|       |    // Thread safety messiness: From ticket 10295, calls to registerCleanup() may occur
   69|       |    // concurrently. Although such cases should be storing the same value, they raise errors
   70|       |    // from the thread sanity checker. Doing the store within a mutex avoids those.
   71|       |    // BUT that can trigger a recursive entry into std::call_once() in umutex.cpp when this code,
   72|       |    // running from the call_once function, tries to grab the ICU global mutex, which
   73|       |    // re-enters the mutex init path. So, work-around by special casing UCLN_COMMON_MUTEX, not
   74|       |    // using the ICU global mutex for it.
   75|       |    //
   76|       |    // No other point in ICU uses std::call_once().
   77|       |
   78|      7|    U_ASSERT(UCLN_COMMON_START < type && type < UCLN_COMMON_COUNT);
  ------------------
  |  |   35|      7|#   define U_ASSERT(exp) (void)0
  ------------------
   79|      7|    if (type == UCLN_COMMON_MUTEX) {
  ------------------
  |  Branch (79:9): [True: 1, False: 6]
  ------------------
   80|      1|        gCommonCleanupFunctions[type] = func;
   81|      6|    } else if (UCLN_COMMON_START < type && type < UCLN_COMMON_COUNT)  {
  ------------------
  |  Branch (81:16): [True: 6, False: 0]
  |  Branch (81:44): [True: 6, False: 0]
  ------------------
   82|      6|        icu::Mutex m;     // See ticket 10295 for discussion.
   83|      6|        gCommonCleanupFunctions[type] = func;
   84|      6|    }
   85|       |#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
   86|       |    ucln_registerAutomaticCleanup();
   87|       |#endif
   88|      7|}

udata_getHeaderSize_78:
   36|    424|udata_getHeaderSize(const DataHeader *udh) {
   37|    424|    if(udh==nullptr) {
  ------------------
  |  Branch (37:8): [True: 0, False: 424]
  ------------------
   38|      0|        return 0;
   39|    424|    } else if(udh->info.isBigEndian==U_IS_BIG_ENDIAN) {
  ------------------
  |  |  353|    424|#   define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  ------------------
  |  Branch (39:15): [True: 424, False: 0]
  ------------------
   40|       |        /* same endianness */
   41|    424|        return udh->dataHeader.headerSize;
   42|    424|    } else {
   43|       |        /* opposite endianness */
   44|      0|        uint16_t x=udh->dataHeader.headerSize;
   45|      0|        return (uint16_t)((x<<8)|(x>>8));
   46|      0|    }
   47|    424|}
udata_getInfoSize_78:
   50|    157|udata_getInfoSize(const UDataInfo *info) {
   51|    157|    if(info==nullptr) {
  ------------------
  |  Branch (51:8): [True: 0, False: 157]
  ------------------
   52|      0|        return 0;
   53|    157|    } else if(info->isBigEndian==U_IS_BIG_ENDIAN) {
  ------------------
  |  |  353|    157|#   define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  ------------------
  |  Branch (53:15): [True: 157, False: 0]
  ------------------
   54|       |        /* same endianness */
   55|    157|        return info->size;
   56|    157|    } else {
   57|       |        /* opposite endianness */
   58|      0|        uint16_t x=info->size;
   59|      0|        return (uint16_t)((x<<8)|(x>>8));
   60|      0|    }
   61|    157|}
udata_checkCommonData_78:
  326|      1|U_CFUNC void udata_checkCommonData(UDataMemory *udm, UErrorCode *err) {
  327|      1|    if (U_FAILURE(*err)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 1]
  ------------------
  328|      0|        return;
  329|      0|    }
  330|       |
  331|      1|    if(udm==nullptr || udm->pHeader==nullptr) {
  ------------------
  |  Branch (331:8): [True: 0, False: 1]
  |  Branch (331:24): [True: 0, False: 1]
  ------------------
  332|      0|      *err=U_INVALID_FORMAT_ERROR;
  333|      1|    } else if(!(udm->pHeader->dataHeader.magic1==0xda &&
  ------------------
  |  Branch (333:17): [True: 1, False: 0]
  ------------------
  334|      1|        udm->pHeader->dataHeader.magic2==0x27 &&
  ------------------
  |  Branch (334:9): [True: 1, False: 0]
  ------------------
  335|      1|        udm->pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
  ------------------
  |  |  353|      2|#   define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  ------------------
  |  Branch (335:9): [True: 1, False: 0]
  ------------------
  336|      1|        udm->pHeader->info.charsetFamily==U_CHARSET_FAMILY)
  ------------------
  |  |  588|      1|#   define U_CHARSET_FAMILY U_ASCII_FAMILY
  |  |  ------------------
  |  |  |  |  531|      1|#define U_ASCII_FAMILY 0
  |  |  ------------------
  ------------------
  |  Branch (336:9): [True: 1, False: 0]
  ------------------
  337|      1|        ) {
  338|       |        /* header not valid */
  339|      0|        *err=U_INVALID_FORMAT_ERROR;
  340|      0|    }
  341|      1|    else if (udm->pHeader->info.dataFormat[0]==0x43 &&
  ------------------
  |  Branch (341:14): [True: 1, False: 0]
  ------------------
  342|      1|        udm->pHeader->info.dataFormat[1]==0x6d &&
  ------------------
  |  Branch (342:9): [True: 1, False: 0]
  ------------------
  343|      1|        udm->pHeader->info.dataFormat[2]==0x6e &&
  ------------------
  |  Branch (343:9): [True: 1, False: 0]
  ------------------
  344|      1|        udm->pHeader->info.dataFormat[3]==0x44 &&
  ------------------
  |  Branch (344:9): [True: 1, False: 0]
  ------------------
  345|      1|        udm->pHeader->info.formatVersion[0]==1
  ------------------
  |  Branch (345:9): [True: 1, False: 0]
  ------------------
  346|      1|        ) {
  347|       |        /* dataFormat="CmnD" */
  348|      1|        udm->vFuncs = &CmnDFuncs;
  349|      1|        udm->toc=(const char *)udm->pHeader+udata_getHeaderSize(udm->pHeader);
  ------------------
  |  |  887|      1|#define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  350|      1|    }
  351|      0|    else if(udm->pHeader->info.dataFormat[0]==0x54 &&
  ------------------
  |  Branch (351:13): [True: 0, False: 0]
  ------------------
  352|      0|        udm->pHeader->info.dataFormat[1]==0x6f &&
  ------------------
  |  Branch (352:9): [True: 0, False: 0]
  ------------------
  353|      0|        udm->pHeader->info.dataFormat[2]==0x43 &&
  ------------------
  |  Branch (353:9): [True: 0, False: 0]
  ------------------
  354|      0|        udm->pHeader->info.dataFormat[3]==0x50 &&
  ------------------
  |  Branch (354:9): [True: 0, False: 0]
  ------------------
  355|      0|        udm->pHeader->info.formatVersion[0]==1
  ------------------
  |  Branch (355:9): [True: 0, False: 0]
  ------------------
  356|      0|        ) {
  357|       |        /* dataFormat="ToCP" */
  358|      0|        udm->vFuncs = &ToCPFuncs;
  359|      0|        udm->toc=(const char *)udm->pHeader+udata_getHeaderSize(udm->pHeader);
  ------------------
  |  |  887|      0|#define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  360|      0|    }
  361|      0|    else {
  362|       |        /* dataFormat not recognized */
  363|      0|        *err=U_INVALID_FORMAT_ERROR;
  364|      0|    }
  365|       |
  366|      1|    if (U_FAILURE(*err)) {
  ------------------
  |  Branch (366:9): [True: 0, False: 1]
  ------------------
  367|       |        /* If the data is no good and we memory-mapped it ourselves,
  368|       |         *  close the memory mapping so it doesn't leak.  Note that this has
  369|       |         *  no effect on non-memory mapped data, other than clearing fields in udm.
  370|       |         */
  371|      0|        udata_close(udm);
  ------------------
  |  |  885|      0|#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  372|      0|    }
  373|      1|}
ucmndata.cpp:_ZL17offsetTOCLookupFnPK11UDataMemoryPKcPiP10UErrorCode:
  229|    556|                  UErrorCode *pErrorCode) {
  230|    556|    (void)pErrorCode;
  231|    556|    const UDataOffsetTOC  *toc = (UDataOffsetTOC *)pData->toc;
  232|    556|    if(toc!=nullptr) {
  ------------------
  |  Branch (232:8): [True: 556, False: 0]
  ------------------
  233|    556|        const char *base=(const char *)toc;
  234|    556|        int32_t number, count=(int32_t)toc->count;
  235|       |
  236|       |        /* perform a binary search for the data in the common data's table of contents */
  237|       |#if defined (UDATA_DEBUG_DUMP)
  238|       |        /* list the contents of the TOC each time .. not recommended */
  239|       |        for(number=0; number<count; ++number) {
  240|       |            fprintf(stderr, "\tx%d: %s\n", number, &base[toc->entry[number].nameOffset]);
  241|       |        }
  242|       |#endif
  243|    556|        number=offsetTOCPrefixBinarySearch(tocEntryName, base, toc->entry, count);
  244|    556|        if(number>=0) {
  ------------------
  |  Branch (244:12): [True: 423, False: 133]
  ------------------
  245|       |            /* found it */
  246|    423|            const UDataOffsetTOCEntry *entry=toc->entry+number;
  247|       |#ifdef UDATA_DEBUG
  248|       |            fprintf(stderr, "%s: Found.\n", tocEntryName);
  249|       |#endif
  250|    423|            if((number+1) < count) {
  ------------------
  |  Branch (250:16): [True: 423, False: 0]
  ------------------
  251|    423|                *pLength = (int32_t)(entry[1].dataOffset - entry->dataOffset);
  252|    423|            } else {
  253|      0|                *pLength = -1;
  254|      0|            }
  255|    423|            return (const DataHeader *)(base+entry->dataOffset);
  256|    423|        } else {
  257|       |#ifdef UDATA_DEBUG
  258|       |            fprintf(stderr, "%s: Not found.\n", tocEntryName);
  259|       |#endif
  260|    133|            return nullptr;
  261|    133|        }
  262|    556|    } else {
  263|       |#ifdef UDATA_DEBUG
  264|       |        fprintf(stderr, "returning header\n");
  265|       |#endif
  266|       |
  267|      0|        return pData->pHeader;
  268|      0|    }
  269|    556|}
ucmndata.cpp:_ZL27offsetTOCPrefixBinarySearchPKcS0_PK19UDataOffsetTOCEntryi:
  125|    556|                            const UDataOffsetTOCEntry *toc, int32_t count) {
  126|    556|    int32_t start=0;
  127|    556|    int32_t limit=count;
  128|       |    /*
  129|       |     * Remember the shared prefix between s, start and limit,
  130|       |     * and don't compare that shared prefix again.
  131|       |     * The shared prefix should get longer as we narrow the [start, limit[ range.
  132|       |     */
  133|    556|    int32_t startPrefixLength=0;
  134|    556|    int32_t limitPrefixLength=0;
  135|    556|    if(count==0) {
  ------------------
  |  Branch (135:8): [True: 0, False: 556]
  ------------------
  136|      0|        return -1;
  137|      0|    }
  138|       |    /*
  139|       |     * Prime the prefix lengths so that we don't keep prefixLength at 0 until
  140|       |     * both the start and limit indexes have moved.
  141|       |     * At the same time, we find if s is one of the start and (limit-1) names,
  142|       |     * and if not, exclude them from the actual binary search.
  143|       |     */
  144|    556|    if(0==strcmpAfterPrefix(s, names+toc[0].nameOffset, &startPrefixLength)) {
  ------------------
  |  Branch (144:8): [True: 0, False: 556]
  ------------------
  145|      0|        return 0;
  146|      0|    }
  147|    556|    ++start;
  148|    556|    --limit;
  149|    556|    if(0==strcmpAfterPrefix(s, names+toc[limit].nameOffset, &limitPrefixLength)) {
  ------------------
  |  Branch (149:8): [True: 0, False: 556]
  ------------------
  150|      0|        return limit;
  151|      0|    }
  152|  6.39k|    while(start<limit) {
  ------------------
  |  Branch (152:11): [True: 6.26k, False: 133]
  ------------------
  153|  6.26k|        int32_t i=(start+limit)/2;
  154|  6.26k|        int32_t prefixLength=MIN(startPrefixLength, limitPrefixLength);
  ------------------
  |  |   97|  6.26k|#define MIN(a,b) (((a)<(b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (97:19): [True: 1.59k, False: 4.66k]
  |  |  ------------------
  ------------------
  155|  6.26k|        int32_t cmp=strcmpAfterPrefix(s, names+toc[i].nameOffset, &prefixLength);
  156|  6.26k|        if(cmp<0) {
  ------------------
  |  Branch (156:12): [True: 3.21k, False: 3.05k]
  ------------------
  157|  3.21k|            limit=i;
  158|  3.21k|            limitPrefixLength=prefixLength;
  159|  3.21k|        } else if(cmp==0) {
  ------------------
  |  Branch (159:19): [True: 423, False: 2.63k]
  ------------------
  160|    423|            return i;
  161|  2.63k|        } else {
  162|  2.63k|            start=i+1;
  163|  2.63k|            startPrefixLength=prefixLength;
  164|  2.63k|        }
  165|  6.26k|    }
  166|    133|    return -1;
  167|    556|}
ucmndata.cpp:_ZL17strcmpAfterPrefixPKcS0_Pi:
  105|  7.37k|strcmpAfterPrefix(const char *s1, const char *s2, int32_t *pPrefixLength) {
  106|  7.37k|    int32_t pl=*pPrefixLength;
  107|  7.37k|    int32_t cmp=0;
  108|  7.37k|    s1+=pl;
  109|  7.37k|    s2+=pl;
  110|  31.9k|    for(;;) {
  111|  31.9k|        int32_t c1 = static_cast<uint8_t>(*s1++);
  112|  31.9k|        int32_t c2 = static_cast<uint8_t>(*s2++);
  113|  31.9k|        cmp=c1-c2;
  114|  31.9k|        if(cmp!=0 || c1==0) {  /* different or done */
  ------------------
  |  Branch (114:12): [True: 6.95k, False: 24.9k]
  |  Branch (114:22): [True: 423, False: 24.5k]
  ------------------
  115|  7.37k|            break;
  116|  7.37k|        }
  117|  24.5k|        ++pl;  /* increment shared same-prefix length */
  118|  24.5k|    }
  119|  7.37k|    *pPrefixLength=pl;
  120|  7.37k|    return cmp;
  121|  7.37k|}

ucnv_open_78:
   75|  7.49k|{
   76|  7.49k|    UConverter *r;
   77|       |
   78|  7.49k|    if (err == nullptr || U_FAILURE (*err)) {
  ------------------
  |  Branch (78:9): [True: 0, False: 7.49k]
  |  Branch (78:27): [True: 0, False: 7.49k]
  ------------------
   79|      0|        return nullptr;
   80|      0|    }
   81|       |
   82|  7.49k|    r =  ucnv_createConverter(nullptr, name, err);
  ------------------
  |  |  647|  7.49k|#define ucnv_createConverter U_ICU_ENTRY_POINT_RENAME(ucnv_createConverter)
  |  |  ------------------
  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  7.49k|    return r;
   84|  7.49k|}
ucnv_close_78:
  334|  8.29k|{
  335|  8.29k|    UErrorCode errorCode = U_ZERO_ERROR;
  336|       |
  337|  8.29k|    UTRACE_ENTRY_OC(UTRACE_UCNV_CLOSE);
  338|       |
  339|  8.29k|    if (converter == nullptr)
  ------------------
  |  Branch (339:9): [True: 796, False: 7.49k]
  ------------------
  340|    796|    {
  341|    796|        UTRACE_EXIT();
  342|    796|        return;
  343|    796|    }
  344|       |
  345|  7.49k|    UTRACE_DATA3(UTRACE_OPEN_CLOSE, "close converter %s at %p, isCopyLocal=%b",
  346|  7.49k|        ucnv_getName(converter, &errorCode), converter, converter->isCopyLocal);
  347|       |
  348|       |    /* In order to speed up the close, only call the callbacks when they have been changed.
  349|       |    This performance check will only work when the callbacks are set within a shared library
  350|       |    or from user code that statically links this code. */
  351|       |    /* first, notify the callback functions that the converter is closed */
  352|  7.49k|    if (converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) {
  ------------------
  |  |  134|  7.49k|#define UCNV_TO_U_DEFAULT_CALLBACK ((UConverterToUCallback) UCNV_TO_U_CALLBACK_SUBSTITUTE)
  |  |  ------------------
  |  |  |  |   78|  7.49k|#define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SUBSTITUTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (352:9): [True: 0, False: 7.49k]
  ------------------
  353|      0|        UConverterToUnicodeArgs toUArgs = {
  354|      0|            sizeof(UConverterToUnicodeArgs),
  355|      0|                true,
  356|      0|                nullptr,
  357|      0|                nullptr,
  358|      0|                nullptr,
  359|      0|                nullptr,
  360|      0|                nullptr,
  361|      0|                nullptr
  362|      0|        };
  363|       |
  364|      0|        toUArgs.converter = converter;
  365|      0|        errorCode = U_ZERO_ERROR;
  366|      0|        converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, nullptr, 0, UCNV_CLOSE, &errorCode);
  367|      0|    }
  368|  7.49k|    if (converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) {
  ------------------
  |  |  135|  7.49k|#define UCNV_FROM_U_DEFAULT_CALLBACK ((UConverterFromUCallback) UCNV_FROM_U_CALLBACK_SUBSTITUTE)
  |  |  ------------------
  |  |  |  |   74|  7.49k|#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SUBSTITUTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (368:9): [True: 0, False: 7.49k]
  ------------------
  369|      0|        UConverterFromUnicodeArgs fromUArgs = {
  370|      0|            sizeof(UConverterFromUnicodeArgs),
  371|      0|                true,
  372|      0|                nullptr,
  373|      0|                nullptr,
  374|      0|                nullptr,
  375|      0|                nullptr,
  376|      0|                nullptr,
  377|      0|                nullptr
  378|      0|        };
  379|      0|        fromUArgs.converter = converter;
  380|      0|        errorCode = U_ZERO_ERROR;
  381|      0|        converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, nullptr, 0, 0, UCNV_CLOSE, &errorCode);
  382|      0|    }
  383|       |
  384|  7.49k|    if (converter->sharedData->impl->close != nullptr) {
  ------------------
  |  Branch (384:9): [True: 4.16k, False: 3.33k]
  ------------------
  385|  4.16k|        converter->sharedData->impl->close(converter);
  386|  4.16k|    }
  387|       |
  388|  7.49k|    if (converter->subChars != (uint8_t *)converter->subUChars) {
  ------------------
  |  Branch (388:9): [True: 0, False: 7.49k]
  ------------------
  389|      0|        uprv_free(converter->subChars);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  390|      0|    }
  391|       |
  392|  7.49k|    if (converter->sharedData->isReferenceCounted) {
  ------------------
  |  Branch (392:9): [True: 1.62k, False: 5.87k]
  ------------------
  393|  1.62k|        ucnv_unloadSharedDataIfReady(converter->sharedData);
  ------------------
  |  |  726|  1.62k|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|  1.62k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.62k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.62k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  394|  1.62k|    }
  395|       |
  396|  7.49k|    if(!converter->isCopyLocal){
  ------------------
  |  Branch (396:8): [True: 7.49k, False: 1]
  ------------------
  397|  7.49k|        uprv_free(converter);
  ------------------
  |  | 1503|  7.49k|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  398|  7.49k|    }
  399|       |
  400|  7.49k|    UTRACE_EXIT();
  401|  7.49k|}
ucnv_getAvailableName_78:
  407|  7.02k|{
  408|  7.02k|    if (0 <= n && n <= 0xffff) {
  ------------------
  |  Branch (408:9): [True: 7.02k, False: 0]
  |  Branch (408:19): [True: 7.02k, False: 0]
  ------------------
  409|  7.02k|        UErrorCode err = U_ZERO_ERROR;
  410|  7.02k|        const char *name = ucnv_bld_getAvailableConverter((uint16_t)n, &err);
  ------------------
  |  |  631|  7.02k|#define ucnv_bld_getAvailableConverter U_ICU_ENTRY_POINT_RENAME(ucnv_bld_getAvailableConverter)
  |  |  ------------------
  |  |  |  |  123|  7.02k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.02k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.02k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  411|  7.02k|        if (U_SUCCESS(err)) {
  ------------------
  |  Branch (411:13): [True: 7.02k, False: 0]
  ------------------
  412|  7.02k|            return name;
  413|  7.02k|        }
  414|  7.02k|    }
  415|      0|    return nullptr;
  416|  7.02k|}
ucnv_countAvailable_78:
  420|  7.02k|{
  421|  7.02k|    UErrorCode err = U_ZERO_ERROR;
  422|  7.02k|    return ucnv_bld_countAvailableConverters(&err);
  ------------------
  |  |  630|  7.02k|#define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld_countAvailableConverters)
  |  |  ------------------
  |  |  |  |  123|  7.02k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.02k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.02k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  423|  7.02k|}
ucnv_resetFromUnicode_78:
  646|  6.97k|{
  647|  6.97k|    _reset(converter, UCNV_RESET_FROM_UNICODE, true);
  648|  6.97k|}
ucnv_fromUnicode_78:
 1180|  34.3M|                 UErrorCode *err) {
 1181|  34.3M|    UConverterFromUnicodeArgs args;
 1182|  34.3M|    const char16_t *s;
 1183|  34.3M|    char *t;
 1184|       |
 1185|       |    /* check parameters */
 1186|  34.3M|    if(err==nullptr || U_FAILURE(*err)) {
  ------------------
  |  Branch (1186:8): [True: 0, False: 34.3M]
  |  Branch (1186:24): [True: 0, False: 34.3M]
  ------------------
 1187|      0|        return;
 1188|      0|    }
 1189|       |
 1190|  34.3M|    if(cnv==nullptr || target==nullptr || source==nullptr) {
  ------------------
  |  Branch (1190:8): [True: 0, False: 34.3M]
  |  Branch (1190:24): [True: 0, False: 34.3M]
  |  Branch (1190:43): [True: 0, False: 34.3M]
  ------------------
 1191|      0|        *err=U_ILLEGAL_ARGUMENT_ERROR;
 1192|      0|        return;
 1193|      0|    }
 1194|       |
 1195|  34.3M|    s=*source;
 1196|  34.3M|    t=*target;
 1197|       |
 1198|  34.3M|    if ((const void *)U_MAX_PTR(sourceLimit) == (const void *)sourceLimit) {
  ------------------
  |  |  523|  34.3M|    ((void *)(((uintptr_t)(base)+0x7fffffffu) > (uintptr_t)(base) \
  |  |  ------------------
  |  |  |  Branch (523:15): [True: 34.3M, False: 0]
  |  |  ------------------
  |  |  524|  34.3M|        ? ((uintptr_t)(base)+0x7fffffffu) \
  |  |  525|  34.3M|        : (uintptr_t)-1))
  ------------------
  |  Branch (1198:9): [True: 0, False: 34.3M]
  ------------------
 1199|       |        /*
 1200|       |        Prevent code from going into an infinite loop in case we do hit this
 1201|       |        limit. The limit pointer is expected to be on a char16_t * boundary.
 1202|       |        This also prevents the next argument check from failing.
 1203|       |        */
 1204|      0|        sourceLimit = (const char16_t *)(((const char *)sourceLimit) - 1);
 1205|      0|    }
 1206|       |
 1207|       |    /*
 1208|       |     * All these conditions should never happen.
 1209|       |     *
 1210|       |     * 1) Make sure that the limits are >= to the address source or target
 1211|       |     *
 1212|       |     * 2) Make sure that the buffer sizes do not exceed the number range for
 1213|       |     * int32_t because some functions use the size (in units or bytes)
 1214|       |     * rather than comparing pointers, and because offsets are int32_t values.
 1215|       |     *
 1216|       |     * size_t is guaranteed to be unsigned and large enough for the job.
 1217|       |     *
 1218|       |     * Return with an error instead of adjusting the limits because we would
 1219|       |     * not be able to maintain the semantics that either the source must be
 1220|       |     * consumed or the target filled (unless an error occurs).
 1221|       |     * An adjustment would be targetLimit=t+0x7fffffff; for example.
 1222|       |     *
 1223|       |     * 3) Make sure that the user didn't incorrectly cast a char16_t * pointer
 1224|       |     * to a char * pointer and provide an incomplete char16_t code unit.
 1225|       |     */
 1226|  34.3M|    if (sourceLimit<s || targetLimit<t ||
  ------------------
  |  Branch (1226:9): [True: 0, False: 34.3M]
  |  Branch (1226:26): [True: 0, False: 34.3M]
  ------------------
 1227|  34.3M|        ((size_t)(sourceLimit-s)>(size_t)0x3fffffff && sourceLimit>s) ||
  ------------------
  |  Branch (1227:10): [True: 0, False: 34.3M]
  |  Branch (1227:56): [True: 0, False: 0]
  ------------------
 1228|  34.3M|        ((size_t)(targetLimit-t)>(size_t)0x7fffffff && targetLimit>t) ||
  ------------------
  |  Branch (1228:10): [True: 0, False: 34.3M]
  |  Branch (1228:56): [True: 0, False: 0]
  ------------------
 1229|  34.3M|        (((const char *)sourceLimit-(const char *)s) & 1) != 0)
  ------------------
  |  Branch (1229:9): [True: 0, False: 34.3M]
  ------------------
 1230|      0|    {
 1231|      0|        *err=U_ILLEGAL_ARGUMENT_ERROR;
 1232|      0|        return;
 1233|      0|    }
 1234|       |    
 1235|       |    /* output the target overflow buffer */
 1236|  34.3M|    if( cnv->charErrorBufferLength>0 &&
  ------------------
  |  Branch (1236:9): [True: 19.2k, False: 34.3M]
  ------------------
 1237|  34.3M|        ucnv_outputOverflowFromUnicode(cnv, target, targetLimit, &offsets, err)
  ------------------
  |  Branch (1237:9): [True: 0, False: 19.2k]
  ------------------
 1238|  34.3M|    ) {
 1239|       |        /* U_BUFFER_OVERFLOW_ERROR */
 1240|      0|        return;
 1241|      0|    }
 1242|       |    /* *target may have moved, therefore stop using t */
 1243|       |
 1244|  34.3M|    if(!flush && s==sourceLimit && cnv->preFromULength>=0) {
  ------------------
  |  Branch (1244:8): [True: 34.3M, False: 34.5k]
  |  Branch (1244:18): [True: 567, False: 34.3M]
  |  Branch (1244:36): [True: 567, False: 0]
  ------------------
 1245|       |        /* the overflow buffer is emptied and there is no new input: we are done */
 1246|    567|        return;
 1247|    567|    }
 1248|       |
 1249|       |    /*
 1250|       |     * Do not simply return with a buffer overflow error if
 1251|       |     * !flush && t==targetLimit
 1252|       |     * because it is possible that the source will not generate any output.
 1253|       |     * For example, the skip callback may be called;
 1254|       |     * it does not output anything.
 1255|       |     */
 1256|       |
 1257|       |    /* prepare the converter arguments */
 1258|  34.3M|    args.converter=cnv;
 1259|  34.3M|    args.flush=flush;
 1260|  34.3M|    args.offsets=offsets;
 1261|  34.3M|    args.source=s;
 1262|  34.3M|    args.sourceLimit=sourceLimit;
 1263|  34.3M|    args.target=*target;
 1264|  34.3M|    args.targetLimit=targetLimit;
 1265|  34.3M|    args.size=sizeof(args);
 1266|       |
 1267|  34.3M|    _fromUnicodeWithCallback(&args, err);
 1268|       |
 1269|  34.3M|    *source=args.source;
 1270|  34.3M|    *target=args.target;
 1271|  34.3M|}
ucnv.cpp:_ZL6_resetP10UConverter21UConverterResetChoicea:
  569|  13.9k|                   UBool callCallback) {
  570|  13.9k|    if(converter == nullptr) {
  ------------------
  |  Branch (570:8): [True: 0, False: 13.9k]
  ------------------
  571|      0|        return;
  572|      0|    }
  573|       |
  574|  13.9k|    if(callCallback) {
  ------------------
  |  Branch (574:8): [True: 6.97k, False: 6.97k]
  ------------------
  575|       |        /* first, notify the callback functions that the converter is reset */
  576|  6.97k|        UErrorCode errorCode;
  577|       |
  578|  6.97k|        if(choice<=UCNV_RESET_TO_UNICODE && converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) {
  ------------------
  |  |  134|      0|#define UCNV_TO_U_DEFAULT_CALLBACK ((UConverterToUCallback) UCNV_TO_U_CALLBACK_SUBSTITUTE)
  |  |  ------------------
  |  |  |  |   78|      0|#define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SUBSTITUTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (578:12): [True: 0, False: 6.97k]
  |  Branch (578:45): [True: 0, False: 0]
  ------------------
  579|      0|            UConverterToUnicodeArgs toUArgs = {
  580|      0|                sizeof(UConverterToUnicodeArgs),
  581|      0|                true,
  582|      0|                nullptr,
  583|      0|                nullptr,
  584|      0|                nullptr,
  585|      0|                nullptr,
  586|      0|                nullptr,
  587|      0|                nullptr
  588|      0|            };
  589|      0|            toUArgs.converter = converter;
  590|      0|            errorCode = U_ZERO_ERROR;
  591|      0|            converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, nullptr, 0, UCNV_RESET, &errorCode);
  592|      0|        }
  593|  6.97k|        if(choice!=UCNV_RESET_TO_UNICODE && converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) {
  ------------------
  |  |  135|  6.97k|#define UCNV_FROM_U_DEFAULT_CALLBACK ((UConverterFromUCallback) UCNV_FROM_U_CALLBACK_SUBSTITUTE)
  |  |  ------------------
  |  |  |  |   74|  6.97k|#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SUBSTITUTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  6.97k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  6.97k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  6.97k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (593:12): [True: 6.97k, False: 0]
  |  Branch (593:45): [True: 0, False: 6.97k]
  ------------------
  594|      0|            UConverterFromUnicodeArgs fromUArgs = {
  595|      0|                sizeof(UConverterFromUnicodeArgs),
  596|      0|                true,
  597|      0|                nullptr,
  598|      0|                nullptr,
  599|      0|                nullptr,
  600|      0|                nullptr,
  601|      0|                nullptr,
  602|      0|                nullptr
  603|      0|            };
  604|      0|            fromUArgs.converter = converter;
  605|      0|            errorCode = U_ZERO_ERROR;
  606|      0|            converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, nullptr, 0, 0, UCNV_RESET, &errorCode);
  607|      0|        }
  608|  6.97k|    }
  609|       |
  610|       |    /* now reset the converter itself */
  611|  13.9k|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (611:8): [True: 0, False: 13.9k]
  ------------------
  612|      0|        converter->toUnicodeStatus = converter->sharedData->toUnicodeStatus;
  613|      0|        converter->mode = 0;
  614|      0|        converter->toULength = 0;
  615|      0|        converter->invalidCharLength = converter->UCharErrorBufferLength = 0;
  616|      0|        converter->preToULength = 0;
  617|      0|    }
  618|  13.9k|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (618:8): [True: 13.9k, False: 0]
  ------------------
  619|  13.9k|        converter->fromUnicodeStatus = 0;
  620|  13.9k|        converter->fromUChar32 = 0;
  621|  13.9k|        converter->invalidUCharLength = converter->charErrorBufferLength = 0;
  622|  13.9k|        converter->preFromUFirstCP = U_SENTINEL;
  ------------------
  |  |  469|  13.9k|#define U_SENTINEL (-1)
  ------------------
  623|  13.9k|        converter->preFromULength = 0;
  624|  13.9k|    }
  625|       |
  626|  13.9k|    if (converter->sharedData->impl->reset != nullptr) {
  ------------------
  |  Branch (626:9): [True: 9.07k, False: 4.86k]
  ------------------
  627|       |        /* call the custom reset function */
  628|  9.07k|        converter->sharedData->impl->reset(converter, choice);
  629|  9.07k|    }
  630|  13.9k|}
ucnv.cpp:_ZL30ucnv_outputOverflowFromUnicodeP10UConverterPPcPKcPPiP10UErrorCode:
 1125|  19.2k|                               UErrorCode *err) {
 1126|  19.2k|    int32_t *offsets;
 1127|  19.2k|    char *overflow, *t;
 1128|  19.2k|    int32_t i, length;
 1129|       |
 1130|  19.2k|    t=*target;
 1131|  19.2k|    if(pOffsets!=nullptr) {
  ------------------
  |  Branch (1131:8): [True: 19.2k, False: 0]
  ------------------
 1132|  19.2k|        offsets=*pOffsets;
 1133|  19.2k|    } else {
 1134|      0|        offsets=nullptr;
 1135|      0|    }
 1136|       |
 1137|  19.2k|    overflow = reinterpret_cast<char*>(cnv->charErrorBuffer);
 1138|  19.2k|    length=cnv->charErrorBufferLength;
 1139|  19.2k|    i=0;
 1140|  55.6k|    while(i<length) {
  ------------------
  |  Branch (1140:11): [True: 36.3k, False: 19.2k]
  ------------------
 1141|  36.3k|        if(t==targetLimit) {
  ------------------
  |  Branch (1141:12): [True: 0, False: 36.3k]
  ------------------
 1142|       |            /* the overflow buffer contains too much, keep the rest */
 1143|      0|            int32_t j=0;
 1144|       |
 1145|      0|            do {
 1146|      0|                overflow[j++]=overflow[i++];
 1147|      0|            } while(i<length);
  ------------------
  |  Branch (1147:21): [True: 0, False: 0]
  ------------------
 1148|       |
 1149|      0|            cnv->charErrorBufferLength = static_cast<int8_t>(j);
 1150|      0|            *target=t;
 1151|      0|            if(offsets!=nullptr) {
  ------------------
  |  Branch (1151:16): [True: 0, False: 0]
  ------------------
 1152|      0|                *pOffsets=offsets;
 1153|      0|            }
 1154|      0|            *err=U_BUFFER_OVERFLOW_ERROR;
 1155|      0|            return true;
 1156|      0|        }
 1157|       |
 1158|       |        /* copy the overflow contents to the target */
 1159|  36.3k|        *t++=overflow[i++];
 1160|  36.3k|        if(offsets!=nullptr) {
  ------------------
  |  Branch (1160:12): [True: 0, False: 36.3k]
  ------------------
 1161|      0|            *offsets++=-1; /* no source index available for old output */
 1162|      0|        }
 1163|  36.3k|    }
 1164|       |
 1165|       |    /* the overflow buffer is completely copied to the target */
 1166|  19.2k|    cnv->charErrorBufferLength=0;
 1167|  19.2k|    *target=t;
 1168|  19.2k|    if(offsets!=nullptr) {
  ------------------
  |  Branch (1168:8): [True: 0, False: 19.2k]
  ------------------
 1169|      0|        *pOffsets=offsets;
 1170|      0|    }
 1171|  19.2k|    return false;
 1172|  19.2k|}
ucnv.cpp:_ZL24_fromUnicodeWithCallbackP25UConverterFromUnicodeArgsP10UErrorCode:
  831|  34.3M|_fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
  832|  34.3M|    UConverterFromUnicode fromUnicode;
  833|  34.3M|    UConverter *cnv;
  834|  34.3M|    const char16_t *s;
  835|  34.3M|    char *t;
  836|  34.3M|    int32_t *offsets;
  837|  34.3M|    int32_t sourceIndex;
  838|  34.3M|    int32_t errorInputLength;
  839|  34.3M|    UBool converterSawEndOfInput, calledCallback;
  840|       |
  841|       |    /* variables for m:n conversion */
  842|  34.3M|    char16_t replay[UCNV_EXT_MAX_UCHARS];
  843|  34.3M|    const char16_t *realSource, *realSourceLimit;
  844|  34.3M|    int32_t realSourceIndex;
  845|  34.3M|    UBool realFlush;
  846|       |
  847|  34.3M|    cnv=pArgs->converter;
  848|  34.3M|    s=pArgs->source;
  849|  34.3M|    t=pArgs->target;
  850|  34.3M|    offsets=pArgs->offsets;
  851|       |
  852|       |    /* get the converter implementation function */
  853|  34.3M|    sourceIndex=0;
  854|  34.3M|    if(offsets==nullptr) {
  ------------------
  |  Branch (854:8): [True: 34.3M, False: 0]
  ------------------
  855|  34.3M|        fromUnicode=cnv->sharedData->impl->fromUnicode;
  856|  34.3M|    } else {
  857|      0|        fromUnicode=cnv->sharedData->impl->fromUnicodeWithOffsets;
  858|      0|        if(fromUnicode==nullptr) {
  ------------------
  |  Branch (858:12): [True: 0, False: 0]
  ------------------
  859|       |            /* there is no WithOffsets implementation */
  860|      0|            fromUnicode=cnv->sharedData->impl->fromUnicode;
  861|       |            /* we will write -1 for each offset */
  862|      0|            sourceIndex=-1;
  863|      0|        }
  864|      0|    }
  865|       |
  866|  34.3M|    if(cnv->preFromULength>=0) {
  ------------------
  |  Branch (866:8): [True: 34.3M, False: 0]
  ------------------
  867|       |        /* normal mode */
  868|  34.3M|        realSource=nullptr;
  869|       |
  870|       |        /* avoid compiler warnings - not otherwise necessary, and the values do not matter */
  871|  34.3M|        realSourceLimit=nullptr;
  872|  34.3M|        realFlush=false;
  873|  34.3M|        realSourceIndex=0;
  874|  34.3M|    } else {
  875|       |        /*
  876|       |         * Previous m:n conversion stored source units from a partial match
  877|       |         * and failed to consume all of them.
  878|       |         * We need to "replay" them from a temporary buffer and convert them first.
  879|       |         */
  880|      0|        realSource=pArgs->source;
  881|      0|        realSourceLimit=pArgs->sourceLimit;
  882|      0|        realFlush=pArgs->flush;
  883|      0|        realSourceIndex=sourceIndex;
  884|       |
  885|      0|        uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR);
  ------------------
  |  |   42|      0|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      0|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      0|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      0|    _Pragma("clang diagnostic push") \
  |  |   45|      0|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      0|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      0|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      0|    _Pragma("clang diagnostic pop") \
  |  |   49|      0|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      0|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      0|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  886|      0|        pArgs->source=replay;
  887|      0|        pArgs->sourceLimit=replay-cnv->preFromULength;
  888|      0|        pArgs->flush=false;
  889|      0|        sourceIndex=-1;
  890|       |
  891|      0|        cnv->preFromULength=0;
  892|      0|    }
  893|       |
  894|       |    /*
  895|       |     * loop for conversion and error handling
  896|       |     *
  897|       |     * loop {
  898|       |     *   convert
  899|       |     *   loop {
  900|       |     *     update offsets
  901|       |     *     handle end of input
  902|       |     *     handle errors/call callback
  903|       |     *   }
  904|       |     * }
  905|       |     */
  906|   108M|    for(;;) {
  907|   108M|        if(U_SUCCESS(*err)) {
  ------------------
  |  Branch (907:12): [True: 108M, False: 0]
  ------------------
  908|       |            /* convert */
  909|   108M|            fromUnicode(pArgs, err);
  910|       |
  911|       |            /*
  912|       |             * set a flag for whether the converter
  913|       |             * successfully processed the end of the input
  914|       |             *
  915|       |             * need not check cnv->preFromULength==0 because a replay (<0) will cause
  916|       |             * s<sourceLimit before converterSawEndOfInput is checked
  917|       |             */
  918|   108M|            converterSawEndOfInput=
  919|   108M|                static_cast<UBool>(U_SUCCESS(*err) &&
  ------------------
  |  Branch (919:36): [True: 34.3M, False: 74.4M]
  ------------------
  920|   108M|                        pArgs->flush && pArgs->source==pArgs->sourceLimit &&
  ------------------
  |  Branch (920:25): [True: 7.31k, False: 34.3M]
  |  Branch (920:41): [True: 7.31k, False: 0]
  ------------------
  921|   108M|                        cnv->fromUChar32==0);
  ------------------
  |  Branch (921:25): [True: 6.97k, False: 340]
  ------------------
  922|   108M|        } else {
  923|       |            /* handle error from ucnv_convertEx() */
  924|      0|            converterSawEndOfInput=false;
  925|      0|        }
  926|       |
  927|       |        /* no callback called yet for this iteration */
  928|   108M|        calledCallback=false;
  929|       |
  930|       |        /* no sourceIndex adjustment for conversion, only for callback output */
  931|   108M|        errorInputLength=0;
  932|       |
  933|       |        /*
  934|       |         * loop for offsets and error handling
  935|       |         *
  936|       |         * iterates at most 3 times:
  937|       |         * 1. to clean up after the conversion function
  938|       |         * 2. after the callback
  939|       |         * 3. after the callback again if there was truncated input
  940|       |         */
  941|   183M|        for(;;) {
  942|       |            /* update offsets if we write any */
  943|   183M|            if(offsets!=nullptr) {
  ------------------
  |  Branch (943:16): [True: 0, False: 183M]
  ------------------
  944|      0|                int32_t length = static_cast<int32_t>(pArgs->target - t);
  945|      0|                if(length>0) {
  ------------------
  |  Branch (945:20): [True: 0, False: 0]
  ------------------
  946|      0|                    _updateOffsets(offsets, length, sourceIndex, errorInputLength);
  947|       |
  948|       |                    /*
  949|       |                     * if a converter handles offsets and updates the offsets
  950|       |                     * pointer at the end, then pArgs->offset should not change
  951|       |                     * here;
  952|       |                     * however, some converters do not handle offsets at all
  953|       |                     * (sourceIndex<0) or may not update the offsets pointer
  954|       |                     */
  955|      0|                    pArgs->offsets=offsets+=length;
  956|      0|                }
  957|       |
  958|      0|                if(sourceIndex>=0) {
  ------------------
  |  Branch (958:20): [True: 0, False: 0]
  ------------------
  959|      0|                    sourceIndex += static_cast<int32_t>(pArgs->source - s);
  960|      0|                }
  961|      0|            }
  962|       |
  963|   183M|            if(cnv->preFromULength<0) {
  ------------------
  |  Branch (963:16): [True: 0, False: 183M]
  ------------------
  964|       |                /*
  965|       |                 * switch the source to new replay units (cannot occur while replaying)
  966|       |                 * after offset handling and before end-of-input and callback handling
  967|       |                 */
  968|      0|                if(realSource==nullptr) {
  ------------------
  |  Branch (968:20): [True: 0, False: 0]
  ------------------
  969|      0|                    realSource=pArgs->source;
  970|      0|                    realSourceLimit=pArgs->sourceLimit;
  971|      0|                    realFlush=pArgs->flush;
  972|      0|                    realSourceIndex=sourceIndex;
  973|       |
  974|      0|                    uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR);
  ------------------
  |  |   42|      0|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      0|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      0|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      0|    _Pragma("clang diagnostic push") \
  |  |   45|      0|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      0|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      0|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      0|    _Pragma("clang diagnostic pop") \
  |  |   49|      0|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      0|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      0|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  975|      0|                    pArgs->source=replay;
  976|      0|                    pArgs->sourceLimit=replay-cnv->preFromULength;
  977|      0|                    pArgs->flush=false;
  978|      0|                    if((sourceIndex+=cnv->preFromULength)<0) {
  ------------------
  |  Branch (978:24): [True: 0, False: 0]
  ------------------
  979|      0|                        sourceIndex=-1;
  980|      0|                    }
  981|       |
  982|      0|                    cnv->preFromULength=0;
  983|      0|                } else {
  984|       |                    /* see implementation note before _fromUnicodeWithCallback() */
  985|      0|                    U_ASSERT(realSource==nullptr);
  ------------------
  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  ------------------
  986|      0|                    *err=U_INTERNAL_PROGRAM_ERROR;
  987|      0|                }
  988|      0|            }
  989|       |
  990|       |            /* update pointers */
  991|   183M|            s=pArgs->source;
  992|   183M|            t=pArgs->target;
  993|       |
  994|   183M|            if(U_SUCCESS(*err)) {
  ------------------
  |  Branch (994:16): [True: 108M, False: 74.4M]
  ------------------
  995|   108M|                if(s<pArgs->sourceLimit) {
  ------------------
  |  Branch (995:20): [True: 74.4M, False: 34.3M]
  ------------------
  996|       |                    /*
  997|       |                     * continue with the conversion loop while there is still input left
  998|       |                     * (continue converting by breaking out of only the inner loop)
  999|       |                     */
 1000|  74.4M|                    break;
 1001|  74.4M|                } else if(realSource!=nullptr) {
  ------------------
  |  Branch (1001:27): [True: 0, False: 34.3M]
  ------------------
 1002|       |                    /* switch back from replaying to the real source and continue */
 1003|      0|                    pArgs->source=realSource;
 1004|      0|                    pArgs->sourceLimit=realSourceLimit;
 1005|      0|                    pArgs->flush=realFlush;
 1006|      0|                    sourceIndex=realSourceIndex;
 1007|       |
 1008|      0|                    realSource=nullptr;
 1009|      0|                    break;
 1010|  34.3M|                } else if(pArgs->flush && cnv->fromUChar32!=0) {
  ------------------
  |  Branch (1010:27): [True: 9.07k, False: 34.3M]
  |  Branch (1010:43): [True: 340, False: 8.73k]
  ------------------
 1011|       |                    /*
 1012|       |                     * the entire input stream is consumed
 1013|       |                     * and there is a partial, truncated input sequence left
 1014|       |                     */
 1015|       |
 1016|       |                    /* inject an error and continue with callback handling */
 1017|    340|                    *err=U_TRUNCATED_CHAR_FOUND;
 1018|    340|                    calledCallback=false; /* new error condition */
 1019|  34.3M|                } else {
 1020|       |                    /* input consumed */
 1021|  34.3M|                    if(pArgs->flush) {
  ------------------
  |  Branch (1021:24): [True: 8.73k, False: 34.3M]
  ------------------
 1022|       |                        /*
 1023|       |                         * return to the conversion loop once more if the flush
 1024|       |                         * flag is set and the conversion function has not
 1025|       |                         * successfully processed the end of the input yet
 1026|       |                         *
 1027|       |                         * (continue converting by breaking out of only the inner loop)
 1028|       |                         */
 1029|  8.73k|                        if(!converterSawEndOfInput) {
  ------------------
  |  Branch (1029:28): [True: 1.76k, False: 6.97k]
  ------------------
 1030|  1.76k|                            break;
 1031|  1.76k|                        }
 1032|       |
 1033|       |                        /* reset the converter without calling the callback function */
 1034|  6.97k|                        _reset(cnv, UCNV_RESET_FROM_UNICODE, false);
 1035|  6.97k|                    }
 1036|       |
 1037|       |                    /* done successfully */
 1038|  34.3M|                    return;
 1039|  34.3M|                }
 1040|   108M|            }
 1041|       |
 1042|       |            /* U_FAILURE(*err) */
 1043|  74.4M|            {
 1044|  74.4M|                UErrorCode e;
 1045|       |
 1046|  74.4M|                if( calledCallback ||
  ------------------
  |  Branch (1046:21): [True: 1.10k, False: 74.4M]
  ------------------
 1047|  74.4M|                    (e=*err)==U_BUFFER_OVERFLOW_ERROR ||
  ------------------
  |  Branch (1047:21): [True: 27.0k, False: 74.4M]
  ------------------
 1048|  74.4M|                    (e!=U_INVALID_CHAR_FOUND &&
  ------------------
  |  Branch (1048:22): [True: 36.0M, False: 38.3M]
  ------------------
 1049|  74.4M|                     e!=U_ILLEGAL_CHAR_FOUND &&
  ------------------
  |  Branch (1049:22): [True: 352, False: 36.0M]
  ------------------
 1050|  74.4M|                     e!=U_TRUNCATED_CHAR_FOUND)
  ------------------
  |  Branch (1050:22): [True: 0, False: 352]
  ------------------
 1051|  74.4M|                ) {
 1052|       |                    /*
 1053|       |                     * the callback did not or cannot resolve the error:
 1054|       |                     * set output pointers and return
 1055|       |                     *
 1056|       |                     * the check for buffer overflow is redundant but it is
 1057|       |                     * a high-runner case and hopefully documents the intent
 1058|       |                     * well
 1059|       |                     *
 1060|       |                     * if we were replaying, then the replay buffer must be
 1061|       |                     * copied back into the UConverter
 1062|       |                     * and the real arguments must be restored
 1063|       |                     */
 1064|  28.1k|                    if(realSource!=nullptr) {
  ------------------
  |  Branch (1064:24): [True: 0, False: 28.1k]
  ------------------
 1065|      0|                        int32_t length;
 1066|       |
 1067|      0|                        U_ASSERT(cnv->preFromULength==0);
  ------------------
  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  ------------------
 1068|       |
 1069|      0|                        length = static_cast<int32_t>(pArgs->sourceLimit - pArgs->source);
 1070|      0|                        if(length>0) {
  ------------------
  |  Branch (1070:28): [True: 0, False: 0]
  ------------------
 1071|      0|                            u_memcpy(cnv->preFromU, pArgs->source, length);
  ------------------
  |  |  334|      0|#define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1072|      0|                            cnv->preFromULength = static_cast<int8_t>(-length);
 1073|      0|                        }
 1074|       |
 1075|      0|                        pArgs->source=realSource;
 1076|      0|                        pArgs->sourceLimit=realSourceLimit;
 1077|      0|                        pArgs->flush=realFlush;
 1078|      0|                    }
 1079|       |
 1080|  28.1k|                    return;
 1081|  28.1k|                }
 1082|  74.4M|            }
 1083|       |
 1084|       |            /* callback handling */
 1085|  74.4M|            {
 1086|  74.4M|                UChar32 codePoint;
 1087|       |
 1088|       |                /* get and write the code point */
 1089|  74.4M|                codePoint=cnv->fromUChar32;
 1090|  74.4M|                errorInputLength=0;
 1091|  74.4M|                U16_APPEND_UNSAFE(cnv->invalidUCharBuffer, errorInputLength, codePoint);
  ------------------
  |  |  367|  74.4M|#define U16_APPEND_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  74.4M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  368|  74.4M|    if((uint32_t)(c)<=0xffff) { \
  |  |  ------------------
  |  |  |  Branch (368:8): [True: 74.4M, False: 7.18k]
  |  |  ------------------
  |  |  369|  74.4M|        (s)[(i)++]=(uint16_t)(c); \
  |  |  370|  74.4M|    } else { \
  |  |  371|  7.18k|        (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \
  |  |  372|  7.18k|        (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \
  |  |  373|  7.18k|    } \
  |  |  374|  74.4M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  74.4M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1092|  74.4M|                cnv->invalidUCharLength = static_cast<int8_t>(errorInputLength);
 1093|       |
 1094|       |                /* set the converter state to deal with the next character */
 1095|  74.4M|                cnv->fromUChar32=0;
 1096|       |
 1097|       |                /* call the callback function */
 1098|  74.4M|                cnv->fromUCharErrorBehaviour(cnv->fromUContext, pArgs,
 1099|  74.4M|                    cnv->invalidUCharBuffer, errorInputLength, codePoint,
 1100|  74.4M|                    *err==U_INVALID_CHAR_FOUND ? UCNV_UNASSIGNED : UCNV_ILLEGAL,
  ------------------
  |  Branch (1100:21): [True: 38.3M, False: 36.0M]
  ------------------
 1101|  74.4M|                    err);
 1102|  74.4M|            }
 1103|       |
 1104|       |            /*
 1105|       |             * loop back to the offset handling
 1106|       |             *
 1107|       |             * this flag will indicate after offset handling
 1108|       |             * that a callback was called;
 1109|       |             * if the callback did not resolve the error, then we return
 1110|       |             */
 1111|  74.4M|            calledCallback=true;
 1112|  74.4M|        }
 1113|   108M|    }
 1114|  34.3M|}

ucnv2022.cpp:_ZL12_ISO2022OpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
  479|  1.03k|_ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
  480|       |
  481|  1.03k|    char myLocale[7]={' ',' ',' ',' ',' ',' ', '\0'};
  482|       |
  483|  1.03k|    cnv->extraInfo = uprv_malloc (sizeof (UConverterDataISO2022));
  ------------------
  |  | 1524|  1.03k|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|  1.03k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.03k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.03k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|  1.03k|    if(cnv->extraInfo != nullptr) {
  ------------------
  |  Branch (484:8): [True: 1.03k, False: 0]
  ------------------
  485|  1.03k|        UConverterNamePieces stackPieces;
  486|  1.03k|        UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
  ------------------
  |  |   62|  1.03k|    { (int32_t)sizeof(UConverterLoadArgs), 0, false, false, 0, 0, NULL, NULL, NULL }
  ------------------
  487|  1.03k|        UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo);
  488|  1.03k|        uint32_t version;
  489|       |
  490|  1.03k|        stackArgs.onlyTestIsLoadable = pArgs->onlyTestIsLoadable;
  491|       |
  492|  1.03k|        uprv_memset(myConverterData, 0, sizeof(UConverterDataISO2022));
  ------------------
  |  |  100|  1.03k|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|  1.03k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  493|  1.03k|        myConverterData->currentType = ASCII1;
  494|  1.03k|        cnv->fromUnicodeStatus =false;
  495|  1.03k|        if(pArgs->locale){
  ------------------
  |  Branch (495:12): [True: 1.03k, False: 0]
  ------------------
  496|  1.03k|            uprv_strncpy(myLocale, pArgs->locale, sizeof(myLocale)-1);
  ------------------
  |  |   43|  1.03k|#define uprv_strncpy(dst, src, size) U_STANDARD_CPP_NAMESPACE strncpy(dst, src, size)
  |  |  ------------------
  |  |  |  |  393|  1.03k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  497|  1.03k|        }
  498|  1.03k|        version = pArgs->options & UCNV_OPTIONS_VERSION_MASK;
  ------------------
  |  |  206|  1.03k|#define UCNV_OPTIONS_VERSION_MASK 0xf
  ------------------
  499|  1.03k|        myConverterData->version = version;
  500|  1.03k|        if(myLocale[0]=='j' && (myLocale[1]=='a'|| myLocale[1]=='p') &&
  ------------------
  |  Branch (500:12): [True: 479, False: 557]
  |  Branch (500:33): [True: 479, False: 0]
  |  Branch (500:52): [True: 0, False: 0]
  ------------------
  501|  1.03k|            (myLocale[2]=='_' || myLocale[2]=='\0'))
  ------------------
  |  Branch (501:14): [True: 0, False: 479]
  |  Branch (501:34): [True: 479, False: 0]
  ------------------
  502|    479|        {
  503|       |            /* open the required converters and cache them */
  504|    479|            if(version>MAX_JA_VERSION) {
  ------------------
  |  Branch (504:16): [True: 0, False: 479]
  ------------------
  505|       |                // ICU 55 fails to open a converter for an unsupported version.
  506|       |                // Previously, it fell back to version 0, but that would yield
  507|       |                // unexpected behavior.
  508|      0|                *errorCode = U_MISSING_RESOURCE_ERROR;
  509|      0|                return;
  510|      0|            }
  511|    479|            if(jpCharsetMasks[version]&CSM(ISO8859_7)) {
  ------------------
  |  |  165|    479|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
  |  Branch (511:16): [True: 401, False: 78]
  ------------------
  512|    401|                myConverterData->myConverterArray[ISO8859_7] =
  513|    401|                    ucnv_loadSharedData("ISO8859_7", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    401|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    401|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    401|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    401|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|    401|            }
  515|    479|            myConverterData->myConverterArray[JISX208] =
  516|    479|                ucnv_loadSharedData("Shift-JIS", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    479|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    479|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    479|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    479|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|    479|            if(jpCharsetMasks[version]&CSM(JISX212)) {
  ------------------
  |  |  165|    479|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
  |  Branch (517:16): [True: 435, False: 44]
  ------------------
  518|    435|                myConverterData->myConverterArray[JISX212] =
  519|    435|                    ucnv_loadSharedData("jisx-212", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    435|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    435|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    435|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    435|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  520|    435|            }
  521|    479|            if(jpCharsetMasks[version]&CSM(GB2312)) {
  ------------------
  |  |  165|    479|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
  |  Branch (521:16): [True: 401, False: 78]
  ------------------
  522|    401|                myConverterData->myConverterArray[GB2312] =
  523|    401|                    ucnv_loadSharedData("ibm-5478", &stackPieces, &stackArgs, errorCode);   /* gb_2312_80-1 */
  ------------------
  |  |  700|    401|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    401|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    401|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    401|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  524|    401|            }
  525|    479|            if(jpCharsetMasks[version]&CSM(KSC5601)) {
  ------------------
  |  |  165|    479|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
  |  Branch (525:16): [True: 401, False: 78]
  ------------------
  526|    401|                myConverterData->myConverterArray[KSC5601] =
  527|    401|                    ucnv_loadSharedData("ksc_5601", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    401|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    401|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    401|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    401|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  528|    401|            }
  529|       |
  530|       |            /* set the function pointers to appropriate functions */
  531|    479|            cnv->sharedData = const_cast<UConverterSharedData*>(&_ISO2022JPData);
  532|    479|            uprv_strcpy(myConverterData->locale,"ja");
  ------------------
  |  |   36|    479|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    479|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  533|       |
  534|    479|            (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=ja,version=");
  ------------------
  |  |   36|    479|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    479|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  535|    479|            size_t len = uprv_strlen(myConverterData->name);
  ------------------
  |  |   37|    479|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|    479|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  536|    479|            myConverterData->name[len] = static_cast<char>(myConverterData->version + static_cast<int>('0'));
  537|    479|            myConverterData->name[len+1]='\0';
  538|    479|        }
  539|    557|#if !UCONFIG_ONLY_HTML_CONVERSION
  540|    557|        else if(myLocale[0]=='k' && (myLocale[1]=='o'|| myLocale[1]=='r') &&
  ------------------
  |  Branch (540:17): [True: 240, False: 317]
  |  Branch (540:38): [True: 240, False: 0]
  |  Branch (540:57): [True: 0, False: 0]
  ------------------
  541|    557|            (myLocale[2]=='_' || myLocale[2]=='\0'))
  ------------------
  |  Branch (541:14): [True: 0, False: 240]
  |  Branch (541:34): [True: 240, False: 0]
  ------------------
  542|    240|        {
  543|    240|            if(version>1) {
  ------------------
  |  Branch (543:16): [True: 0, False: 240]
  ------------------
  544|       |                // ICU 55 fails to open a converter for an unsupported version.
  545|       |                // Previously, it fell back to version 0, but that would yield
  546|       |                // unexpected behavior.
  547|      0|                *errorCode = U_MISSING_RESOURCE_ERROR;
  548|      0|                return;
  549|      0|            }
  550|    240|            const char *cnvName;
  551|    240|            if(version==1) {
  ------------------
  |  Branch (551:16): [True: 61, False: 179]
  ------------------
  552|     61|                cnvName="icu-internal-25546";
  553|    179|            } else {
  554|    179|                cnvName="ibm-949";
  555|    179|                myConverterData->version=version=0;
  556|    179|            }
  557|    240|            if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (557:16): [True: 2, False: 238]
  ------------------
  558|      2|                ucnv_canCreateConverter(cnvName, errorCode);  /* errorCode carries result */
  ------------------
  |  |  632|      2|#define ucnv_canCreateConverter U_ICU_ENTRY_POINT_RENAME(ucnv_canCreateConverter)
  |  |  ------------------
  |  |  |  |  123|      2|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      2|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      2|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  559|      2|                uprv_free(cnv->extraInfo);
  ------------------
  |  | 1503|      2|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      2|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      2|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      2|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  560|      2|                cnv->extraInfo=nullptr;
  561|      2|                return;
  562|    238|            } else {
  563|    238|                myConverterData->currentConverter=ucnv_open(cnvName, errorCode);
  ------------------
  |  |  701|    238|#define ucnv_open U_ICU_ENTRY_POINT_RENAME(ucnv_open)
  |  |  ------------------
  |  |  |  |  123|    238|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    238|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    238|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  564|    238|                if (U_FAILURE(*errorCode)) {
  ------------------
  |  Branch (564:21): [True: 0, False: 238]
  ------------------
  565|      0|                    _ISO2022Close(cnv);
  566|      0|                    return;
  567|      0|                }
  568|       |
  569|    238|                if(version==1) {
  ------------------
  |  Branch (569:20): [True: 60, False: 178]
  ------------------
  570|     60|                    (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=ko,version=1");
  ------------------
  |  |   36|     60|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|     60|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  571|     60|                    uprv_memcpy(cnv->subChars, myConverterData->currentConverter->subChars, 4);
  ------------------
  |  |   42|     60|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     60|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     60|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     60|    _Pragma("clang diagnostic push") \
  |  |   45|     60|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     60|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     60|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     60|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     60|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     60|    _Pragma("clang diagnostic pop") \
  |  |   49|     60|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     60|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     60|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     60|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|     60|                    cnv->subCharLen = myConverterData->currentConverter->subCharLen;
  573|    178|                }else{
  574|    178|                    (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=ko,version=0");
  ------------------
  |  |   36|    178|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    178|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  575|    178|                }
  576|       |
  577|       |                /* initialize the state variables */
  578|    238|                setInitialStateToUnicodeKR(cnv, myConverterData);
  579|    238|                setInitialStateFromUnicodeKR(cnv, myConverterData);
  580|       |
  581|       |                /* set the function pointers to appropriate functions */
  582|    238|                cnv->sharedData = const_cast<UConverterSharedData*>(&_ISO2022KRData);
  583|    238|                uprv_strcpy(myConverterData->locale,"ko");
  ------------------
  |  |   36|    238|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    238|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  584|    238|            }
  585|    240|        }
  586|    317|        else if(((myLocale[0]=='z' && myLocale[1]=='h') || (myLocale[0]=='c'&& myLocale[1]=='n'))&&
  ------------------
  |  Branch (586:19): [True: 317, False: 0]
  |  Branch (586:39): [True: 317, False: 0]
  |  Branch (586:61): [True: 0, False: 0]
  |  Branch (586:80): [True: 0, False: 0]
  ------------------
  587|    317|            (myLocale[2]=='_' || myLocale[2]=='\0'))
  ------------------
  |  Branch (587:14): [True: 0, False: 317]
  |  Branch (587:34): [True: 317, False: 0]
  ------------------
  588|    317|        {
  589|    317|            if(version>2) {
  ------------------
  |  Branch (589:16): [True: 0, False: 317]
  ------------------
  590|       |                // ICU 55 fails to open a converter for an unsupported version.
  591|       |                // Previously, it fell back to version 0, but that would yield
  592|       |                // unexpected behavior.
  593|      0|                *errorCode = U_MISSING_RESOURCE_ERROR;
  594|      0|                return;
  595|      0|            }
  596|       |
  597|       |            /* open the required converters and cache them */
  598|    317|            myConverterData->myConverterArray[GB2312_1] =
  599|    317|                ucnv_loadSharedData("ibm-5478", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    317|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    317|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    317|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    317|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  600|    317|            if(version==1) {
  ------------------
  |  Branch (600:16): [True: 212, False: 105]
  ------------------
  601|    212|                myConverterData->myConverterArray[ISO_IR_165] =
  602|    212|                    ucnv_loadSharedData("iso-ir-165", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    212|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    212|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    212|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    212|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  603|    212|            }
  604|    317|            myConverterData->myConverterArray[CNS_11643] =
  605|    317|                ucnv_loadSharedData("cns-11643-1992", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|    317|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    317|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    317|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    317|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|       |
  607|       |
  608|       |            /* set the function pointers to appropriate functions */
  609|    317|            cnv->sharedData = const_cast<UConverterSharedData*>(&_ISO2022CNData);
  610|    317|            uprv_strcpy(myConverterData->locale,"cn");
  ------------------
  |  |   36|    317|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    317|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  611|       |
  612|    317|            if (version==0){
  ------------------
  |  Branch (612:17): [True: 81, False: 236]
  ------------------
  613|     81|                myConverterData->version = 0;
  614|     81|                (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=0");
  ------------------
  |  |   36|     81|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|     81|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  615|    236|            }else if (version==1){
  ------------------
  |  Branch (615:23): [True: 212, False: 24]
  ------------------
  616|    212|                myConverterData->version = 1;
  617|    212|                (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=1");
  ------------------
  |  |   36|    212|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    212|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  618|    212|            }else {
  619|     24|                myConverterData->version = 2;
  620|     24|                (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=2");
  ------------------
  |  |   36|     24|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|     24|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  621|     24|            }
  622|    317|        }
  623|      0|#endif  // !UCONFIG_ONLY_HTML_CONVERSION
  624|      0|        else{
  625|       |#ifdef U_ENABLE_GENERIC_ISO_2022
  626|       |            myConverterData->isFirstBuffer = true;
  627|       |
  628|       |            /* append the UTF-8 escape sequence */
  629|       |            cnv->charErrorBufferLength = 3;
  630|       |            cnv->charErrorBuffer[0] = 0x1b;
  631|       |            cnv->charErrorBuffer[1] = 0x25;
  632|       |            cnv->charErrorBuffer[2] = 0x42;
  633|       |
  634|       |            cnv->sharedData=(UConverterSharedData*)&_ISO2022Data;
  635|       |            /* initialize the state variables */
  636|       |            uprv_strcpy(myConverterData->name,"ISO_2022");
  637|       |#else
  638|      0|            *errorCode = U_MISSING_RESOURCE_ERROR;
  639|       |            // Was U_UNSUPPORTED_ERROR but changed in ICU 55 to a more standard
  640|       |            // data loading error code.
  641|      0|            return;
  642|      0|#endif
  643|      0|        }
  644|       |
  645|  1.03k|        cnv->maxBytesPerUChar=cnv->sharedData->staticData->maxBytesPerChar;
  646|       |
  647|  1.03k|        if(U_FAILURE(*errorCode) || pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (647:12): [True: 0, False: 1.03k]
  |  Branch (647:37): [True: 8, False: 1.02k]
  ------------------
  648|      8|            _ISO2022Close(cnv);
  649|      8|        }
  650|  1.03k|    } else {
  651|      0|        *errorCode = U_MEMORY_ALLOCATION_ERROR;
  652|      0|    }
  653|  1.03k|}
ucnv2022.cpp:_ZL48UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGICP25UConverterFromUnicodeArgsP10UErrorCode:
 1664|   431k|UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err) {
 1665|   431k|    UConverter *cnv = args->converter;
 1666|   431k|    UConverterDataISO2022 *converterData;
 1667|   431k|    ISO2022State *pFromU2022State;
 1668|   431k|    uint8_t* target = reinterpret_cast<uint8_t*>(args->target);
 1669|   431k|    const uint8_t* targetLimit = reinterpret_cast<const uint8_t*>(args->targetLimit);
 1670|   431k|    const char16_t* source = args->source;
 1671|   431k|    const char16_t* sourceLimit = args->sourceLimit;
 1672|   431k|    int32_t* offsets = args->offsets;
 1673|   431k|    UChar32 sourceChar;
 1674|   431k|    char buffer[8];
 1675|   431k|    int32_t len, outLen;
 1676|   431k|    int8_t choices[10];
 1677|   431k|    int32_t choiceCount;
 1678|   431k|    uint32_t targetValue = 0;
 1679|   431k|    UBool useFallback;
 1680|       |
 1681|   431k|    int32_t i;
 1682|   431k|    int8_t cs, g;
 1683|       |
 1684|       |    /* set up the state */
 1685|   431k|    converterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo);
 1686|   431k|    pFromU2022State   = &converterData->fromU2022State;
 1687|       |
 1688|   431k|    choiceCount = 0;
 1689|       |
 1690|       |    /* check if the last codepoint of previous buffer was a lead surrogate*/
 1691|   431k|    if((sourceChar = cnv->fromUChar32)!=0 && target< targetLimit) {
  ------------------
  |  Branch (1691:8): [True: 0, False: 431k]
  |  Branch (1691:46): [True: 0, False: 0]
  ------------------
 1692|      0|        goto getTrail;
 1693|      0|    }
 1694|       |
 1695|  8.02M|    while(source < sourceLimit) {
  ------------------
  |  Branch (1695:11): [True: 8.02M, False: 473]
  ------------------
 1696|  8.02M|        if(target < targetLimit) {
  ------------------
  |  Branch (1696:12): [True: 8.01M, False: 780]
  ------------------
 1697|       |
 1698|  8.01M|            sourceChar  = *(source++);
 1699|       |            /*check if the char is a First surrogate*/
 1700|  8.01M|            if(U16_IS_SURROGATE(sourceChar)) {
  ------------------
  |  |   75|  8.01M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  8.01M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 8.16k, False: 8.01M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1701|  8.16k|                if(U16_IS_SURROGATE_LEAD(sourceChar)) {
  ------------------
  |  |   84|  8.16k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 4.82k, False: 3.33k]
  |  |  ------------------
  ------------------
 1702|  4.82k|getTrail:
 1703|       |                    /*look ahead to find the trail surrogate*/
 1704|  4.82k|                    if(source < sourceLimit) {
  ------------------
  |  Branch (1704:24): [True: 4.80k, False: 20]
  ------------------
 1705|       |                        /* test the following code unit */
 1706|  4.80k|                        char16_t trail = *source;
 1707|  4.80k|                        if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  4.80k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 492, False: 4.31k]
  |  |  ------------------
  ------------------
 1708|    492|                            source++;
 1709|    492|                            sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
  ------------------
  |  |  113|    492|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    492|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 1710|    492|                            cnv->fromUChar32=0x00;
 1711|       |                            /* convert this supplementary code point */
 1712|       |                            /* exit this condition tree */
 1713|  4.31k|                        } else {
 1714|       |                            /* this is an unmatched lead code unit (1st surrogate) */
 1715|       |                            /* callback(illegal) */
 1716|  4.31k|                            *err=U_ILLEGAL_CHAR_FOUND;
 1717|  4.31k|                            cnv->fromUChar32=sourceChar;
 1718|  4.31k|                            break;
 1719|  4.31k|                        }
 1720|  4.80k|                    } else {
 1721|       |                        /* no more input */
 1722|     20|                        cnv->fromUChar32=sourceChar;
 1723|     20|                        break;
 1724|     20|                    }
 1725|  4.82k|                } else {
 1726|       |                    /* this is an unmatched trail code unit (2nd surrogate) */
 1727|       |                    /* callback(illegal) */
 1728|  3.33k|                    *err=U_ILLEGAL_CHAR_FOUND;
 1729|  3.33k|                    cnv->fromUChar32=sourceChar;
 1730|  3.33k|                    break;
 1731|  3.33k|                }
 1732|  8.16k|            }
 1733|       |
 1734|       |            /* do not convert SO/SI/ESC */
 1735|  8.01M|            if(IS_2022_CONTROL(sourceChar)) {
  ------------------
  |  |  117|  8.01M|#define IS_2022_CONTROL(c) (((c)<0x20) && (((uint32_t)1<<(c))&0x0800c000)!=0)
  |  |  ------------------
  |  |  |  Branch (117:29): [True: 41.6k, False: 7.97M]
  |  |  |  Branch (117:43): [True: 396, False: 41.2k]
  |  |  ------------------
  ------------------
 1736|       |                /* callback(illegal) */
 1737|    396|                *err=U_ILLEGAL_CHAR_FOUND;
 1738|    396|                cnv->fromUChar32=sourceChar;
 1739|    396|                break;
 1740|    396|            }
 1741|       |
 1742|       |            /* do the conversion */
 1743|       |
 1744|  8.01M|            if(choiceCount == 0) {
  ------------------
  |  Branch (1744:16): [True: 7.31M, False: 693k]
  ------------------
 1745|  7.31M|                uint16_t csm;
 1746|       |
 1747|       |                /*
 1748|       |                 * The csm variable keeps track of which charsets are allowed
 1749|       |                 * and not used yet while building the choices[].
 1750|       |                 */
 1751|  7.31M|                csm = jpCharsetMasks[converterData->version];
 1752|  7.31M|                choiceCount = 0;
 1753|       |
 1754|       |                /* JIS7/8: try single-byte half-width Katakana before JISX208 */
 1755|  7.31M|                if(converterData->version == 3 || converterData->version == 4) {
  ------------------
  |  Branch (1755:20): [True: 38.5k, False: 7.28M]
  |  Branch (1755:51): [True: 50.5k, False: 7.22M]
  ------------------
 1756|  89.0k|                    choices[choiceCount++] = static_cast<int8_t>(HWKANA_7BIT);
 1757|  89.0k|                }
 1758|       |                /* Do not try single-byte half-width Katakana for other versions. */
 1759|  7.31M|                csm &= ~CSM(HWKANA_7BIT);
  ------------------
  |  |  165|  7.31M|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
 1760|       |
 1761|       |                /* try the current G0 charset */
 1762|  7.31M|                choices[choiceCount++] = cs = pFromU2022State->cs[0];
 1763|  7.31M|                csm &= ~CSM(cs);
  ------------------
  |  |  165|  7.31M|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
 1764|       |
 1765|       |                /* try the current G2 charset */
 1766|  7.31M|                if((cs = pFromU2022State->cs[2]) != 0) {
  ------------------
  |  Branch (1766:20): [True: 870k, False: 6.44M]
  ------------------
 1767|   870k|                    choices[choiceCount++] = cs;
 1768|   870k|                    csm &= ~CSM(cs);
  ------------------
  |  |  165|   870k|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
 1769|   870k|                }
 1770|       |
 1771|       |                /* try all the other possible charsets */
 1772|  73.1M|                for(i = 0; i < UPRV_LENGTHOF(jpCharsetPref); ++i) {
  ------------------
  |  |   99|  73.1M|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  |  Branch (1772:28): [True: 65.8M, False: 7.31M]
  ------------------
 1773|  65.8M|                    cs = static_cast<int8_t>(jpCharsetPref[i]);
 1774|  65.8M|                    if(CSM(cs) & csm) {
  ------------------
  |  |  165|  65.8M|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
  |  Branch (1774:24): [True: 50.3M, False: 15.5M]
  ------------------
 1775|  50.3M|                        choices[choiceCount++] = cs;
 1776|  50.3M|                        csm &= ~CSM(cs);
  ------------------
  |  |  165|  50.3M|#define CSM(cs) ((uint16_t)1<<(cs))
  ------------------
 1777|  50.3M|                    }
 1778|  65.8M|                }
 1779|  7.31M|            }
 1780|       |
 1781|  8.01M|            cs = g = 0;
 1782|       |            /*
 1783|       |             * len==0: no mapping found yet
 1784|       |             * len<0: found a fallback result: continue looking for a roundtrip but no further fallbacks
 1785|       |             * len>0: found a roundtrip result, done
 1786|       |             */
 1787|  8.01M|            len = 0;
 1788|       |            /*
 1789|       |             * We will turn off useFallback after finding a fallback,
 1790|       |             * but we still get fallbacks from PUA code points as usual.
 1791|       |             * Therefore, we will also need to check that we don't overwrite
 1792|       |             * an early fallback with a later one.
 1793|       |             */
 1794|  8.01M|            useFallback = cnv->useFallback;
 1795|       |
 1796|  62.9M|            for(i = 0; i < choiceCount && len <= 0; ++i) {
  ------------------
  |  Branch (1796:24): [True: 59.2M, False: 3.72M]
  |  Branch (1796:43): [True: 54.9M, False: 4.29M]
  ------------------
 1797|  54.9M|                uint32_t value;
 1798|  54.9M|                int32_t len2;
 1799|  54.9M|                int8_t cs0 = choices[i];
 1800|  54.9M|                switch(cs0) {
 1801|  7.35M|                case ASCII:
  ------------------
  |  Branch (1801:17): [True: 7.35M, False: 47.5M]
  ------------------
 1802|  7.35M|                    if(sourceChar <= 0x7f) {
  ------------------
  |  Branch (1802:24): [True: 46.4k, False: 7.31M]
  ------------------
 1803|  46.4k|                        targetValue = static_cast<uint32_t>(sourceChar);
 1804|  46.4k|                        len = 1;
 1805|  46.4k|                        cs = cs0;
 1806|  46.4k|                        g = 0;
 1807|  46.4k|                    }
 1808|  7.35M|                    break;
 1809|  7.31M|                case ISO8859_1:
  ------------------
  |  Branch (1809:17): [True: 7.31M, False: 47.6M]
  ------------------
 1810|  7.31M|                    if(GR96_START <= sourceChar && sourceChar <= GR96_END) {
  ------------------
  |  Branch (1810:24): [True: 7.31M, False: 5.08k]
  |  Branch (1810:52): [True: 2.92k, False: 7.30M]
  ------------------
 1811|  2.92k|                        targetValue = static_cast<uint32_t>(sourceChar) - 0x80;
 1812|  2.92k|                        len = 1;
 1813|  2.92k|                        cs = cs0;
 1814|  2.92k|                        g = 2;
 1815|  2.92k|                    }
 1816|  7.31M|                    break;
 1817|   135k|                case HWKANA_7BIT:
  ------------------
  |  Branch (1817:17): [True: 135k, False: 54.7M]
  ------------------
 1818|   135k|                    if (static_cast<uint32_t>(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) {
  ------------------
  |  Branch (1818:25): [True: 1.43k, False: 134k]
  ------------------
 1819|  1.43k|                        if(converterData->version==3) {
  ------------------
  |  Branch (1819:28): [True: 1.01k, False: 411]
  ------------------
 1820|       |                            /* JIS7: use G1 (SO) */
 1821|       |                            /* Shift U+FF61..U+FF9F to bytes 21..5F. */
 1822|  1.01k|                            targetValue = static_cast<uint32_t>(sourceChar - (HWKANA_START - 0x21));
 1823|  1.01k|                            len = 1;
 1824|  1.01k|                            pFromU2022State->cs[1] = cs = cs0; /* do not output an escape sequence */
 1825|  1.01k|                            g = 1;
 1826|  1.01k|                        } else if(converterData->version==4) {
  ------------------
  |  Branch (1826:35): [True: 411, False: 0]
  ------------------
 1827|       |                            /* JIS8: use 8-bit bytes with any single-byte charset, see escape sequence output below */
 1828|       |                            /* Shift U+FF61..U+FF9F to bytes A1..DF. */
 1829|    411|                            targetValue = static_cast<uint32_t>(sourceChar - (HWKANA_START - 0xa1));
 1830|    411|                            len = 1;
 1831|       |
 1832|    411|                            cs = pFromU2022State->cs[0];
 1833|    411|                            if(IS_JP_DBCS(cs)) {
  ------------------
  |  |  162|    411|#define IS_JP_DBCS(cs) (JISX208<=(cs) && (cs)<=KSC5601)
  |  |  ------------------
  |  |  |  Branch (162:25): [True: 208, False: 203]
  |  |  |  Branch (162:42): [True: 208, False: 0]
  |  |  ------------------
  ------------------
 1834|       |                                /* switch from a DBCS charset to JISX201 */
 1835|    208|                                cs = static_cast<int8_t>(JISX201);
 1836|    208|                            }
 1837|       |                            /* else stay in the current G0 charset */
 1838|    411|                            g = 0;
 1839|    411|                        }
 1840|       |                        /* else do not use HWKANA_7BIT with other versions */
 1841|  1.43k|                    }
 1842|   135k|                    break;
 1843|  7.31M|                case JISX201:
  ------------------
  |  Branch (1843:17): [True: 7.31M, False: 47.6M]
  ------------------
 1844|       |                    /* G0 SBCS */
 1845|  7.31M|                    value = jisx201FromU(sourceChar);
 1846|  7.31M|                    if(value <= 0x7f) {
  ------------------
  |  Branch (1846:24): [True: 1.13k, False: 7.31M]
  ------------------
 1847|  1.13k|                        targetValue = value;
 1848|  1.13k|                        len = 1;
 1849|  1.13k|                        cs = cs0;
 1850|  1.13k|                        g = 0;
 1851|  1.13k|                        useFallback = false;
 1852|  1.13k|                    }
 1853|  7.31M|                    break;
 1854|  7.35M|                case JISX208:
  ------------------
  |  Branch (1854:17): [True: 7.35M, False: 47.5M]
  ------------------
 1855|       |                    /* G0 DBCS from Shift-JIS table */
 1856|  7.35M|                    len2 = MBCS_FROM_UCHAR32_ISO2022(
 1857|  7.35M|                                converterData->myConverterArray[cs0],
 1858|  7.35M|                                sourceChar, &value,
 1859|  7.35M|                                useFallback, MBCS_OUTPUT_2);
 1860|  7.35M|                    if(len2 == 2 || (len2 == -2 && len == 0)) {  /* only accept DBCS: abs(len)==2 */
  ------------------
  |  Branch (1860:24): [True: 6.89M, False: 457k]
  |  Branch (1860:38): [True: 199, False: 457k]
  |  Branch (1860:52): [True: 199, False: 0]
  ------------------
 1861|  6.89M|                        value = _2022FromSJIS(value);
 1862|  6.89M|                        if(value != 0) {
  ------------------
  |  Branch (1862:28): [True: 307k, False: 6.58M]
  ------------------
 1863|   307k|                            targetValue = value;
 1864|   307k|                            len = len2;
 1865|   307k|                            cs = cs0;
 1866|   307k|                            g = 0;
 1867|   307k|                            useFallback = false;
 1868|   307k|                        }
 1869|  6.89M|                    } else if(len == 0 && useFallback &&
  ------------------
  |  Branch (1869:31): [True: 457k, False: 0]
  |  Branch (1869:43): [True: 0, False: 457k]
  ------------------
 1870|   457k|                              static_cast<uint32_t>(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) {
  ------------------
  |  Branch (1870:31): [True: 0, False: 0]
  ------------------
 1871|      0|                        targetValue = hwkana_fb[sourceChar - HWKANA_START];
 1872|      0|                        len = -2;
 1873|      0|                        cs = cs0;
 1874|      0|                        g = 0;
 1875|      0|                        useFallback = false;
 1876|      0|                    }
 1877|  7.35M|                    break;
 1878|  7.04M|                case ISO8859_7:
  ------------------
  |  Branch (1878:17): [True: 7.04M, False: 47.8M]
  ------------------
 1879|       |                    /* G0 SBCS forced to 7-bit output */
 1880|  7.04M|                    len2 = MBCS_SINGLE_FROM_UCHAR32(
 1881|  7.04M|                                converterData->myConverterArray[cs0],
 1882|  7.04M|                                sourceChar, &value,
 1883|  7.04M|                                useFallback);
 1884|  7.04M|                    if(len2 != 0 && !(len2 < 0 && len != 0) && GR96_START <= value && value <= GR96_END) {
  ------------------
  |  Branch (1884:24): [True: 1.63k, False: 7.04M]
  |  Branch (1884:39): [True: 0, False: 1.63k]
  |  Branch (1884:51): [True: 0, False: 0]
  |  Branch (1884:64): [True: 346, False: 1.29k]
  |  Branch (1884:87): [True: 346, False: 0]
  ------------------
 1885|    346|                        targetValue = value - 0x80;
 1886|    346|                        len = len2;
 1887|    346|                        cs = cs0;
 1888|    346|                        g = 2;
 1889|    346|                        useFallback = false;
 1890|    346|                    }
 1891|  7.04M|                    break;
 1892|  18.4M|                default:
  ------------------
  |  Branch (1892:17): [True: 18.4M, False: 36.5M]
  ------------------
 1893|       |                    /* G0 DBCS */
 1894|  18.4M|                    len2 = MBCS_FROM_UCHAR32_ISO2022(
 1895|  18.4M|                                converterData->myConverterArray[cs0],
 1896|  18.4M|                                sourceChar, &value,
 1897|  18.4M|                                useFallback, MBCS_OUTPUT_2);
 1898|  18.4M|                    if(len2 == 2 || (len2 == -2 && len == 0)) {  /* only accept DBCS: abs(len)==2 */
  ------------------
  |  Branch (1898:24): [True: 7.25M, False: 11.1M]
  |  Branch (1898:38): [True: 0, False: 11.1M]
  |  Branch (1898:52): [True: 0, False: 0]
  ------------------
 1899|  7.25M|                        if(cs0 == KSC5601) {
  ------------------
  |  Branch (1899:28): [True: 3.43M, False: 3.82M]
  ------------------
 1900|       |                            /*
 1901|       |                             * Check for valid bytes for the encoding scheme.
 1902|       |                             * This is necessary because the sub-converter (windows-949)
 1903|       |                             * has a broader encoding scheme than is valid for 2022.
 1904|       |                             */
 1905|  3.43M|                            value = _2022FromGR94DBCS(value);
 1906|  3.43M|                            if(value == 0) {
  ------------------
  |  Branch (1906:32): [True: 25.4k, False: 3.40M]
  ------------------
 1907|  25.4k|                                break;
 1908|  25.4k|                            }
 1909|  3.43M|                        }
 1910|  7.23M|                        targetValue = value;
 1911|  7.23M|                        len = len2;
 1912|  7.23M|                        cs = cs0;
 1913|  7.23M|                        g = 0;
 1914|  7.23M|                        useFallback = false;
 1915|  7.23M|                    }
 1916|  18.3M|                    break;
 1917|  54.9M|                }
 1918|  54.9M|            }
 1919|       |
 1920|  8.01M|            if(len != 0) {
  ------------------
  |  Branch (1920:16): [True: 7.59M, False: 419k]
  ------------------
 1921|  7.59M|                if(len < 0) {
  ------------------
  |  Branch (1921:20): [True: 199, False: 7.59M]
  ------------------
 1922|    199|                    len = -len;  /* fallback */
 1923|    199|                }
 1924|  7.59M|                outLen = 0; /* count output bytes */
 1925|       |
 1926|       |                /* write SI if necessary (only for JIS7) */
 1927|  7.59M|                if(pFromU2022State->g == 1 && g == 0) {
  ------------------
  |  Branch (1927:20): [True: 663, False: 7.59M]
  |  Branch (1927:47): [True: 407, False: 256]
  ------------------
 1928|    407|                    buffer[outLen++] = UCNV_SI;
  ------------------
  |  |   84|    407|#define  UCNV_SI 0x0F
  ------------------
 1929|    407|                    pFromU2022State->g = 0;
 1930|    407|                }
 1931|       |
 1932|       |                /* write the designation sequence if necessary */
 1933|  7.59M|                if(cs != pFromU2022State->cs[g]) {
  ------------------
  |  Branch (1933:20): [True: 6.89M, False: 694k]
  ------------------
 1934|  6.89M|                    int32_t escLen = escSeqCharsLen[cs];
 1935|  6.89M|                    uprv_memcpy(buffer + outLen, escSeqChars[cs], escLen);
  ------------------
  |  |   42|  6.89M|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  6.89M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  6.89M|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  6.89M|    _Pragma("clang diagnostic push") \
  |  |   45|  6.89M|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  6.89M|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  6.89M|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  6.89M|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  6.89M|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  6.89M|    _Pragma("clang diagnostic pop") \
  |  |   49|  6.89M|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  6.89M|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  6.89M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  6.89M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1936|  6.89M|                    outLen += escLen;
 1937|  6.89M|                    pFromU2022State->cs[g] = cs;
 1938|       |
 1939|       |                    /* invalidate the choices[] */
 1940|  6.89M|                    choiceCount = 0;
 1941|  6.89M|                }
 1942|       |
 1943|       |                /* write the shift sequence if necessary */
 1944|  7.59M|                if(g != pFromU2022State->g) {
  ------------------
  |  Branch (1944:20): [True: 4.04k, False: 7.58M]
  ------------------
 1945|  4.04k|                    switch(g) {
 1946|       |                    /* case 0 handled before writing escapes */
 1947|    774|                    case 1:
  ------------------
  |  Branch (1947:21): [True: 774, False: 3.27k]
  ------------------
 1948|    774|                        buffer[outLen++] = UCNV_SO;
  ------------------
  |  |   86|    774|#define  UCNV_SO 0x0E
  ------------------
 1949|    774|                        pFromU2022State->g = 1;
 1950|    774|                        break;
 1951|  3.27k|                    default: /* case 2 */
  ------------------
  |  Branch (1951:21): [True: 3.27k, False: 774]
  ------------------
 1952|  3.27k|                        buffer[outLen++] = 0x1b;
 1953|  3.27k|                        buffer[outLen++] = 0x4e;
 1954|  3.27k|                        break;
 1955|       |                    /* no case 3: no SS3 in ISO-2022-JP-x */
 1956|  4.04k|                    }
 1957|  4.04k|                }
 1958|       |
 1959|       |                /* write the output bytes */
 1960|  7.59M|                if(len == 1) {
  ------------------
  |  Branch (1960:20): [True: 52.2k, False: 7.54M]
  ------------------
 1961|  52.2k|                    buffer[outLen++] = static_cast<char>(targetValue);
 1962|  7.54M|                } else /* len == 2 */ {
 1963|  7.54M|                    buffer[outLen++] = static_cast<char>(targetValue >> 8);
 1964|  7.54M|                    buffer[outLen++] = static_cast<char>(targetValue);
 1965|  7.54M|                }
 1966|  7.59M|            } else {
 1967|       |                /*
 1968|       |                 * if we cannot find the character after checking all codepages
 1969|       |                 * then this is an error
 1970|       |                 */
 1971|   419k|                *err = U_INVALID_CHAR_FOUND;
 1972|   419k|                cnv->fromUChar32=sourceChar;
 1973|   419k|                break;
 1974|   419k|            }
 1975|       |
 1976|  7.59M|            if(sourceChar == CR || sourceChar == LF) {
  ------------------
  |  |   85|  15.1M|#define CR      0x0D
  ------------------
                          if(sourceChar == CR || sourceChar == LF) {
  ------------------
  |  |   86|  7.59M|#define LF      0x0A
  ------------------
  |  Branch (1976:16): [True: 233, False: 7.59M]
  |  Branch (1976:36): [True: 521, False: 7.59M]
  ------------------
 1977|       |                /* reset the G2 state at the end of a line (conversion got us into ASCII or JISX201 already) */
 1978|    754|                pFromU2022State->cs[2] = 0;
 1979|    754|                choiceCount = 0;
 1980|    754|            }
 1981|       |
 1982|       |            /* output outLen>0 bytes in buffer[] */
 1983|  7.59M|            if(outLen == 1) {
  ------------------
  |  Branch (1983:16): [True: 41.4k, False: 7.55M]
  ------------------
 1984|  41.4k|                *target++ = buffer[0];
 1985|  41.4k|                if(offsets) {
  ------------------
  |  Branch (1985:20): [True: 0, False: 41.4k]
  ------------------
 1986|      0|                    *offsets++ = static_cast<int32_t>(source - args->source - 1); /* -1: known to be ASCII */
 1987|      0|                }
 1988|  7.55M|            } else if(outLen == 2 && (target + 2) <= targetLimit) {
  ------------------
  |  Branch (1988:23): [True: 650k, False: 6.90M]
  |  Branch (1988:38): [True: 650k, False: 219]
  ------------------
 1989|   650k|                *target++ = buffer[0];
 1990|   650k|                *target++ = buffer[1];
 1991|   650k|                if(offsets) {
  ------------------
  |  Branch (1991:20): [True: 0, False: 650k]
  ------------------
 1992|      0|                    int32_t sourceIndex = static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar));
  ------------------
  |  |  141|      0|#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
  |  |  ------------------
  |  |  |  Branch (141:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1993|      0|                    *offsets++ = sourceIndex;
 1994|      0|                    *offsets++ = sourceIndex;
 1995|      0|                }
 1996|  6.90M|            } else {
 1997|  6.90M|                fromUWriteUInt8(
 1998|  6.90M|                    cnv,
 1999|  6.90M|                    buffer, outLen,
 2000|  6.90M|                    &target, reinterpret_cast<const char*>(targetLimit),
 2001|  6.90M|                    &offsets, static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar)),
  ------------------
  |  |  141|  6.90M|#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
  |  |  ------------------
  |  |  |  Branch (141:24): [True: 6.90M, False: 0]
  |  |  ------------------
  ------------------
 2002|  6.90M|                    err);
 2003|  6.90M|                if(U_FAILURE(*err)) {
  ------------------
  |  Branch (2003:20): [True: 2.47k, False: 6.89M]
  ------------------
 2004|  2.47k|                    break;
 2005|  2.47k|                }
 2006|  6.90M|            }
 2007|  7.59M|        } /* end if(myTargetIndex<myTargetLength) */
 2008|    780|        else{
 2009|    780|            *err =U_BUFFER_OVERFLOW_ERROR;
 2010|    780|            break;
 2011|    780|        }
 2012|       |
 2013|  8.02M|    }/* end while(mySourceIndex<mySourceLength) */
 2014|       |
 2015|       |    /*
 2016|       |     * the end of the input stream and detection of truncated input
 2017|       |     * are handled by the framework, but for ISO-2022-JP conversion
 2018|       |     * we need to be in ASCII mode at the very end
 2019|       |     *
 2020|       |     * conditions:
 2021|       |     *   successful
 2022|       |     *   in SO mode or not in ASCII mode
 2023|       |     *   end of input and no truncated input
 2024|       |     */
 2025|   431k|    if( U_SUCCESS(*err) &&
  ------------------
  |  Branch (2025:9): [True: 493, False: 430k]
  ------------------
 2026|   431k|        (pFromU2022State->g!=0 || pFromU2022State->cs[0]!=ASCII) &&
  ------------------
  |  Branch (2026:10): [True: 21, False: 472]
  |  Branch (2026:35): [True: 170, False: 302]
  ------------------
 2027|   431k|        args->flush && source>=sourceLimit && cnv->fromUChar32==0
  ------------------
  |  Branch (2027:9): [True: 191, False: 0]
  |  Branch (2027:24): [True: 191, False: 0]
  |  Branch (2027:47): [True: 181, False: 10]
  ------------------
 2028|   431k|    ) {
 2029|    181|        int32_t sourceIndex;
 2030|       |
 2031|    181|        outLen = 0;
 2032|       |
 2033|    181|        if(pFromU2022State->g != 0) {
  ------------------
  |  Branch (2033:12): [True: 21, False: 160]
  ------------------
 2034|     21|            buffer[outLen++] = UCNV_SI;
  ------------------
  |  |   84|     21|#define  UCNV_SI 0x0F
  ------------------
 2035|     21|            pFromU2022State->g = 0;
 2036|     21|        }
 2037|       |
 2038|    181|        if(pFromU2022State->cs[0] != ASCII) {
  ------------------
  |  Branch (2038:12): [True: 166, False: 15]
  ------------------
 2039|    166|            int32_t escLen = escSeqCharsLen[ASCII];
 2040|    166|            uprv_memcpy(buffer + outLen, escSeqChars[ASCII], escLen);
  ------------------
  |  |   42|    166|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    166|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|    166|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|    166|    _Pragma("clang diagnostic push") \
  |  |   45|    166|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|    166|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|    166|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|    166|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|    166|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|    166|    _Pragma("clang diagnostic pop") \
  |  |   49|    166|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|    166|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|    166|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    166|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2041|    166|            outLen += escLen;
 2042|    166|            pFromU2022State->cs[0] = static_cast<int8_t>(ASCII);
 2043|    166|        }
 2044|       |
 2045|       |        /* get the source index of the last input character */
 2046|       |        /*
 2047|       |         * TODO this would be simpler and more reliable if we used a pair
 2048|       |         * of sourceIndex/prevSourceIndex like in ucnvmbcs.c
 2049|       |         * so that we could simply use the prevSourceIndex here;
 2050|       |         * this code gives an incorrect result for the rare case of an unmatched
 2051|       |         * trail surrogate that is alone in the last buffer of the text stream
 2052|       |         */
 2053|    181|        sourceIndex = static_cast<int32_t>(source - args->source);
 2054|    181|        if(sourceIndex>0) {
  ------------------
  |  Branch (2054:12): [True: 170, False: 11]
  ------------------
 2055|    170|            --sourceIndex;
 2056|    170|            if( U16_IS_TRAIL(args->source[sourceIndex]) &&
  ------------------
  |  |   67|    340|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 170]
  |  |  ------------------
  ------------------
 2057|    170|                (sourceIndex==0 || U16_IS_LEAD(args->source[sourceIndex-1]))
  ------------------
  |  |   59|      0|#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
  |  |  ------------------
  |  |  |  Branch (59:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2057:18): [True: 0, False: 0]
  ------------------
 2058|    170|            ) {
 2059|      0|                --sourceIndex;
 2060|      0|            }
 2061|    170|        } else {
 2062|     11|            sourceIndex=-1;
 2063|     11|        }
 2064|       |
 2065|    181|        fromUWriteUInt8(
 2066|    181|            cnv,
 2067|    181|            buffer, outLen,
 2068|    181|            &target, reinterpret_cast<const char*>(targetLimit),
 2069|    181|            &offsets, sourceIndex,
 2070|    181|            err);
 2071|    181|    }
 2072|       |
 2073|       |    /*save the state and return */
 2074|   431k|    args->source = source;
 2075|   431k|    args->target = reinterpret_cast<char*>(target);
 2076|   431k|}
ucnv2022.cpp:_ZL12jisx201FromUj:
 1504|  7.31M|jisx201FromU(uint32_t value) {
 1505|  7.31M|    if(value<=0x7f) {
  ------------------
  |  Branch (1505:8): [True: 728, False: 7.31M]
  ------------------
 1506|    728|        if(value!=0x5c && value!=0x7e) {
  ------------------
  |  Branch (1506:12): [True: 455, False: 273]
  |  Branch (1506:27): [True: 198, False: 257]
  ------------------
 1507|    198|            return value;
 1508|    198|        }
 1509|  7.31M|    } else if(value==0xa5) {
  ------------------
  |  Branch (1509:15): [True: 742, False: 7.31M]
  ------------------
 1510|    742|        return 0x5c;
 1511|  7.31M|    } else if(value==0x203e) {
  ------------------
  |  Branch (1511:15): [True: 195, False: 7.31M]
  ------------------
 1512|    195|        return 0x7e;
 1513|    195|    }
 1514|  7.31M|    return 0xfffe;
 1515|  7.31M|}
ucnv2022.cpp:_ZL25MBCS_FROM_UCHAR32_ISO2022P20UConverterSharedDataiPjai:
 1122|  59.3M|{
 1123|  59.3M|    const int32_t *cx;
 1124|  59.3M|    const uint16_t *table;
 1125|  59.3M|    uint32_t stage2Entry;
 1126|  59.3M|    uint32_t myValue;
 1127|  59.3M|    int32_t length;
 1128|  59.3M|    const uint8_t *p;
 1129|       |    /*
 1130|       |     * TODO(markus): Use and require new, faster MBCS conversion table structures.
 1131|       |     * Use internal version of ucnv_open() that verifies that the new structures are available,
 1132|       |     * else U_INTERNAL_PROGRAM_ERROR.
 1133|       |     */
 1134|       |    /* BMP-only codepages are stored without stage 1 entries for supplementary code points */
 1135|  59.3M|    if(c<0x10000 || (sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
  ------------------
  |  |   64|  2.98k|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (1135:8): [True: 59.3M, False: 2.98k]
  |  Branch (1135:21): [True: 0, False: 2.98k]
  ------------------
 1136|  59.3M|        table=sharedData->mbcs.fromUnicodeTable;
 1137|  59.3M|        stage2Entry=MBCS_STAGE_2_FROM_U(table, c);
  ------------------
  |  |  308|  59.3M|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 1138|       |        /* get the bytes and the length for the output */
 1139|  59.3M|        if(outputType==MBCS_OUTPUT_2){
  ------------------
  |  Branch (1139:12): [True: 49.1M, False: 10.2M]
  ------------------
 1140|  49.1M|            myValue=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
  ------------------
  |  |  311|  49.1M|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 1141|  49.1M|            if(myValue<=0xff) {
  ------------------
  |  Branch (1141:16): [True: 23.3M, False: 25.8M]
  ------------------
 1142|  23.3M|                length=1;
 1143|  25.8M|            } else {
 1144|  25.8M|                length=2;
 1145|  25.8M|            }
 1146|  49.1M|        } else /* outputType==MBCS_OUTPUT_3 */ {
 1147|  10.2M|            p=MBCS_POINTER_3_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
  ------------------
  |  |  314|  10.2M|#define MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c) ((bytes)+(16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf))*3)
  ------------------
 1148|  10.2M|            myValue = (static_cast<uint32_t>(*p) << 16) | (static_cast<uint32_t>(p[1]) << 8) | p[2];
 1149|  10.2M|            if(myValue<=0xff) {
  ------------------
  |  Branch (1149:16): [True: 5.11M, False: 5.10M]
  ------------------
 1150|  5.11M|                length=1;
 1151|  5.11M|            } else if(myValue<=0xffff) {
  ------------------
  |  Branch (1151:23): [True: 0, False: 5.10M]
  ------------------
 1152|      0|                length=2;
 1153|  5.10M|            } else {
 1154|  5.10M|                length=3;
 1155|  5.10M|            }
 1156|  10.2M|        }
 1157|       |        /* is this code point assigned, or do we use fallbacks? */
 1158|  59.3M|        if((stage2Entry&(1<<(16+(c&0xf))))!=0) {
  ------------------
  |  Branch (1158:12): [True: 30.9M, False: 28.4M]
  ------------------
 1159|       |            /* assigned */
 1160|  30.9M|            *value=myValue;
 1161|  30.9M|            return length;
 1162|  30.9M|        } else if(FROM_U_USE_FALLBACK(useFallback, c) && myValue!=0) {
  ------------------
  |  |  275|  56.8M|#define FROM_U_USE_FALLBACK(useFallback, c) ((useFallback) || IS_PRIVATE_USE(c))
  |  |  ------------------
  |  |  |  |  274|  28.4M|#define IS_PRIVATE_USE(c) ((uint32_t)((c)-0xe000)<0x1900 || (uint32_t)((c)-0xf0000)<0x20000)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:28): [True: 86.1k, False: 28.3M]
  |  |  |  |  |  Branch (274:61): [True: 0, False: 28.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (275:46): [True: 0, False: 28.4M]
  |  |  ------------------
  ------------------
  |  Branch (1162:58): [True: 0, False: 86.1k]
  ------------------
 1163|       |            /*
 1164|       |             * We allow a 0 byte output if the "assigned" bit is set for this entry.
 1165|       |             * There is no way with this data structure for fallback output
 1166|       |             * to be a zero byte.
 1167|       |             */
 1168|      0|            *value=myValue;
 1169|      0|            return -length;
 1170|      0|        }
 1171|  59.3M|    }
 1172|       |
 1173|  28.4M|    cx=sharedData->mbcs.extIndexes;
 1174|  28.4M|    if(cx!=nullptr) {
  ------------------
  |  Branch (1174:8): [True: 10.6M, False: 17.7M]
  ------------------
 1175|  10.6M|        return ucnv_extSimpleMatchFromU(cx, c, value, useFallback);
  ------------------
  |  |  657|  10.6M|#define ucnv_extSimpleMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extSimpleMatchFromU)
  |  |  ------------------
  |  |  |  |  123|  10.6M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  10.6M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  10.6M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1176|  10.6M|    }
 1177|       |
 1178|       |    /* unassigned */
 1179|  17.7M|    return 0;
 1180|  28.4M|}
ucnv2022.cpp:_ZL13_2022FromSJISj:
 1523|  6.89M|_2022FromSJIS(uint32_t value) {
 1524|  6.89M|    uint8_t trail;
 1525|       |
 1526|  6.89M|    if(value > 0xEFFC) {
  ------------------
  |  Branch (1526:8): [True: 6.58M, False: 307k]
  ------------------
 1527|  6.58M|        return 0;  /* beyond JIS X 0208 */
 1528|  6.58M|    }
 1529|       |
 1530|   307k|    trail = static_cast<uint8_t>(value);
 1531|       |
 1532|   307k|    value &= 0xff00;  /* lead byte */
 1533|   307k|    if(value <= 0x9f00) {
  ------------------
  |  Branch (1533:8): [True: 300k, False: 6.99k]
  ------------------
 1534|   300k|        value -= 0x7000;
 1535|   300k|    } else /* 0xe000 <= value <= 0xef00 */ {
 1536|  6.99k|        value -= 0xb000;
 1537|  6.99k|    }
 1538|   307k|    value <<= 1;
 1539|       |
 1540|   307k|    if(trail <= 0x9e) {
  ------------------
  |  Branch (1540:8): [True: 25.1k, False: 282k]
  ------------------
 1541|  25.1k|        value -= 0x100;
 1542|  25.1k|        if(trail <= 0x7e) {
  ------------------
  |  Branch (1542:12): [True: 19.6k, False: 5.43k]
  ------------------
 1543|  19.6k|            value |= trail - 0x1f;
 1544|  19.6k|        } else {
 1545|  5.43k|            value |= trail - 0x20;
 1546|  5.43k|        }
 1547|   282k|    } else /* trail <= 0xfc */ {
 1548|   282k|        value |= trail - 0x7e;
 1549|   282k|    }
 1550|   307k|    return value;
 1551|  6.89M|}
ucnv2022.cpp:_ZL24MBCS_SINGLE_FROM_UCHAR32P20UConverterSharedDataiPja:
 1192|  7.04M|{
 1193|  7.04M|    const uint16_t *table;
 1194|  7.04M|    int32_t value;
 1195|       |    /* BMP-only codepages are stored without stage 1 entries for supplementary code points */
 1196|  7.04M|    if(c>=0x10000 && !(sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
  ------------------
  |  |   64|    476|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (1196:8): [True: 476, False: 7.04M]
  |  Branch (1196:22): [True: 476, False: 0]
  ------------------
 1197|    476|        return 0;
 1198|    476|    }
 1199|       |    /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
 1200|  7.04M|    table=sharedData->mbcs.fromUnicodeTable;
 1201|       |    /* get the byte for the output */
 1202|  7.04M|    value=MBCS_SINGLE_RESULT_FROM_U(table, (uint16_t *)sharedData->mbcs.fromUnicodeBytes, c);
  ------------------
  |  |  299|  7.04M|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
 1203|       |    /* is this code point assigned, or do we use fallbacks? */
 1204|  7.04M|    *retval = static_cast<uint32_t>(value & 0xff);
 1205|  7.04M|    if(value>=0xf00) {
  ------------------
  |  Branch (1205:8): [True: 1.63k, False: 7.04M]
  ------------------
 1206|  1.63k|        return 1;  /* roundtrip */
 1207|  7.04M|    } else if(useFallback ? value>=0x800 : value>=0xc00) {
  ------------------
  |  Branch (1207:15): [True: 0, False: 7.04M]
  |  Branch (1207:15): [True: 0, False: 7.04M]
  ------------------
 1208|      0|        return -1;  /* fallback taken */
 1209|  7.04M|    } else {
 1210|  7.04M|        return 0;  /* no mapping */
 1211|  7.04M|    }
 1212|  7.04M|}
ucnv2022.cpp:_ZL17_2022FromGR94DBCSj:
 1221|  3.43M|_2022FromGR94DBCS(uint32_t value) {
 1222|  3.43M|    if (static_cast<uint16_t>(value - 0xa1a1) <= (0xfefe - 0xa1a1) &&
  ------------------
  |  Branch (1222:9): [True: 3.41M, False: 17.6k]
  ------------------
 1223|  3.43M|        static_cast<uint8_t>(value - 0xa1) <= (0xfe - 0xa1)
  ------------------
  |  Branch (1223:9): [True: 3.40M, False: 7.84k]
  ------------------
 1224|  3.43M|    ) {
 1225|  3.40M|        return value - 0x8080;  /* shift down to 21..7e byte range */
 1226|  3.40M|    } else {
 1227|  25.4k|        return 0;  /* not valid for ISO 2022 */
 1228|  25.4k|    }
 1229|  3.43M|}
ucnv2022.cpp:_ZL15fromUWriteUInt8P10UConverterPKciPPhS2_PPiiP10UErrorCode:
  438|  17.0M|{
  439|  17.0M|    char* targetChars = reinterpret_cast<char*>(*target);
  440|  17.0M|    ucnv_fromUWriteBytes(cnv, bytes, length, &targetChars, targetLimit,
  ------------------
  |  |  664|  17.0M|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  17.0M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  17.0M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  17.0M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  441|  17.0M|                         offsets, sourceIndex, pErrorCode);
  442|  17.0M|    *target = reinterpret_cast<uint8_t*>(targetChars);
  443|       |
  444|  17.0M|}
ucnv2022.cpp:_ZL26setInitialStateToUnicodeKRP10UConverterP21UConverterDataISO2022:
  447|    238|setInitialStateToUnicodeKR(UConverter* /*converter*/, UConverterDataISO2022 *myConverterData){
  448|    238|    if(myConverterData->version == 1) {
  ------------------
  |  Branch (448:8): [True: 60, False: 178]
  ------------------
  449|     60|        UConverter *cnv = myConverterData->currentConverter;
  450|       |
  451|     60|        cnv->toUnicodeStatus=0;     /* offset */
  452|     60|        cnv->mode=0;                /* state */
  453|     60|        cnv->toULength=0;           /* byteIndex */
  454|     60|    }
  455|    238|}
ucnv2022.cpp:_ZL28setInitialStateFromUnicodeKRP10UConverterP21UConverterDataISO2022:
  458|    708|setInitialStateFromUnicodeKR(UConverter* converter,UConverterDataISO2022 *myConverterData){
  459|       |   /* in ISO-2022-KR the designator sequence appears only once
  460|       |    * in a file so we append it only once
  461|       |    */
  462|    708|    if( converter->charErrorBufferLength==0){
  ------------------
  |  Branch (462:9): [True: 708, False: 0]
  ------------------
  463|       |
  464|    708|        converter->charErrorBufferLength = 4;
  465|    708|        converter->charErrorBuffer[0] = 0x1b;
  466|    708|        converter->charErrorBuffer[1] = 0x24;
  467|    708|        converter->charErrorBuffer[2] = 0x29;
  468|    708|        converter->charErrorBuffer[3] = 0x43;
  469|    708|    }
  470|    708|    if(myConverterData->version == 1) {
  ------------------
  |  Branch (470:8): [True: 178, False: 530]
  ------------------
  471|    178|        UConverter *cnv = myConverterData->currentConverter;
  472|       |
  473|    178|        cnv->fromUChar32=0;
  474|    178|        cnv->fromUnicodeStatus=1;   /* prevLength */
  475|    178|    }
  476|    708|}
ucnv2022.cpp:_ZL48UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGICP25UConverterFromUnicodeArgsP10UErrorCode:
 2358|  7.48M|UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err){
 2359|       |
 2360|  7.48M|    const char16_t *source = args->source;
 2361|  7.48M|    const char16_t *sourceLimit = args->sourceLimit;
 2362|  7.48M|    unsigned char *target = reinterpret_cast<unsigned char*>(args->target);
 2363|  7.48M|    unsigned char *targetLimit = reinterpret_cast<unsigned char*>(const_cast<char*>(args->targetLimit));
 2364|  7.48M|    int32_t* offsets = args->offsets;
 2365|  7.48M|    uint32_t targetByteUnit = 0x0000;
 2366|  7.48M|    UChar32 sourceChar = 0x0000;
 2367|  7.48M|    UBool isTargetByteDBCS;
 2368|  7.48M|    UBool oldIsTargetByteDBCS;
 2369|  7.48M|    UConverterDataISO2022 *converterData;
 2370|  7.48M|    UConverterSharedData* sharedData;
 2371|  7.48M|    UBool useFallback;
 2372|  7.48M|    int32_t length =0;
 2373|       |
 2374|  7.48M|    converterData = static_cast<UConverterDataISO2022*>(args->converter->extraInfo);
 2375|       |    /* if the version is 1 then the user is requesting
 2376|       |     * conversion with ibm-25546 pass the arguments to
 2377|       |     * MBCS converter and return
 2378|       |     */
 2379|  7.48M|    if(converterData->version==1){
  ------------------
  |  Branch (2379:8): [True: 985k, False: 6.49M]
  ------------------
 2380|   985k|        UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(args,err);
 2381|   985k|        return;
 2382|   985k|    }
 2383|       |
 2384|       |    /* initialize data */
 2385|  6.49M|    sharedData = converterData->currentConverter->sharedData;
 2386|  6.49M|    useFallback = args->converter->useFallback;
 2387|  6.49M|    isTargetByteDBCS = static_cast<UBool>(args->converter->fromUnicodeStatus);
 2388|  6.49M|    oldIsTargetByteDBCS = isTargetByteDBCS;
 2389|       |
 2390|  6.49M|    isTargetByteDBCS = static_cast<UBool>(args->converter->fromUnicodeStatus);
 2391|  6.49M|    if((sourceChar = args->converter->fromUChar32)!=0 && target <targetLimit) {
  ------------------
  |  Branch (2391:8): [True: 0, False: 6.49M]
  |  Branch (2391:58): [True: 0, False: 0]
  ------------------
 2392|      0|        goto getTrail;
 2393|      0|    }
 2394|  13.0M|    while(source < sourceLimit){
  ------------------
  |  Branch (2394:11): [True: 13.0M, False: 180]
  ------------------
 2395|       |
 2396|  13.0M|        targetByteUnit = missingCharMarker;
  ------------------
  |  |   34|  13.0M|#define missingCharMarker 0xFFFF
  ------------------
 2397|       |
 2398|  13.0M|        if(target < (unsigned char*) args->targetLimit){
  ------------------
  |  Branch (2398:12): [True: 13.0M, False: 334]
  ------------------
 2399|  13.0M|            sourceChar = *source++;
 2400|       |
 2401|       |            /* do not convert SO/SI/ESC */
 2402|  13.0M|            if(IS_2022_CONTROL(sourceChar)) {
  ------------------
  |  |  117|  13.0M|#define IS_2022_CONTROL(c) (((c)<0x20) && (((uint32_t)1<<(c))&0x0800c000)!=0)
  |  |  ------------------
  |  |  |  Branch (117:29): [True: 2.32k, False: 13.0M]
  |  |  |  Branch (117:43): [True: 346, False: 1.97k]
  |  |  ------------------
  ------------------
 2403|       |                /* callback(illegal) */
 2404|    346|                *err=U_ILLEGAL_CHAR_FOUND;
 2405|    346|                args->converter->fromUChar32=sourceChar;
 2406|    346|                break;
 2407|    346|            }
 2408|       |
 2409|  13.0M|            length = MBCS_FROM_UCHAR32_ISO2022(sharedData,sourceChar,&targetByteUnit,useFallback,MBCS_OUTPUT_2);
 2410|  13.0M|            if(length < 0) {
  ------------------
  |  Branch (2410:16): [True: 0, False: 13.0M]
  ------------------
 2411|      0|                length = -length;  /* fallback */
 2412|      0|            }
 2413|       |            /* only DBCS or SBCS characters are expected*/
 2414|       |            /* DB characters with high bit set to 1 are expected */
 2415|  13.0M|            if( length > 2 || length==0 ||
  ------------------
  |  Branch (2415:17): [True: 0, False: 13.0M]
  |  Branch (2415:31): [True: 6.49M, False: 6.51M]
  ------------------
 2416|  13.0M|                (length == 1 && targetByteUnit > 0x7f) ||
  ------------------
  |  Branch (2416:18): [True: 30.9k, False: 6.48M]
  |  Branch (2416:33): [True: 269, False: 30.6k]
  ------------------
 2417|  13.0M|                (length == 2 &&
  ------------------
  |  Branch (2417:18): [True: 6.48M, False: 30.6k]
  ------------------
 2418|  6.51M|                    (static_cast<uint16_t>(targetByteUnit - 0xa1a1) > (0xfefe - 0xa1a1) ||
  ------------------
  |  Branch (2418:22): [True: 1.12k, False: 6.48M]
  ------------------
 2419|  6.48M|                    static_cast<uint8_t>(targetByteUnit - 0xa1) > (0xfe - 0xa1)))
  ------------------
  |  Branch (2419:21): [True: 0, False: 6.48M]
  ------------------
 2420|  13.0M|            ) {
 2421|  6.49M|                targetByteUnit=missingCharMarker;
  ------------------
  |  |   34|  6.49M|#define missingCharMarker 0xFFFF
  ------------------
 2422|  6.49M|            }
 2423|  13.0M|            if (targetByteUnit != missingCharMarker){
  ------------------
  |  |   34|  13.0M|#define missingCharMarker 0xFFFF
  ------------------
  |  Branch (2423:17): [True: 6.51M, False: 6.49M]
  ------------------
 2424|       |
 2425|  6.51M|                oldIsTargetByteDBCS = isTargetByteDBCS;
 2426|  6.51M|                isTargetByteDBCS = static_cast<UBool>(targetByteUnit > 0x00FF);
 2427|       |                  /* append the shift sequence */
 2428|  6.51M|                if (oldIsTargetByteDBCS != isTargetByteDBCS ){
  ------------------
  |  Branch (2428:21): [True: 6.50M, False: 10.7k]
  ------------------
 2429|       |
 2430|  6.50M|                    if (isTargetByteDBCS)
  ------------------
  |  Branch (2430:25): [True: 6.48M, False: 24.2k]
  ------------------
 2431|  6.48M|                        *target++ = UCNV_SO;
  ------------------
  |  |   86|  6.48M|#define  UCNV_SO 0x0E
  ------------------
 2432|  24.2k|                    else
 2433|  24.2k|                        *target++ = UCNV_SI;
  ------------------
  |  |   84|  24.2k|#define  UCNV_SI 0x0F
  ------------------
 2434|  6.50M|                    if(offsets)
  ------------------
  |  Branch (2434:24): [True: 0, False: 6.50M]
  ------------------
 2435|      0|                        *(offsets++) = static_cast<int32_t>(source - args->source - 1);
 2436|  6.50M|                }
 2437|       |                /* write the targetUniChar  to target */
 2438|  6.51M|                if(targetByteUnit <= 0x00FF){
  ------------------
  |  Branch (2438:20): [True: 30.6k, False: 6.48M]
  ------------------
 2439|  30.6k|                    if( target < targetLimit){
  ------------------
  |  Branch (2439:25): [True: 30.5k, False: 35]
  ------------------
 2440|  30.5k|                        *(target++) = static_cast<unsigned char>(targetByteUnit);
 2441|  30.5k|                        if(offsets){
  ------------------
  |  Branch (2441:28): [True: 0, False: 30.5k]
  ------------------
 2442|      0|                            *(offsets++) = static_cast<int32_t>(source - args->source - 1);
 2443|      0|                        }
 2444|       |
 2445|  30.5k|                    }else{
 2446|     35|                        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>(targetByteUnit);
 2447|     35|                        *err = U_BUFFER_OVERFLOW_ERROR;
 2448|     35|                    }
 2449|  6.48M|                }else{
 2450|  6.48M|                    if(target < targetLimit){
  ------------------
  |  Branch (2450:24): [True: 6.48M, False: 105]
  ------------------
 2451|  6.48M|                        *(target++) = static_cast<unsigned char>((targetByteUnit >> 8) - 0x80);
 2452|  6.48M|                        if(offsets){
  ------------------
  |  Branch (2452:28): [True: 0, False: 6.48M]
  ------------------
 2453|      0|                            *(offsets++) = static_cast<int32_t>(source - args->source - 1);
 2454|      0|                        }
 2455|  6.48M|                        if(target < targetLimit){
  ------------------
  |  Branch (2455:28): [True: 6.48M, False: 103]
  ------------------
 2456|  6.48M|                            *(target++) = static_cast<unsigned char>(targetByteUnit - 0x80);
 2457|  6.48M|                            if(offsets){
  ------------------
  |  Branch (2457:32): [True: 0, False: 6.48M]
  ------------------
 2458|      0|                                *(offsets++) = static_cast<int32_t>(source - args->source - 1);
 2459|      0|                            }
 2460|  6.48M|                        }else{
 2461|    103|                            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>(targetByteUnit - 0x80);
 2462|    103|                            *err = U_BUFFER_OVERFLOW_ERROR;
 2463|    103|                        }
 2464|  6.48M|                    }else{
 2465|    105|                        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>((targetByteUnit >> 8) - 0x80);
 2466|    105|                        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>(targetByteUnit - 0x80);
 2467|    105|                        *err = U_BUFFER_OVERFLOW_ERROR;
 2468|    105|                    }
 2469|  6.48M|                }
 2470|       |
 2471|  6.51M|            }
 2472|  6.49M|            else{
 2473|       |                /* oops.. the code point is unassingned
 2474|       |                 * set the error and reason
 2475|       |                 */
 2476|       |
 2477|       |                /*check if the char is a First surrogate*/
 2478|  6.49M|                if(U16_IS_SURROGATE(sourceChar)) {
  ------------------
  |  |   75|  6.49M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  6.49M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 1.94k, False: 6.49M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2479|  1.94k|                    if(U16_IS_SURROGATE_LEAD(sourceChar)) {
  ------------------
  |  |   84|  1.94k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 1.25k, False: 698]
  |  |  ------------------
  ------------------
 2480|  1.25k|getTrail:
 2481|       |                        /*look ahead to find the trail surrogate*/
 2482|  1.25k|                        if(source <  sourceLimit) {
  ------------------
  |  Branch (2482:28): [True: 1.23k, False: 16]
  ------------------
 2483|       |                            /* test the following code unit */
 2484|  1.23k|                            char16_t trail = *source;
 2485|  1.23k|                            if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  1.23k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 200, False: 1.03k]
  |  |  ------------------
  ------------------
 2486|    200|                                source++;
 2487|    200|                                sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
  ------------------
  |  |  113|    200|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    200|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 2488|    200|                                *err = U_INVALID_CHAR_FOUND;
 2489|       |                                /* convert this surrogate code point */
 2490|       |                                /* exit this condition tree */
 2491|  1.03k|                            } else {
 2492|       |                                /* this is an unmatched lead code unit (1st surrogate) */
 2493|       |                                /* callback(illegal) */
 2494|  1.03k|                                *err=U_ILLEGAL_CHAR_FOUND;
 2495|  1.03k|                            }
 2496|  1.23k|                        } else {
 2497|       |                            /* no more input */
 2498|     16|                            *err = U_ZERO_ERROR;
 2499|     16|                        }
 2500|  1.25k|                    } else {
 2501|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
 2502|       |                        /* callback(illegal) */
 2503|    698|                        *err=U_ILLEGAL_CHAR_FOUND;
 2504|    698|                    }
 2505|  6.49M|                } else {
 2506|       |                    /* callback(unassigned) for a BMP code point */
 2507|  6.49M|                    *err = U_INVALID_CHAR_FOUND;
 2508|  6.49M|                }
 2509|       |
 2510|  6.49M|                args->converter->fromUChar32=sourceChar;
 2511|  6.49M|                break;
 2512|  6.49M|            }
 2513|  13.0M|        } /* end if(myTargetIndex<myTargetLength) */
 2514|    334|        else{
 2515|    334|            *err =U_BUFFER_OVERFLOW_ERROR;
 2516|    334|            break;
 2517|    334|        }
 2518|       |
 2519|  13.0M|    }/* end while(mySourceIndex<mySourceLength) */
 2520|       |
 2521|       |    /*
 2522|       |     * the end of the input stream and detection of truncated input
 2523|       |     * are handled by the framework, but for ISO-2022-KR conversion
 2524|       |     * we need to be in ASCII mode at the very end
 2525|       |     *
 2526|       |     * conditions:
 2527|       |     *   successful
 2528|       |     *   not in ASCII mode
 2529|       |     *   end of input and no truncated input
 2530|       |     */
 2531|  6.49M|    if( U_SUCCESS(*err) &&
  ------------------
  |  Branch (2531:9): [True: 192, False: 6.49M]
  ------------------
 2532|  6.49M|        isTargetByteDBCS &&
  ------------------
  |  Branch (2532:9): [True: 38, False: 154]
  ------------------
 2533|  6.49M|        args->flush && source>=sourceLimit && args->converter->fromUChar32==0
  ------------------
  |  Branch (2533:9): [True: 38, False: 0]
  |  Branch (2533:24): [True: 38, False: 0]
  |  Branch (2533:47): [True: 36, False: 2]
  ------------------
 2534|  6.49M|    ) {
 2535|     36|        int32_t sourceIndex;
 2536|       |
 2537|       |        /* we are switching to ASCII */
 2538|     36|        isTargetByteDBCS=false;
 2539|       |
 2540|       |        /* get the source index of the last input character */
 2541|       |        /*
 2542|       |         * TODO this would be simpler and more reliable if we used a pair
 2543|       |         * of sourceIndex/prevSourceIndex like in ucnvmbcs.c
 2544|       |         * so that we could simply use the prevSourceIndex here;
 2545|       |         * this code gives an incorrect result for the rare case of an unmatched
 2546|       |         * trail surrogate that is alone in the last buffer of the text stream
 2547|       |         */
 2548|     36|        sourceIndex = static_cast<int32_t>(source - args->source);
 2549|     36|        if(sourceIndex>0) {
  ------------------
  |  Branch (2549:12): [True: 31, False: 5]
  ------------------
 2550|     31|            --sourceIndex;
 2551|     31|            if( U16_IS_TRAIL(args->source[sourceIndex]) &&
  ------------------
  |  |   67|     62|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 31]
  |  |  ------------------
  ------------------
 2552|     31|                (sourceIndex==0 || U16_IS_LEAD(args->source[sourceIndex-1]))
  ------------------
  |  |   59|      0|#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
  |  |  ------------------
  |  |  |  Branch (59:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2552:18): [True: 0, False: 0]
  ------------------
 2553|     31|            ) {
 2554|      0|                --sourceIndex;
 2555|      0|            }
 2556|     31|        } else {
 2557|      5|            sourceIndex=-1;
 2558|      5|        }
 2559|       |
 2560|     36|        fromUWriteUInt8(
 2561|     36|            args->converter,
 2562|     36|            SHIFT_IN_STR, 1,
 2563|     36|            &target, reinterpret_cast<const char*>(targetLimit),
 2564|     36|            &offsets, sourceIndex,
 2565|     36|            err);
 2566|     36|    }
 2567|       |
 2568|       |    /*save the state and return */
 2569|  6.49M|    args->source = source;
 2570|  6.49M|    args->target = reinterpret_cast<char*>(target);
 2571|  6.49M|    args->converter->fromUnicodeStatus = static_cast<uint32_t>(isTargetByteDBCS);
 2572|  6.49M|}
ucnv2022.cpp:_ZL52UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBMP25UConverterFromUnicodeArgsP10UErrorCode:
 2334|   985k|UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterFromUnicodeArgs* args, UErrorCode* err){
 2335|       |
 2336|   985k|    UConverter* saveConv = args->converter;
 2337|   985k|    UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(saveConv->extraInfo);
 2338|   985k|    args->converter=myConverterData->currentConverter;
 2339|       |
 2340|   985k|    myConverterData->currentConverter->fromUChar32 = saveConv->fromUChar32;
 2341|   985k|    ucnv_MBCSFromUnicodeWithOffsets(args,err);
  ------------------
  |  |  623|   985k|#define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUnicodeWithOffsets)
  |  |  ------------------
  |  |  |  |  123|   985k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|   985k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|   985k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2342|   985k|    saveConv->fromUChar32 = myConverterData->currentConverter->fromUChar32;
 2343|       |
 2344|   985k|    if(*err == U_BUFFER_OVERFLOW_ERROR) {
  ------------------
  |  Branch (2344:8): [True: 168, False: 985k]
  ------------------
 2345|    168|        if(myConverterData->currentConverter->charErrorBufferLength > 0) {
  ------------------
  |  Branch (2345:12): [True: 76, False: 92]
  ------------------
 2346|     76|            uprv_memcpy(
  ------------------
  |  |   42|     76|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     76|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     76|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     76|    _Pragma("clang diagnostic push") \
  |  |   45|     76|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     76|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     76|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     76|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     76|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     76|    _Pragma("clang diagnostic pop") \
  |  |   49|     76|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     76|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     76|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     76|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2347|     76|                saveConv->charErrorBuffer,
 2348|     76|                myConverterData->currentConverter->charErrorBuffer,
 2349|     76|                myConverterData->currentConverter->charErrorBufferLength);
 2350|     76|        }
 2351|    168|        saveConv->charErrorBufferLength = myConverterData->currentConverter->charErrorBufferLength;
 2352|    168|        myConverterData->currentConverter->charErrorBufferLength = 0;
 2353|    168|    }
 2354|   985k|    args->converter=saveConv;
 2355|   985k|}
ucnv2022.cpp:_ZL48UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGICP25UConverterFromUnicodeArgsP10UErrorCode:
 2917|  71.1k|UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err){
 2918|  71.1k|    UConverter *cnv = args->converter;
 2919|  71.1k|    UConverterDataISO2022 *converterData;
 2920|  71.1k|    ISO2022State *pFromU2022State;
 2921|  71.1k|    uint8_t* target = reinterpret_cast<uint8_t*>(args->target);
 2922|  71.1k|    const uint8_t* targetLimit = reinterpret_cast<const uint8_t*>(args->targetLimit);
 2923|  71.1k|    const char16_t* source = args->source;
 2924|  71.1k|    const char16_t* sourceLimit = args->sourceLimit;
 2925|  71.1k|    int32_t* offsets = args->offsets;
 2926|  71.1k|    UChar32 sourceChar;
 2927|  71.1k|    char buffer[8];
 2928|  71.1k|    int32_t len;
 2929|  71.1k|    int8_t choices[3];
 2930|  71.1k|    int32_t choiceCount;
 2931|  71.1k|    uint32_t targetValue = 0;
 2932|  71.1k|    UBool useFallback;
 2933|       |
 2934|       |    /* set up the state */
 2935|  71.1k|    converterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo);
 2936|  71.1k|    pFromU2022State   = &converterData->fromU2022State;
 2937|       |
 2938|  71.1k|    choiceCount = 0;
 2939|       |
 2940|       |    /* check if the last codepoint of previous buffer was a lead surrogate*/
 2941|  71.1k|    if((sourceChar = cnv->fromUChar32)!=0 && target< targetLimit) {
  ------------------
  |  Branch (2941:8): [True: 0, False: 71.1k]
  |  Branch (2941:46): [True: 0, False: 0]
  ------------------
 2942|      0|        goto getTrail;
 2943|      0|    }
 2944|       |
 2945|  10.3M|    while( source < sourceLimit){
  ------------------
  |  Branch (2945:12): [True: 10.3M, False: 315]
  ------------------
 2946|  10.3M|        if(target < targetLimit){
  ------------------
  |  Branch (2946:12): [True: 10.3M, False: 373]
  ------------------
 2947|       |
 2948|  10.3M|            sourceChar  = *(source++);
 2949|       |            /*check if the char is a First surrogate*/
 2950|  10.3M|             if(U16_IS_SURROGATE(sourceChar)) {
  ------------------
  |  |   75|  10.3M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  10.3M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 3.11k, False: 10.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2951|  3.11k|                if(U16_IS_SURROGATE_LEAD(sourceChar)) {
  ------------------
  |  |   84|  3.11k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 1.84k, False: 1.26k]
  |  |  ------------------
  ------------------
 2952|  1.84k|getTrail:
 2953|       |                    /*look ahead to find the trail surrogate*/
 2954|  1.84k|                    if(source < sourceLimit) {
  ------------------
  |  Branch (2954:24): [True: 1.83k, False: 8]
  ------------------
 2955|       |                        /* test the following code unit */
 2956|  1.83k|                        char16_t trail = *source;
 2957|  1.83k|                        if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  1.83k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 416, False: 1.42k]
  |  |  ------------------
  ------------------
 2958|    416|                            source++;
 2959|    416|                            sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
  ------------------
  |  |  113|    416|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    416|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 2960|    416|                            cnv->fromUChar32=0x00;
 2961|       |                            /* convert this supplementary code point */
 2962|       |                            /* exit this condition tree */
 2963|  1.42k|                        } else {
 2964|       |                            /* this is an unmatched lead code unit (1st surrogate) */
 2965|       |                            /* callback(illegal) */
 2966|  1.42k|                            *err=U_ILLEGAL_CHAR_FOUND;
 2967|  1.42k|                            cnv->fromUChar32=sourceChar;
 2968|  1.42k|                            break;
 2969|  1.42k|                        }
 2970|  1.83k|                    } else {
 2971|       |                        /* no more input */
 2972|      8|                        cnv->fromUChar32=sourceChar;
 2973|      8|                        break;
 2974|      8|                    }
 2975|  1.84k|                } else {
 2976|       |                    /* this is an unmatched trail code unit (2nd surrogate) */
 2977|       |                    /* callback(illegal) */
 2978|  1.26k|                    *err=U_ILLEGAL_CHAR_FOUND;
 2979|  1.26k|                    cnv->fromUChar32=sourceChar;
 2980|  1.26k|                    break;
 2981|  1.26k|                }
 2982|  3.11k|            }
 2983|       |
 2984|       |            /* do the conversion */
 2985|  10.3M|            if(sourceChar <= 0x007f ){
  ------------------
  |  Branch (2985:16): [True: 4.27k, False: 10.3M]
  ------------------
 2986|       |                /* do not convert SO/SI/ESC */
 2987|  4.27k|                if(IS_2022_CONTROL(sourceChar)) {
  ------------------
  |  |  117|  4.27k|#define IS_2022_CONTROL(c) (((c)<0x20) && (((uint32_t)1<<(c))&0x0800c000)!=0)
  |  |  ------------------
  |  |  |  Branch (117:29): [True: 3.12k, False: 1.14k]
  |  |  |  Branch (117:43): [True: 200, False: 2.92k]
  |  |  ------------------
  ------------------
 2988|       |                    /* callback(illegal) */
 2989|    200|                    *err=U_ILLEGAL_CHAR_FOUND;
 2990|    200|                    cnv->fromUChar32=sourceChar;
 2991|    200|                    break;
 2992|    200|                }
 2993|       |
 2994|       |                /* US-ASCII */
 2995|  4.07k|                if(pFromU2022State->g == 0) {
  ------------------
  |  Branch (2995:20): [True: 3.37k, False: 693]
  ------------------
 2996|  3.37k|                    buffer[0] = static_cast<char>(sourceChar);
 2997|  3.37k|                    len = 1;
 2998|  3.37k|                } else {
 2999|    693|                    buffer[0] = UCNV_SI;
  ------------------
  |  |   84|    693|#define  UCNV_SI 0x0F
  ------------------
 3000|    693|                    buffer[1] = static_cast<char>(sourceChar);
 3001|    693|                    len = 2;
 3002|    693|                    pFromU2022State->g = 0;
 3003|    693|                    choiceCount = 0;
 3004|    693|                }
 3005|  4.07k|                if(sourceChar == CR || sourceChar == LF) {
  ------------------
  |  |   85|  8.14k|#define CR      0x0D
  ------------------
                              if(sourceChar == CR || sourceChar == LF) {
  ------------------
  |  |   86|  3.83k|#define LF      0x0A
  ------------------
  |  Branch (3005:20): [True: 240, False: 3.83k]
  |  Branch (3005:40): [True: 457, False: 3.37k]
  ------------------
 3006|       |                    /* reset the state at the end of a line */
 3007|    697|                    uprv_memset(pFromU2022State, 0, sizeof(ISO2022State));
  ------------------
  |  |  100|    697|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|    697|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 3008|    697|                    choiceCount = 0;
 3009|    697|                }
 3010|  4.07k|            }
 3011|  10.3M|            else{
 3012|       |                /* convert U+0080..U+10ffff */
 3013|  10.3M|                int32_t i;
 3014|  10.3M|                int8_t cs, g;
 3015|       |
 3016|  10.3M|                if(choiceCount == 0) {
  ------------------
  |  Branch (3016:20): [True: 10.1M, False: 181k]
  ------------------
 3017|       |                    /* try the current SO/G1 converter first */
 3018|  10.1M|                    choices[0] = pFromU2022State->cs[1];
 3019|       |
 3020|       |                    /* default to GB2312_1 if none is designated yet */
 3021|  10.1M|                    if(choices[0] == 0) {
  ------------------
  |  Branch (3021:24): [True: 1.73k, False: 10.1M]
  ------------------
 3022|  1.73k|                        choices[0] = GB2312_1;
 3023|  1.73k|                    }
 3024|       |
 3025|  10.1M|                    if(converterData->version == 0) {
  ------------------
  |  Branch (3025:24): [True: 51.6k, False: 10.1M]
  ------------------
 3026|       |                        /* ISO-2022-CN */
 3027|       |
 3028|       |                        /* try the other SO/G1 converter; a CNS_11643_1 lookup may result in any plane */
 3029|  51.6k|                        if(choices[0] == GB2312_1) {
  ------------------
  |  Branch (3029:28): [True: 29.3k, False: 22.3k]
  ------------------
 3030|  29.3k|                            choices[1] = static_cast<int8_t>(CNS_11643_1);
 3031|  29.3k|                        } else {
 3032|  22.3k|                            choices[1] = static_cast<int8_t>(GB2312_1);
 3033|  22.3k|                        }
 3034|       |
 3035|  51.6k|                        choiceCount = 2;
 3036|  10.1M|                    } else if (converterData->version == 1) {
  ------------------
  |  Branch (3036:32): [True: 10.1M, False: 345]
  ------------------
 3037|       |                        /* ISO-2022-CN-EXT */
 3038|       |
 3039|       |                        /* try one of the other converters */
 3040|  10.1M|                        switch(choices[0]) {
 3041|  5.06M|                        case GB2312_1:
  ------------------
  |  Branch (3041:25): [True: 5.06M, False: 5.05M]
  ------------------
 3042|  5.06M|                            choices[1] = static_cast<int8_t>(CNS_11643_1);
 3043|  5.06M|                            choices[2] = static_cast<int8_t>(ISO_IR_165);
 3044|  5.06M|                            break;
 3045|    859|                        case ISO_IR_165:
  ------------------
  |  Branch (3045:25): [True: 859, False: 10.1M]
  ------------------
 3046|    859|                            choices[1] = static_cast<int8_t>(GB2312_1);
 3047|    859|                            choices[2] = static_cast<int8_t>(CNS_11643_1);
 3048|    859|                            break;
 3049|  5.05M|                        default: /* CNS_11643_x */
  ------------------
  |  Branch (3049:25): [True: 5.05M, False: 5.06M]
  ------------------
 3050|  5.05M|                            choices[1] = static_cast<int8_t>(GB2312_1);
 3051|  5.05M|                            choices[2] = static_cast<int8_t>(ISO_IR_165);
 3052|  5.05M|                            break;
 3053|  10.1M|                        }
 3054|       |
 3055|  10.1M|                        choiceCount = 3;
 3056|  10.1M|                    } else {
 3057|    345|                        choices[0] = static_cast<int8_t>(CNS_11643_1);
 3058|    345|                        choices[1] = static_cast<int8_t>(GB2312_1);
 3059|    345|                    }
 3060|  10.1M|                }
 3061|       |
 3062|  10.3M|                cs = g = 0;
 3063|       |                /*
 3064|       |                 * len==0: no mapping found yet
 3065|       |                 * len<0: found a fallback result: continue looking for a roundtrip but no further fallbacks
 3066|       |                 * len>0: found a roundtrip result, done
 3067|       |                 */
 3068|  10.3M|                len = 0;
 3069|       |                /*
 3070|       |                 * We will turn off useFallback after finding a fallback,
 3071|       |                 * but we still get fallbacks from PUA code points as usual.
 3072|       |                 * Therefore, we will also need to check that we don't overwrite
 3073|       |                 * an early fallback with a later one.
 3074|       |                 */
 3075|  10.3M|                useFallback = cnv->useFallback;
 3076|       |
 3077|  30.9M|                for(i = 0; i < choiceCount && len <= 0; ++i) {
  ------------------
  |  Branch (3077:28): [True: 30.8M, False: 88.9k]
  |  Branch (3077:47): [True: 20.5M, False: 10.2M]
  ------------------
 3078|  20.5M|                    int8_t cs0 = choices[i];
 3079|  20.5M|                    if(cs0 > 0) {
  ------------------
  |  Branch (3079:24): [True: 20.5M, False: 0]
  ------------------
 3080|  20.5M|                        uint32_t value;
 3081|  20.5M|                        int32_t len2;
 3082|  20.5M|                        if(cs0 >= CNS_11643_0) {
  ------------------
  |  Branch (3082:28): [True: 10.2M, False: 10.3M]
  ------------------
 3083|  10.2M|                            len2 = MBCS_FROM_UCHAR32_ISO2022(
 3084|  10.2M|                                        converterData->myConverterArray[CNS_11643],
 3085|  10.2M|                                        sourceChar,
 3086|  10.2M|                                        &value,
 3087|  10.2M|                                        useFallback,
 3088|  10.2M|                                        MBCS_OUTPUT_3);
 3089|  10.2M|                            if(len2 == 3 || (len2 == -3 && len == 0)) {
  ------------------
  |  Branch (3089:32): [True: 5.10M, False: 5.11M]
  |  Branch (3089:46): [True: 0, False: 5.11M]
  |  Branch (3089:60): [True: 0, False: 0]
  ------------------
 3090|  5.10M|                                targetValue = value;
 3091|  5.10M|                                cs = static_cast<int8_t>(CNS_11643_0 + (value >> 16) - 0x80);
 3092|  5.10M|                                if(len2 >= 0) {
  ------------------
  |  Branch (3092:36): [True: 5.10M, False: 0]
  ------------------
 3093|  5.10M|                                    len = 2;
 3094|  5.10M|                                } else {
 3095|      0|                                    len = -2;
 3096|      0|                                    useFallback = false;
 3097|      0|                                }
 3098|  5.10M|                                if(cs == CNS_11643_1) {
  ------------------
  |  Branch (3098:36): [True: 5.05M, False: 52.7k]
  ------------------
 3099|  5.05M|                                    g = 1;
 3100|  5.05M|                                } else if(cs == CNS_11643_2) {
  ------------------
  |  Branch (3100:43): [True: 52.7k, False: 0]
  ------------------
 3101|  52.7k|                                    g = 2;
 3102|  52.7k|                                } else /* plane 3..7 */ if(converterData->version == 1) {
  ------------------
  |  Branch (3102:60): [True: 0, False: 0]
  ------------------
 3103|      0|                                    g = 3;
 3104|      0|                                } else {
 3105|       |                                    /* ISO-2022-CN (without -EXT) does not support plane 3..7 */
 3106|      0|                                    len = 0;
 3107|      0|                                }
 3108|  5.10M|                            }
 3109|  10.3M|                        } else {
 3110|       |                            /* GB2312_1 or ISO-IR-165 */
 3111|  10.3M|                            U_ASSERT(cs0<UCNV_2022_MAX_CONVERTERS);
  ------------------
  |  |   35|  10.3M|#   define U_ASSERT(exp) (void)0
  ------------------
 3112|  10.3M|                            len2 = MBCS_FROM_UCHAR32_ISO2022(
 3113|  10.3M|                                        converterData->myConverterArray[cs0],
 3114|  10.3M|                                        sourceChar,
 3115|  10.3M|                                        &value,
 3116|  10.3M|                                        useFallback,
 3117|  10.3M|                                        MBCS_OUTPUT_2);
 3118|  10.3M|                            if(len2 == 2 || (len2 == -2 && len == 0)) {
  ------------------
  |  Branch (3118:32): [True: 5.17M, False: 5.19M]
  |  Branch (3118:46): [True: 0, False: 5.19M]
  |  Branch (3118:60): [True: 0, False: 0]
  ------------------
 3119|  5.17M|                                targetValue = value;
 3120|  5.17M|                                len = len2;
 3121|  5.17M|                                cs = cs0;
 3122|  5.17M|                                g = 1;
 3123|  5.17M|                                useFallback = false;
 3124|  5.17M|                            }
 3125|  10.3M|                        }
 3126|  20.5M|                    }
 3127|  20.5M|                }
 3128|       |
 3129|  10.3M|                if(len != 0) {
  ------------------
  |  Branch (3129:20): [True: 10.2M, False: 66.1k]
  ------------------
 3130|  10.2M|                    len = 0; /* count output bytes; it must have been abs(len) == 2 */
 3131|       |
 3132|       |                    /* write the designation sequence if necessary */
 3133|  10.2M|                    if(cs != pFromU2022State->cs[g]) {
  ------------------
  |  Branch (3133:24): [True: 10.0M, False: 182k]
  ------------------
 3134|  10.0M|                        if(cs < CNS_11643) {
  ------------------
  |  Branch (3134:28): [True: 5.04M, False: 5.04M]
  ------------------
 3135|  5.04M|                            uprv_memcpy(buffer, escSeqCharsCN[cs], 4);
  ------------------
  |  |   42|  5.04M|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  5.04M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  5.04M|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  5.04M|    _Pragma("clang diagnostic push") \
  |  |   45|  5.04M|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  5.04M|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  5.04M|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  5.04M|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  5.04M|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  5.04M|    _Pragma("clang diagnostic pop") \
  |  |   49|  5.04M|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  5.04M|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  5.04M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  5.04M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3136|  5.04M|                        } else {
 3137|  5.04M|                            U_ASSERT(cs >= CNS_11643_1);
  ------------------
  |  |   35|  5.04M|#   define U_ASSERT(exp) (void)0
  ------------------
 3138|  5.04M|                            uprv_memcpy(buffer, escSeqCharsCN[CNS_11643 + (cs - CNS_11643_1)], 4);
  ------------------
  |  |   42|  5.04M|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  5.04M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  5.04M|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  5.04M|    _Pragma("clang diagnostic push") \
  |  |   45|  5.04M|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  5.04M|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  5.04M|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  5.04M|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  5.04M|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  5.04M|    _Pragma("clang diagnostic pop") \
  |  |   49|  5.04M|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  5.04M|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  5.04M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  5.04M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3139|  5.04M|                        }
 3140|  10.0M|                        len = 4;
 3141|  10.0M|                        pFromU2022State->cs[g] = cs;
 3142|  10.0M|                        if(g == 1) {
  ------------------
  |  Branch (3142:28): [True: 10.0M, False: 373]
  ------------------
 3143|       |                            /* changing the SO/G1 charset invalidates the choices[] */
 3144|  10.0M|                            choiceCount = 0;
 3145|  10.0M|                        }
 3146|  10.0M|                    }
 3147|       |
 3148|       |                    /* write the shift sequence if necessary */
 3149|  10.2M|                    if(g != pFromU2022State->g) {
  ------------------
  |  Branch (3149:24): [True: 63.4k, False: 10.2M]
  ------------------
 3150|  63.4k|                        switch(g) {
 3151|  10.6k|                        case 1:
  ------------------
  |  Branch (3151:25): [True: 10.6k, False: 52.7k]
  ------------------
 3152|  10.6k|                            buffer[len++] = UCNV_SO;
  ------------------
  |  |   86|  10.6k|#define  UCNV_SO 0x0E
  ------------------
 3153|       |
 3154|       |                            /* set the new state only if it is the locking shift SO/G1, not for SS2 or SS3 */
 3155|  10.6k|                            pFromU2022State->g = 1;
 3156|  10.6k|                            break;
 3157|  52.7k|                        case 2:
  ------------------
  |  Branch (3157:25): [True: 52.7k, False: 10.6k]
  ------------------
 3158|  52.7k|                            buffer[len++] = 0x1b;
 3159|  52.7k|                            buffer[len++] = 0x4e;
 3160|  52.7k|                            break;
 3161|      0|                        default: /* case 3 */
  ------------------
  |  Branch (3161:25): [True: 0, False: 63.4k]
  ------------------
 3162|      0|                            buffer[len++] = 0x1b;
 3163|      0|                            buffer[len++] = 0x4f;
 3164|      0|                            break;
 3165|  63.4k|                        }
 3166|  63.4k|                    }
 3167|       |
 3168|       |                    /* write the two output bytes */
 3169|  10.2M|                    buffer[len++] = static_cast<char>(targetValue >> 8);
 3170|  10.2M|                    buffer[len++] = static_cast<char>(targetValue);
 3171|  10.2M|                } else {
 3172|       |                    /* if we cannot find the character after checking all codepages
 3173|       |                     * then this is an error
 3174|       |                     */
 3175|  66.1k|                    *err = U_INVALID_CHAR_FOUND;
 3176|  66.1k|                    cnv->fromUChar32=sourceChar;
 3177|  66.1k|                    break;
 3178|  66.1k|                }
 3179|  10.3M|            }
 3180|       |
 3181|       |            /* output len>0 bytes in buffer[] */
 3182|  10.2M|            if(len == 1) {
  ------------------
  |  Branch (3182:16): [True: 3.37k, False: 10.2M]
  ------------------
 3183|  3.37k|                *target++ = buffer[0];
 3184|  3.37k|                if(offsets) {
  ------------------
  |  Branch (3184:20): [True: 0, False: 3.37k]
  ------------------
 3185|      0|                    *offsets++ = static_cast<int32_t>(source - args->source - 1); /* -1: known to be ASCII */
 3186|      0|                }
 3187|  10.2M|            } else if(len == 2 && (target + 2) <= targetLimit) {
  ------------------
  |  Branch (3187:23): [True: 123k, False: 10.1M]
  |  Branch (3187:35): [True: 123k, False: 196]
  ------------------
 3188|   123k|                *target++ = buffer[0];
 3189|   123k|                *target++ = buffer[1];
 3190|   123k|                if(offsets) {
  ------------------
  |  Branch (3190:20): [True: 0, False: 123k]
  ------------------
 3191|      0|                    int32_t sourceIndex = static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar));
  ------------------
  |  |  141|      0|#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
  |  |  ------------------
  |  |  |  Branch (141:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3192|      0|                    *offsets++ = sourceIndex;
 3193|      0|                    *offsets++ = sourceIndex;
 3194|      0|                }
 3195|  10.1M|            } else {
 3196|  10.1M|                fromUWriteUInt8(
 3197|  10.1M|                    cnv,
 3198|  10.1M|                    buffer, len,
 3199|  10.1M|                    &target, reinterpret_cast<const char*>(targetLimit),
 3200|  10.1M|                    &offsets, static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar)),
  ------------------
  |  |  141|  10.1M|#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
  |  |  ------------------
  |  |  |  Branch (141:24): [True: 10.1M, False: 0]
  |  |  ------------------
  ------------------
 3201|  10.1M|                    err);
 3202|  10.1M|                if(U_FAILURE(*err)) {
  ------------------
  |  Branch (3202:20): [True: 1.45k, False: 10.1M]
  ------------------
 3203|  1.45k|                    break;
 3204|  1.45k|                }
 3205|  10.1M|            }
 3206|  10.2M|        } /* end if(myTargetIndex<myTargetLength) */
 3207|    373|        else{
 3208|    373|            *err =U_BUFFER_OVERFLOW_ERROR;
 3209|    373|            break;
 3210|    373|        }
 3211|       |
 3212|  10.3M|    }/* end while(mySourceIndex<mySourceLength) */
 3213|       |
 3214|       |    /*
 3215|       |     * the end of the input stream and detection of truncated input
 3216|       |     * are handled by the framework, but for ISO-2022-CN conversion
 3217|       |     * we need to be in ASCII mode at the very end
 3218|       |     *
 3219|       |     * conditions:
 3220|       |     *   successful
 3221|       |     *   not in ASCII mode
 3222|       |     *   end of input and no truncated input
 3223|       |     */
 3224|  71.1k|    if( U_SUCCESS(*err) &&
  ------------------
  |  Branch (3224:9): [True: 323, False: 70.8k]
  ------------------
 3225|  71.1k|        pFromU2022State->g!=0 &&
  ------------------
  |  Branch (3225:9): [True: 92, False: 231]
  ------------------
 3226|  71.1k|        args->flush && source>=sourceLimit && cnv->fromUChar32==0
  ------------------
  |  Branch (3226:9): [True: 92, False: 0]
  |  Branch (3226:24): [True: 92, False: 0]
  |  Branch (3226:47): [True: 91, False: 1]
  ------------------
 3227|  71.1k|    ) {
 3228|     91|        int32_t sourceIndex;
 3229|       |
 3230|       |        /* we are switching to ASCII */
 3231|     91|        pFromU2022State->g=0;
 3232|       |
 3233|       |        /* get the source index of the last input character */
 3234|       |        /*
 3235|       |         * TODO this would be simpler and more reliable if we used a pair
 3236|       |         * of sourceIndex/prevSourceIndex like in ucnvmbcs.c
 3237|       |         * so that we could simply use the prevSourceIndex here;
 3238|       |         * this code gives an incorrect result for the rare case of an unmatched
 3239|       |         * trail surrogate that is alone in the last buffer of the text stream
 3240|       |         */
 3241|     91|        sourceIndex = static_cast<int32_t>(source - args->source);
 3242|     91|        if(sourceIndex>0) {
  ------------------
  |  Branch (3242:12): [True: 77, False: 14]
  ------------------
 3243|     77|            --sourceIndex;
 3244|     77|            if( U16_IS_TRAIL(args->source[sourceIndex]) &&
  ------------------
  |  |   67|    154|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 77]
  |  |  ------------------
  ------------------
 3245|     77|                (sourceIndex==0 || U16_IS_LEAD(args->source[sourceIndex-1]))
  ------------------
  |  |   59|      0|#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
  |  |  ------------------
  |  |  |  Branch (59:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3245:18): [True: 0, False: 0]
  ------------------
 3246|     77|            ) {
 3247|      0|                --sourceIndex;
 3248|      0|            }
 3249|     77|        } else {
 3250|     14|            sourceIndex=-1;
 3251|     14|        }
 3252|       |
 3253|     91|        fromUWriteUInt8(
 3254|     91|            cnv,
 3255|     91|            SHIFT_IN_STR, 1,
 3256|     91|            &target, reinterpret_cast<const char*>(targetLimit),
 3257|     91|            &offsets, sourceIndex,
 3258|     91|            err);
 3259|     91|    }
 3260|       |
 3261|       |    /*save the state and return */
 3262|  71.1k|    args->source = source;
 3263|  71.1k|    args->target = reinterpret_cast<char*>(target);
 3264|  71.1k|}
ucnv2022.cpp:_ZL13_ISO2022CloseP10UConverter:
  657|  1.03k|_ISO2022Close(UConverter *converter) {
  658|  1.03k|    UConverterDataISO2022* myData = static_cast<UConverterDataISO2022*>(converter->extraInfo);
  659|  1.03k|    UConverterSharedData **array = myData->myConverterArray;
  660|  1.03k|    int32_t i;
  661|       |
  662|  1.03k|    if (converter->extraInfo != nullptr) {
  ------------------
  |  Branch (662:9): [True: 1.03k, False: 0]
  ------------------
  663|       |        /*close the array of converter pointers and free the memory*/
  664|  11.3k|        for (i=0; i<UCNV_2022_MAX_CONVERTERS; i++) {
  ------------------
  |  |  207|  11.3k|#define UCNV_2022_MAX_CONVERTERS 10
  ------------------
  |  Branch (664:19): [True: 10.3k, False: 1.03k]
  ------------------
  665|  10.3k|            if(array[i]!=nullptr) {
  ------------------
  |  Branch (665:16): [True: 2.96k, False: 7.37k]
  ------------------
  666|  2.96k|                ucnv_unloadSharedDataIfReady(array[i]);
  ------------------
  |  |  726|  2.96k|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|  2.96k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  2.96k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  2.96k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  667|  2.96k|            }
  668|  10.3k|        }
  669|       |
  670|  1.03k|        ucnv_close(myData->currentConverter);
  ------------------
  |  |  639|  1.03k|#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
  |  |  ------------------
  |  |  |  |  123|  1.03k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.03k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.03k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  671|       |
  672|  1.03k|        if(!converter->isExtraLocal){
  ------------------
  |  Branch (672:12): [True: 1.03k, False: 0]
  ------------------
  673|  1.03k|            uprv_free (converter->extraInfo);
  ------------------
  |  | 1503|  1.03k|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|  1.03k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.03k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.03k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  674|  1.03k|            converter->extraInfo = nullptr;
  675|  1.03k|        }
  676|  1.03k|    }
  677|  1.03k|}
ucnv2022.cpp:_ZL13_ISO2022ResetP10UConverter21UConverterResetChoice:
  680|  2.03k|_ISO2022Reset(UConverter *converter, UConverterResetChoice choice) {
  681|  2.03k|    UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(converter->extraInfo);
  682|  2.03k|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (682:8): [True: 0, False: 2.03k]
  ------------------
  683|      0|        uprv_memset(&myConverterData->toU2022State, 0, sizeof(ISO2022State));
  ------------------
  |  |  100|      0|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  684|      0|        myConverterData->key = 0;
  685|      0|        myConverterData->isEmptySegment = false;
  686|      0|    }
  687|  2.03k|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (687:8): [True: 2.03k, False: 0]
  ------------------
  688|  2.03k|        uprv_memset(&myConverterData->fromU2022State, 0, sizeof(ISO2022State));
  ------------------
  |  |  100|  2.03k|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|  2.03k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  689|  2.03k|    }
  690|       |#ifdef U_ENABLE_GENERIC_ISO_2022
  691|       |    if(myConverterData->locale[0] == 0){
  692|       |        if(choice<=UCNV_RESET_TO_UNICODE) {
  693|       |            myConverterData->isFirstBuffer = true;
  694|       |            myConverterData->key = 0;
  695|       |            if (converter->mode == UCNV_SO){
  696|       |                ucnv_close (myConverterData->currentConverter);
  697|       |                myConverterData->currentConverter=nullptr;
  698|       |            }
  699|       |            converter->mode = UCNV_SI;
  700|       |        }
  701|       |        if(choice!=UCNV_RESET_TO_UNICODE) {
  702|       |            /* re-append UTF-8 escape sequence */
  703|       |            converter->charErrorBufferLength = 3;
  704|       |            converter->charErrorBuffer[0] = 0x1b;
  705|       |            converter->charErrorBuffer[1] = 0x28;
  706|       |            converter->charErrorBuffer[2] = 0x42;
  707|       |        }
  708|       |    }
  709|       |    else
  710|       |#endif
  711|  2.03k|    {
  712|       |        /* reset the state variables */
  713|  2.03k|        if(myConverterData->locale[0] == 'k'){
  ------------------
  |  Branch (713:12): [True: 470, False: 1.56k]
  ------------------
  714|    470|            if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (714:16): [True: 0, False: 470]
  ------------------
  715|      0|                setInitialStateToUnicodeKR(converter, myConverterData);
  716|      0|            }
  717|    470|            if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (717:16): [True: 470, False: 0]
  ------------------
  718|    470|                setInitialStateFromUnicodeKR(converter, myConverterData);
  719|    470|            }
  720|    470|        }
  721|  2.03k|    }
  722|  2.03k|}
ucnv2022.cpp:_ZL18_ISO_2022_WriteSubP25UConverterFromUnicodeArgsiP10UErrorCode:
 3470|  7.97M|_ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err) {
 3471|  7.97M|    UConverter *cnv = args->converter;
 3472|  7.97M|    UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo);
 3473|  7.97M|    ISO2022State *pFromU2022State=&myConverterData->fromU2022State;
 3474|  7.97M|    char *p, *subchar;
 3475|  7.97M|    char buffer[8];
 3476|  7.97M|    int32_t length;
 3477|       |
 3478|  7.97M|    subchar = reinterpret_cast<char*>(cnv->subChars);
 3479|  7.97M|    length=cnv->subCharLen; /* assume length==1 for most variants */
 3480|       |
 3481|  7.97M|    p = buffer;
 3482|  7.97M|    switch(myConverterData->locale[0]){
 3483|   426k|    case 'j':
  ------------------
  |  Branch (3483:5): [True: 426k, False: 7.55M]
  ------------------
 3484|   426k|        {
 3485|   426k|            int8_t cs;
 3486|       |
 3487|   426k|            if(pFromU2022State->g == 1) {
  ------------------
  |  Branch (3487:16): [True: 346, False: 426k]
  ------------------
 3488|       |                /* JIS7: switch from G1 to G0 */
 3489|    346|                pFromU2022State->g = 0;
 3490|    346|                *p++ = UCNV_SI;
  ------------------
  |  |   84|    346|#define  UCNV_SI 0x0F
  ------------------
 3491|    346|            }
 3492|       |
 3493|   426k|            cs = pFromU2022State->cs[0];
 3494|   426k|            if(cs != ASCII && cs != JISX201) {
  ------------------
  |  Branch (3494:16): [True: 288k, False: 137k]
  |  Branch (3494:31): [True: 288k, False: 220]
  ------------------
 3495|       |                /* not in ASCII or JIS X 0201: switch to ASCII */
 3496|   288k|                pFromU2022State->cs[0] = static_cast<int8_t>(ASCII);
 3497|   288k|                *p++ = '\x1b';
 3498|   288k|                *p++ = '\x28';
 3499|   288k|                *p++ = '\x42';
 3500|   288k|            }
 3501|       |
 3502|   426k|            *p++ = subchar[0];
 3503|   426k|            break;
 3504|      0|        }
 3505|  68.6k|    case 'c':
  ------------------
  |  Branch (3505:5): [True: 68.6k, False: 7.90M]
  ------------------
 3506|  68.6k|        if(pFromU2022State->g != 0) {
  ------------------
  |  Branch (3506:12): [True: 9.85k, False: 58.7k]
  ------------------
 3507|       |            /* not in ASCII mode: switch to ASCII */
 3508|  9.85k|            pFromU2022State->g = 0;
 3509|  9.85k|            *p++ = UCNV_SI;
  ------------------
  |  |   84|  9.85k|#define  UCNV_SI 0x0F
  ------------------
 3510|  9.85k|        }
 3511|  68.6k|        *p++ = subchar[0];
 3512|  68.6k|        break;
 3513|  7.48M|    case 'k':
  ------------------
  |  Branch (3513:5): [True: 7.48M, False: 495k]
  ------------------
 3514|  7.48M|        if(myConverterData->version == 0) {
  ------------------
  |  Branch (3514:12): [True: 6.49M, False: 984k]
  ------------------
 3515|  6.49M|            if(length == 1) {
  ------------------
  |  Branch (3515:16): [True: 6.49M, False: 0]
  ------------------
 3516|  6.49M|                if(args->converter->fromUnicodeStatus) {
  ------------------
  |  Branch (3516:20): [True: 6.45M, False: 37.7k]
  ------------------
 3517|       |                    /* in DBCS mode: switch to SBCS */
 3518|  6.45M|                    args->converter->fromUnicodeStatus = 0;
 3519|  6.45M|                    *p++ = UCNV_SI;
  ------------------
  |  |   84|  6.45M|#define  UCNV_SI 0x0F
  ------------------
 3520|  6.45M|                }
 3521|  6.49M|                *p++ = subchar[0];
 3522|  6.49M|            } else /* length == 2*/ {
 3523|      0|                if(!args->converter->fromUnicodeStatus) {
  ------------------
  |  Branch (3523:20): [True: 0, False: 0]
  ------------------
 3524|       |                    /* in SBCS mode: switch to DBCS */
 3525|      0|                    args->converter->fromUnicodeStatus = 1;
 3526|      0|                    *p++ = UCNV_SO;
  ------------------
  |  |   86|      0|#define  UCNV_SO 0x0E
  ------------------
 3527|      0|                }
 3528|      0|                *p++ = subchar[0];
 3529|      0|                *p++ = subchar[1];
 3530|      0|            }
 3531|  6.49M|            break;
 3532|  6.49M|        } else {
 3533|       |            /* save the subconverter's substitution string */
 3534|   984k|            uint8_t *currentSubChars = myConverterData->currentConverter->subChars;
 3535|   984k|            int8_t currentSubCharLen = myConverterData->currentConverter->subCharLen;
 3536|       |
 3537|       |            /* set our substitution string into the subconverter */
 3538|   984k|            myConverterData->currentConverter->subChars = reinterpret_cast<uint8_t*>(subchar);
 3539|   984k|            myConverterData->currentConverter->subCharLen = static_cast<int8_t>(length);
 3540|       |
 3541|       |            /* let the subconverter write the subchar, set/retrieve fromUChar32 state */
 3542|   984k|            args->converter = myConverterData->currentConverter;
 3543|   984k|            myConverterData->currentConverter->fromUChar32 = cnv->fromUChar32;
 3544|   984k|            ucnv_cbFromUWriteSub(args, 0, err);
  ------------------
  |  |  634|   984k|#define ucnv_cbFromUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteSub)
  |  |  ------------------
  |  |  |  |  123|   984k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|   984k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|   984k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3545|   984k|            cnv->fromUChar32 = myConverterData->currentConverter->fromUChar32;
 3546|   984k|            args->converter = cnv;
 3547|       |
 3548|       |            /* restore the subconverter's substitution string */
 3549|   984k|            myConverterData->currentConverter->subChars = currentSubChars;
 3550|   984k|            myConverterData->currentConverter->subCharLen = currentSubCharLen;
 3551|       |
 3552|   984k|            if(*err == U_BUFFER_OVERFLOW_ERROR) {
  ------------------
  |  Branch (3552:16): [True: 69, False: 984k]
  ------------------
 3553|     69|                if(myConverterData->currentConverter->charErrorBufferLength > 0) {
  ------------------
  |  Branch (3553:20): [True: 69, False: 0]
  ------------------
 3554|     69|                    uprv_memcpy(
  ------------------
  |  |   42|     69|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     69|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     69|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     69|    _Pragma("clang diagnostic push") \
  |  |   45|     69|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     69|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     69|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     69|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     69|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     69|    _Pragma("clang diagnostic pop") \
  |  |   49|     69|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     69|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     69|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     69|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3555|     69|                        cnv->charErrorBuffer,
 3556|     69|                        myConverterData->currentConverter->charErrorBuffer,
 3557|     69|                        myConverterData->currentConverter->charErrorBufferLength);
 3558|     69|                }
 3559|     69|                cnv->charErrorBufferLength = myConverterData->currentConverter->charErrorBufferLength;
 3560|     69|                myConverterData->currentConverter->charErrorBufferLength = 0;
 3561|     69|            }
 3562|   984k|            return;
 3563|   984k|        }
 3564|      0|    default:
  ------------------
  |  Branch (3564:5): [True: 0, False: 7.97M]
  ------------------
 3565|       |        /* not expected */
 3566|      0|        break;
 3567|  7.97M|    }
 3568|  6.99M|    ucnv_cbFromUWriteBytes(args,
  ------------------
  |  |  633|  6.99M|#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  6.99M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  6.99M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  6.99M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3569|  6.99M|                           buffer, static_cast<int32_t>(p - buffer),
 3570|  6.99M|                           offsetIndex, err);
 3571|  6.99M|}

ucnv_enableCleanup_78:
  265|      2|ucnv_enableCleanup() {
  266|      2|    ucln_common_registerCleanup(UCLN_COMMON_UCNV, ucnv_cleanup);
  ------------------
  |  |  617|      2|#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup)
  |  |  ------------------
  |  |  |  |  123|      2|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      2|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      2|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  267|      2|}
ucnv_load_78:
  543|  35.0k|ucnv_load(UConverterLoadArgs *pArgs, UErrorCode *err) {
  544|  35.0k|    UConverterSharedData *mySharedConverterData;
  545|       |
  546|  35.0k|    if(err == nullptr || U_FAILURE(*err)) {
  ------------------
  |  Branch (546:8): [True: 0, False: 35.0k]
  |  Branch (546:26): [True: 0, False: 35.0k]
  ------------------
  547|      0|        return nullptr;
  548|      0|    }
  549|       |
  550|  35.0k|    if(pArgs->pkg != nullptr && *pArgs->pkg != 0) {
  ------------------
  |  Branch (550:8): [True: 0, False: 35.0k]
  |  Branch (550:33): [True: 0, False: 0]
  ------------------
  551|       |        /* application-provided converters are not currently cached */
  552|      0|        return createConverterFromFile(pArgs, err);
  553|      0|    }
  554|       |
  555|  35.0k|    mySharedConverterData = ucnv_getSharedConverterData(pArgs->name);
  556|  35.0k|    if (mySharedConverterData == nullptr)
  ------------------
  |  Branch (556:9): [True: 555, False: 34.4k]
  ------------------
  557|    555|    {
  558|       |        /*Not cached, we need to stream it in from file */
  559|    555|        mySharedConverterData = createConverterFromFile(pArgs, err);
  560|    555|        if (U_FAILURE (*err) || (mySharedConverterData == nullptr))
  ------------------
  |  Branch (560:13): [True: 133, False: 422]
  |  Branch (560:33): [True: 0, False: 422]
  ------------------
  561|    133|        {
  562|    133|            return nullptr;
  563|    133|        }
  564|    422|        else if (!pArgs->onlyTestIsLoadable)
  ------------------
  |  Branch (564:18): [True: 171, False: 251]
  ------------------
  565|    171|        {
  566|       |            /* share it with other library clients */
  567|    171|            ucnv_shareConverterData(mySharedConverterData);
  568|    171|        }
  569|    555|    }
  570|  34.4k|    else
  571|  34.4k|    {
  572|       |        /* The data for this converter was already in the cache.            */
  573|       |        /* Update the reference counter on the shared data: one more client */
  574|  34.4k|        mySharedConverterData->referenceCounter++;
  575|  34.4k|    }
  576|       |
  577|  34.9k|    return mySharedConverterData;
  578|  35.0k|}
ucnv_unload_78:
  586|  34.8k|ucnv_unload(UConverterSharedData *sharedData) {
  587|  34.8k|    if(sharedData != nullptr) {
  ------------------
  |  Branch (587:8): [True: 34.8k, False: 0]
  ------------------
  588|  34.8k|        if (sharedData->referenceCounter > 0) {
  ------------------
  |  Branch (588:13): [True: 34.8k, False: 0]
  ------------------
  589|  34.8k|            sharedData->referenceCounter--;
  590|  34.8k|        }
  591|       |
  592|  34.8k|        if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == false)) {
  ------------------
  |  Branch (592:12): [True: 33.9k, False: 926]
  |  Branch (592:49): [True: 251, False: 33.7k]
  ------------------
  593|    251|            ucnv_deleteSharedConverterData(sharedData);
  594|    251|        }
  595|  34.8k|    }
  596|  34.8k|}
ucnv_unloadSharedDataIfReady_78:
  600|  35.1k|{
  601|  35.1k|    if(sharedData != nullptr && sharedData->isReferenceCounted) {
  ------------------
  |  Branch (601:8): [True: 34.9k, False: 266]
  |  Branch (601:33): [True: 34.8k, False: 44]
  ------------------
  602|  34.8k|        umtx_lock(&cnvCacheMutex);
  ------------------
  |  | 1250|  34.8k|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|  34.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  34.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  34.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  603|  34.8k|        ucnv_unload(sharedData);
  ------------------
  |  |  725|  34.8k|#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload)
  |  |  ------------------
  |  |  |  |  123|  34.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  34.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  34.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  604|  34.8k|        umtx_unlock(&cnvCacheMutex);
  ------------------
  |  | 1251|  34.8k|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|  34.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  34.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  34.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  605|  34.8k|    }
  606|  35.1k|}
ucnv_loadSharedData_78:
  715|  40.9k|                    UErrorCode * err) {
  716|  40.9k|    UConverterNamePieces stackPieces;
  717|  40.9k|    UConverterLoadArgs stackArgs;
  718|  40.9k|    UConverterSharedData *mySharedConverterData = nullptr;
  719|  40.9k|    UErrorCode internalErrorCode = U_ZERO_ERROR;
  720|  40.9k|    UBool mayContainOption = true;
  721|  40.9k|    UBool checkForAlgorithmic = true;
  722|       |
  723|  40.9k|    if (U_FAILURE (*err)) {
  ------------------
  |  Branch (723:9): [True: 0, False: 40.9k]
  ------------------
  724|      0|        return nullptr;
  725|      0|    }
  726|       |
  727|  40.9k|    if(pPieces == nullptr) {
  ------------------
  |  Branch (727:8): [True: 0, False: 40.9k]
  ------------------
  728|      0|        if(pArgs != nullptr) {
  ------------------
  |  Branch (728:12): [True: 0, False: 0]
  ------------------
  729|       |            /*
  730|       |             * Bad: We may set pArgs pointers to stackPieces fields
  731|       |             * which will be invalid after this function returns.
  732|       |             */
  733|      0|            *err = U_INTERNAL_PROGRAM_ERROR;
  734|      0|            return nullptr;
  735|      0|        }
  736|      0|        pPieces = &stackPieces;
  737|      0|    }
  738|  40.9k|    if(pArgs == nullptr) {
  ------------------
  |  Branch (738:8): [True: 0, False: 40.9k]
  ------------------
  739|      0|        uprv_memset(&stackArgs, 0, sizeof(stackArgs));
  ------------------
  |  |  100|      0|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  740|      0|        stackArgs.size = (int32_t)sizeof(stackArgs);
  741|      0|        pArgs = &stackArgs;
  742|      0|    }
  743|       |
  744|  40.9k|    pPieces->cnvName[0] = 0;
  745|  40.9k|    pPieces->locale[0] = 0;
  746|  40.9k|    pPieces->options = 0;
  747|       |
  748|  40.9k|    pArgs->name = converterName;
  749|  40.9k|    pArgs->locale = pPieces->locale;
  750|  40.9k|    pArgs->options = pPieces->options;
  751|       |
  752|       |    /* In case "name" is nullptr we want to open the default converter. */
  753|  40.9k|    if (converterName == nullptr) {
  ------------------
  |  Branch (753:9): [True: 1, False: 40.9k]
  ------------------
  754|      1|#if U_CHARSET_IS_UTF8
  755|      1|        pArgs->name = "UTF-8";
  756|      1|        return (UConverterSharedData *)converterData[UCNV_UTF8];
  757|       |#else
  758|       |        /* Call ucnv_getDefaultName first to query the name from the OS. */
  759|       |        pArgs->name = ucnv_getDefaultName();
  760|       |        if (pArgs->name == nullptr) {
  761|       |            *err = U_MISSING_RESOURCE_ERROR;
  762|       |            return nullptr;
  763|       |        }
  764|       |        mySharedConverterData = (UConverterSharedData *)gDefaultAlgorithmicSharedData;
  765|       |        checkForAlgorithmic = false;
  766|       |        mayContainOption = gDefaultConverterContainsOption;
  767|       |        /* the default converter name is already canonical */
  768|       |#endif
  769|      1|    }
  770|  40.9k|    else if(UCNV_FAST_IS_UTF8(converterName)) {
  ------------------
  |  |   40|  40.9k|    (((name[0]=='U' ? \
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 675, False: 40.2k]
  |  |  |  Branch (40:8): [True: 725, False: 40.2k]
  |  |  ------------------
  |  |   41|  40.9k|      (                name[1]=='T' && name[2]=='F') : \
  |  |  ------------------
  |  |  |  Branch (41:24): [True: 675, False: 50]
  |  |  |  Branch (41:40): [True: 675, False: 0]
  |  |  ------------------
  |  |   42|  40.9k|      (name[0]=='u' && name[1]=='t' && name[2]=='f'))) \
  |  |  ------------------
  |  |  |  Branch (42:8): [True: 0, False: 40.2k]
  |  |  |  Branch (42:24): [True: 0, False: 0]
  |  |  |  Branch (42:40): [True: 0, False: 0]
  |  |  ------------------
  |  |   43|  40.9k|  && (name[3]=='-' ? \
  |  |  ------------------
  |  |  |  Branch (43:6): [True: 123, False: 552]
  |  |  |  Branch (43:7): [True: 563, False: 112]
  |  |  ------------------
  |  |   44|    675|     (name[4]=='8' && name[5]==0) : \
  |  |  ------------------
  |  |  |  Branch (44:7): [True: 123, False: 440]
  |  |  |  Branch (44:23): [True: 123, False: 0]
  |  |  ------------------
  |  |   45|    675|     (name[3]=='8' && name[4]==0)))
  |  |  ------------------
  |  |  |  Branch (45:7): [True: 0, False: 112]
  |  |  |  Branch (45:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  771|       |        /* fastpath for UTF-8 */
  772|    123|        pArgs->name = "UTF-8";
  773|    123|        return (UConverterSharedData *)converterData[UCNV_UTF8];
  774|    123|    }
  775|  40.8k|    else {
  776|       |        /* separate the converter name from the options */
  777|  40.8k|        parseConverterOptions(converterName, pPieces, pArgs, err);
  778|  40.8k|        if (U_FAILURE(*err)) {
  ------------------
  |  Branch (778:13): [True: 0, False: 40.8k]
  ------------------
  779|       |            /* Very bad name used. */
  780|      0|            return nullptr;
  781|      0|        }
  782|       |
  783|       |        /* get the canonical converter name */
  784|  40.8k|        pArgs->name = ucnv_io_getConverterName(pArgs->name, &mayContainOption, &internalErrorCode);
  ------------------
  |  |  694|  40.8k|#define ucnv_io_getConverterName U_ICU_ENTRY_POINT_RENAME(ucnv_io_getConverterName)
  |  |  ------------------
  |  |  |  |  123|  40.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  40.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  40.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  785|  40.8k|        if (U_FAILURE(internalErrorCode) || pArgs->name == nullptr) {
  ------------------
  |  Branch (785:13): [True: 0, False: 40.8k]
  |  Branch (785:45): [True: 17.4k, False: 23.3k]
  ------------------
  786|       |            /*
  787|       |            * set the input name in case the converter was added
  788|       |            * without updating the alias table, or when there is no alias table
  789|       |            */
  790|  17.4k|            pArgs->name = pPieces->cnvName;
  791|  23.3k|        } else if (internalErrorCode == U_AMBIGUOUS_ALIAS_WARNING) {
  ------------------
  |  Branch (791:20): [True: 3.47k, False: 19.8k]
  ------------------
  792|  3.47k|            *err = U_AMBIGUOUS_ALIAS_WARNING;
  793|  3.47k|        }
  794|  40.8k|    }
  795|       |
  796|       |    /* separate the converter name from the options */
  797|  40.8k|    if(mayContainOption && pArgs->name != pPieces->cnvName) {
  ------------------
  |  Branch (797:8): [True: 17.4k, False: 23.3k]
  |  Branch (797:28): [True: 0, False: 17.4k]
  ------------------
  798|      0|        parseConverterOptions(pArgs->name, pPieces, pArgs, err);
  799|      0|    }
  800|       |
  801|       |    /* get the shared data for an algorithmic converter, if it is one */
  802|  40.8k|    if (checkForAlgorithmic) {
  ------------------
  |  Branch (802:9): [True: 40.8k, False: 0]
  ------------------
  803|  40.8k|        mySharedConverterData = (UConverterSharedData *)getAlgorithmicTypeFromName(pArgs->name);
  804|  40.8k|    }
  805|  40.8k|    if (mySharedConverterData == nullptr)
  ------------------
  |  Branch (805:9): [True: 35.0k, False: 5.79k]
  ------------------
  806|  35.0k|    {
  807|       |        /* it is a data-based converter, get its shared data.               */
  808|       |        /* Hold the cnvCacheMutex through the whole process of checking the */
  809|       |        /*   converter data cache, and adding new entries to the cache      */
  810|       |        /*   to prevent other threads from modifying the cache during the   */
  811|       |        /*   process.                                                       */
  812|  35.0k|        pArgs->nestedLoads=1;
  813|  35.0k|        pArgs->pkg=nullptr;
  814|       |
  815|  35.0k|        umtx_lock(&cnvCacheMutex);
  ------------------
  |  | 1250|  35.0k|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|  35.0k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  35.0k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  35.0k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  816|  35.0k|        mySharedConverterData = ucnv_load(pArgs, err);
  ------------------
  |  |  699|  35.0k|#define ucnv_load U_ICU_ENTRY_POINT_RENAME(ucnv_load)
  |  |  ------------------
  |  |  |  |  123|  35.0k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  35.0k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  35.0k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  817|  35.0k|        umtx_unlock(&cnvCacheMutex);
  ------------------
  |  | 1251|  35.0k|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|  35.0k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  35.0k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  35.0k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  818|  35.0k|        if (U_FAILURE (*err) || (mySharedConverterData == nullptr))
  ------------------
  |  Branch (818:13): [True: 133, False: 34.8k]
  |  Branch (818:33): [True: 0, False: 34.8k]
  ------------------
  819|    133|        {
  820|    133|            return nullptr;
  821|    133|        }
  822|  35.0k|    }
  823|       |
  824|  40.6k|    return mySharedConverterData;
  825|  40.8k|}
ucnv_createConverter_78:
  829|  7.49k|{
  830|  7.49k|    UConverterNamePieces stackPieces;
  831|  7.49k|    UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
  ------------------
  |  |   62|  7.49k|    { (int32_t)sizeof(UConverterLoadArgs), 0, false, false, 0, 0, NULL, NULL, NULL }
  ------------------
  832|  7.49k|    UConverterSharedData *mySharedConverterData;
  833|       |
  834|  7.49k|    UTRACE_ENTRY_OC(UTRACE_UCNV_OPEN);
  835|       |
  836|  7.49k|    if(U_SUCCESS(*err)) {
  ------------------
  |  Branch (836:8): [True: 7.49k, False: 0]
  ------------------
  837|  7.49k|        UTRACE_DATA1(UTRACE_OPEN_CLOSE, "open converter %s", converterName);
  838|       |
  839|  7.49k|        mySharedConverterData = ucnv_loadSharedData(converterName, &stackPieces, &stackArgs, err);
  ------------------
  |  |  700|  7.49k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  840|       |
  841|  7.49k|        myUConverter = ucnv_createConverterFromSharedData(
  ------------------
  |  |  649|  7.49k|#define ucnv_createConverterFromSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_createConverterFromSharedData)
  |  |  ------------------
  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  842|  7.49k|            myUConverter, mySharedConverterData,
  843|  7.49k|            &stackArgs,
  844|  7.49k|            err);
  845|       |
  846|  7.49k|        if(U_SUCCESS(*err)) {
  ------------------
  |  Branch (846:12): [True: 7.49k, False: 0]
  ------------------
  847|  7.49k|            UTRACE_EXIT_PTR_STATUS(myUConverter, *err);
  848|  7.49k|            return myUConverter;
  849|  7.49k|        }
  850|  7.49k|    }
  851|       |
  852|       |    /* exit with error */
  853|      0|    UTRACE_EXIT_STATUS(*err);
  854|      0|    return nullptr;
  855|  7.49k|}
ucnv_canCreateConverter_78:
  858|    368|ucnv_canCreateConverter(const char *converterName, UErrorCode *err) {
  859|    368|    UConverter myUConverter;
  860|    368|    UConverterNamePieces stackPieces;
  861|    368|    UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
  ------------------
  |  |   62|    368|    { (int32_t)sizeof(UConverterLoadArgs), 0, false, false, 0, 0, NULL, NULL, NULL }
  ------------------
  862|    368|    UConverterSharedData *mySharedConverterData;
  863|       |
  864|    368|    UTRACE_ENTRY_OC(UTRACE_UCNV_OPEN);
  865|       |
  866|    368|    if(U_SUCCESS(*err)) {
  ------------------
  |  Branch (866:8): [True: 368, False: 0]
  ------------------
  867|    368|        UTRACE_DATA1(UTRACE_OPEN_CLOSE, "test if can open converter %s", converterName);
  868|       |
  869|    368|        stackArgs.onlyTestIsLoadable=true;
  870|    368|        mySharedConverterData = ucnv_loadSharedData(converterName, &stackPieces, &stackArgs, err);
  ------------------
  |  |  700|    368|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|    368|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    368|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    368|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  871|    368|        ucnv_createConverterFromSharedData(
  ------------------
  |  |  649|    368|#define ucnv_createConverterFromSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_createConverterFromSharedData)
  |  |  ------------------
  |  |  |  |  123|    368|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    368|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    368|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  872|    368|            &myUConverter, mySharedConverterData,
  873|    368|            &stackArgs,
  874|    368|            err);
  875|    368|        ucnv_unloadSharedDataIfReady(mySharedConverterData);
  ------------------
  |  |  726|    368|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|    368|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    368|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    368|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  876|    368|    }
  877|       |
  878|    368|    UTRACE_EXIT_STATUS(*err);
  879|    368|    return U_SUCCESS(*err);
  880|    368|}
ucnv_createConverterFromSharedData_78:
  976|  7.86k|{
  977|  7.86k|    UBool isCopyLocal;
  978|       |
  979|  7.86k|    if(U_FAILURE(*err)) {
  ------------------
  |  Branch (979:8): [True: 133, False: 7.73k]
  ------------------
  980|    133|        ucnv_unloadSharedDataIfReady(mySharedConverterData);
  ------------------
  |  |  726|    133|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|    133|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    133|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    133|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  981|    133|        return myUConverter;
  982|    133|    }
  983|  7.73k|    if(myUConverter == nullptr)
  ------------------
  |  Branch (983:8): [True: 7.49k, False: 236]
  ------------------
  984|  7.49k|    {
  985|  7.49k|        myUConverter = (UConverter *) uprv_malloc (sizeof (UConverter));
  ------------------
  |  | 1524|  7.49k|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  986|  7.49k|        if(myUConverter == nullptr)
  ------------------
  |  Branch (986:12): [True: 0, False: 7.49k]
  ------------------
  987|      0|        {
  988|      0|            *err = U_MEMORY_ALLOCATION_ERROR;
  989|      0|            ucnv_unloadSharedDataIfReady(mySharedConverterData);
  ------------------
  |  |  726|      0|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  990|      0|            return nullptr;
  991|      0|        }
  992|  7.49k|        isCopyLocal = false;
  993|  7.49k|    } else {
  994|    236|        isCopyLocal = true;
  995|    236|    }
  996|       |
  997|       |    /* initialize the converter */
  998|  7.73k|    uprv_memset(myUConverter, 0, sizeof(UConverter));
  ------------------
  |  |  100|  7.73k|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|  7.73k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  999|  7.73k|    myUConverter->isCopyLocal = isCopyLocal;
 1000|       |    /*myUConverter->isExtraLocal = false;*/ /* Set by the memset call */
 1001|  7.73k|    myUConverter->sharedData = mySharedConverterData;
 1002|  7.73k|    myUConverter->options = pArgs->options;
 1003|  7.73k|    if(!pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (1003:8): [True: 7.49k, False: 235]
  ------------------
 1004|  7.49k|        myUConverter->preFromUFirstCP = U_SENTINEL;
  ------------------
  |  |  469|  7.49k|#define U_SENTINEL (-1)
  ------------------
 1005|  7.49k|        myUConverter->fromCharErrorBehaviour = UCNV_TO_U_DEFAULT_CALLBACK;
  ------------------
  |  |  134|  7.49k|#define UCNV_TO_U_DEFAULT_CALLBACK ((UConverterToUCallback) UCNV_TO_U_CALLBACK_SUBSTITUTE)
  |  |  ------------------
  |  |  |  |   78|  7.49k|#define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SUBSTITUTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1006|  7.49k|        myUConverter->fromUCharErrorBehaviour = UCNV_FROM_U_DEFAULT_CALLBACK;
  ------------------
  |  |  135|  7.49k|#define UCNV_FROM_U_DEFAULT_CALLBACK ((UConverterFromUCallback) UCNV_FROM_U_CALLBACK_SUBSTITUTE)
  |  |  ------------------
  |  |  |  |   74|  7.49k|#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SUBSTITUTE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  7.49k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  7.49k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  7.49k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1007|  7.49k|        myUConverter->toUnicodeStatus = mySharedConverterData->toUnicodeStatus;
 1008|  7.49k|        myUConverter->maxBytesPerUChar = mySharedConverterData->staticData->maxBytesPerChar;
 1009|  7.49k|        myUConverter->subChar1 = mySharedConverterData->staticData->subChar1;
 1010|  7.49k|        myUConverter->subCharLen = mySharedConverterData->staticData->subCharLen;
 1011|  7.49k|        myUConverter->subChars = (uint8_t *)myUConverter->subUChars;
 1012|  7.49k|        uprv_memcpy(myUConverter->subChars, mySharedConverterData->staticData->subChar, myUConverter->subCharLen);
  ------------------
  |  |   42|  7.49k|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  7.49k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  7.49k|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  7.49k|    _Pragma("clang diagnostic push") \
  |  |   45|  7.49k|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  7.49k|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  7.49k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  7.49k|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  7.49k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  7.49k|    _Pragma("clang diagnostic pop") \
  |  |   49|  7.49k|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  7.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  7.49k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  7.49k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1013|  7.49k|        myUConverter->toUCallbackReason = UCNV_ILLEGAL; /* default reason to invoke (*fromCharErrorBehaviour) */
 1014|  7.49k|    }
 1015|       |
 1016|  7.73k|    if(mySharedConverterData->impl->open != nullptr) {
  ------------------
  |  Branch (1016:8): [True: 6.74k, False: 988]
  ------------------
 1017|  6.74k|        mySharedConverterData->impl->open(myUConverter, pArgs, err);
 1018|  6.74k|        if(U_FAILURE(*err) && !pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (1018:12): [True: 0, False: 6.74k]
  |  Branch (1018:31): [True: 0, False: 0]
  ------------------
 1019|       |            /* don't ucnv_close() if onlyTestIsLoadable because not fully initialized */
 1020|      0|            ucnv_close(myUConverter);
  ------------------
  |  |  639|      0|#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1021|      0|            return nullptr;
 1022|      0|        }
 1023|  6.74k|    }
 1024|       |
 1025|  7.73k|    return myUConverter;
 1026|  7.73k|}
ucnv_bld_countAvailableConverters_78:
 1146|  7.02k|ucnv_bld_countAvailableConverters(UErrorCode *pErrorCode) {
 1147|  7.02k|    if (haveAvailableConverterList(pErrorCode)) {
  ------------------
  |  Branch (1147:9): [True: 7.02k, False: 0]
  ------------------
 1148|  7.02k|        return gAvailableConverterCount;
 1149|  7.02k|    }
 1150|      0|    return 0;
 1151|  7.02k|}
ucnv_bld_getAvailableConverter_78:
 1154|  7.02k|ucnv_bld_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode) {
 1155|  7.02k|    if (haveAvailableConverterList(pErrorCode)) {
  ------------------
  |  Branch (1155:9): [True: 7.02k, False: 0]
  ------------------
 1156|  7.02k|        if (n < gAvailableConverterCount) {
  ------------------
  |  Branch (1156:13): [True: 7.02k, False: 0]
  ------------------
 1157|  7.02k|            return gAvailableConverters[n];
 1158|  7.02k|        }
 1159|      0|        *pErrorCode = U_INDEX_OUTOFBOUNDS_ERROR;
 1160|      0|    }
 1161|      0|    return nullptr;
 1162|  7.02k|}
ucnv_bld.cpp:_ZL23createConverterFromFileP18UConverterLoadArgsP10UErrorCode:
  341|    555|{
  342|    555|    UDataMemory *data;
  343|    555|    UConverterSharedData *sharedData;
  344|       |
  345|    555|    UTRACE_ENTRY_OC(UTRACE_UCNV_LOAD);
  346|       |
  347|    555|    if (U_FAILURE (*err)) {
  ------------------
  |  Branch (347:9): [True: 0, False: 555]
  ------------------
  348|      0|        UTRACE_EXIT_STATUS(*err);
  349|      0|        return nullptr;
  350|      0|    }
  351|       |
  352|    555|    UTRACE_DATA2(UTRACE_OPEN_CLOSE, "load converter %s from package %s", pArgs->name, pArgs->pkg);
  353|       |
  354|    555|    data = udata_openChoice(pArgs->pkg, DATA_TYPE, pArgs->name, isCnvAcceptable, nullptr, err);
  ------------------
  |  |  894|    555|#define udata_openChoice U_ICU_ENTRY_POINT_RENAME(udata_openChoice)
  |  |  ------------------
  |  |  |  |  123|    555|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    555|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    555|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  355|    555|    if(U_FAILURE(*err))
  ------------------
  |  Branch (355:8): [True: 133, False: 422]
  ------------------
  356|    133|    {
  357|    133|        UTRACE_EXIT_STATUS(*err);
  358|    133|        return nullptr;
  359|    133|    }
  360|       |
  361|    422|    sharedData = ucnv_data_unFlattenClone(pArgs, data, err);
  362|    422|    if(U_FAILURE(*err))
  ------------------
  |  Branch (362:8): [True: 0, False: 422]
  ------------------
  363|      0|    {
  364|      0|        udata_close(data);
  ------------------
  |  |  885|      0|#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  365|      0|        UTRACE_EXIT_STATUS(*err);
  366|      0|        return nullptr;
  367|      0|    }
  368|       |
  369|       |    /*
  370|       |     * TODO Store pkg in a field in the shared data so that delta-only converters
  371|       |     * can load base converters from the same package.
  372|       |     * If the pkg name is longer than the field, then either do not load the converter
  373|       |     * in the first place, or just set the pkg field to "".
  374|       |     */
  375|       |
  376|    422|    UTRACE_EXIT_PTR_STATUS(sharedData, *err);
  377|    422|    return sharedData;
  378|    422|}
ucnv_bld.cpp:_ZL15isCnvAcceptablePvPKcS1_PK9UDataInfo:
  272|    422|                const UDataInfo *pInfo) {
  273|    422|    return
  274|    422|        pInfo->size>=20 &&
  ------------------
  |  Branch (274:9): [True: 422, False: 0]
  ------------------
  275|    422|        pInfo->isBigEndian==U_IS_BIG_ENDIAN &&
  ------------------
  |  |  353|    844|#   define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  ------------------
  |  Branch (275:9): [True: 422, False: 0]
  ------------------
  276|    422|        pInfo->charsetFamily==U_CHARSET_FAMILY &&
  ------------------
  |  |  588|    422|#   define U_CHARSET_FAMILY U_ASCII_FAMILY
  |  |  ------------------
  |  |  |  |  531|    844|#define U_ASCII_FAMILY 0
  |  |  ------------------
  ------------------
  |  Branch (276:9): [True: 422, False: 0]
  ------------------
  277|    422|        pInfo->sizeofUChar==U_SIZEOF_UCHAR &&
  ------------------
  |  |  352|    844|#define U_SIZEOF_UCHAR 2
  ------------------
  |  Branch (277:9): [True: 422, False: 0]
  ------------------
  278|    422|        pInfo->dataFormat[0]==0x63 &&   /* dataFormat="cnvt" */
  ------------------
  |  Branch (278:9): [True: 422, False: 0]
  ------------------
  279|    422|        pInfo->dataFormat[1]==0x6e &&
  ------------------
  |  Branch (279:9): [True: 422, False: 0]
  ------------------
  280|    422|        pInfo->dataFormat[2]==0x76 &&
  ------------------
  |  Branch (280:9): [True: 422, False: 0]
  ------------------
  281|    422|        pInfo->dataFormat[3]==0x74 &&
  ------------------
  |  Branch (281:9): [True: 422, False: 0]
  ------------------
  282|    422|        pInfo->formatVersion[0]==6;  /* Everything will be version 6 */
  ------------------
  |  Branch (282:9): [True: 422, False: 0]
  ------------------
  283|    422|}
ucnv_bld.cpp:_ZL24ucnv_data_unFlattenCloneP18UConverterLoadArgsP11UDataMemoryP10UErrorCode:
  290|    422|{
  291|       |    /* UDataInfo info; -- necessary only if some converters have different formatVersion */
  292|    422|    const uint8_t* raw = static_cast<const uint8_t*>(udata_getMemory(pData));
  ------------------
  |  |  891|    422|#define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory)
  |  |  ------------------
  |  |  |  |  123|    422|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    422|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    422|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  293|    422|    const UConverterStaticData* source = reinterpret_cast<const UConverterStaticData*>(raw);
  294|    422|    UConverterSharedData *data;
  295|    422|    UConverterType type = static_cast<UConverterType>(source->conversionType);
  296|       |
  297|    422|    if(U_FAILURE(*status))
  ------------------
  |  Branch (297:8): [True: 0, False: 422]
  ------------------
  298|      0|        return nullptr;
  299|       |
  300|    422|    if (static_cast<uint16_t>(type) >= UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES ||
  ------------------
  |  Branch (300:9): [True: 0, False: 422]
  ------------------
  301|    422|        converterData[type] == nullptr ||
  ------------------
  |  Branch (301:9): [True: 0, False: 422]
  ------------------
  302|    422|        !converterData[type]->isReferenceCounted ||
  ------------------
  |  Branch (302:9): [True: 0, False: 422]
  ------------------
  303|    422|        converterData[type]->referenceCounter != 1 ||
  ------------------
  |  Branch (303:9): [True: 0, False: 422]
  ------------------
  304|    422|        source->structSize != sizeof(UConverterStaticData))
  ------------------
  |  Branch (304:9): [True: 0, False: 422]
  ------------------
  305|      0|    {
  306|      0|        *status = U_INVALID_TABLE_FORMAT;
  307|      0|        return nullptr;
  308|      0|    }
  309|       |
  310|    422|    data = static_cast<UConverterSharedData*>(uprv_malloc(sizeof(UConverterSharedData)));
  ------------------
  |  | 1524|    422|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|    422|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    422|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    422|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  311|    422|    if(data == nullptr) {
  ------------------
  |  Branch (311:8): [True: 0, False: 422]
  ------------------
  312|      0|        *status = U_MEMORY_ALLOCATION_ERROR;
  313|      0|        return nullptr;
  314|      0|    }
  315|       |
  316|       |    /* copy initial values from the static structure for this type */
  317|    422|    uprv_memcpy(data, converterData[type], sizeof(UConverterSharedData));
  ------------------
  |  |   42|    422|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    422|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|    422|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|    422|    _Pragma("clang diagnostic push") \
  |  |   45|    422|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|    422|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|    422|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|    422|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|    422|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|    422|    _Pragma("clang diagnostic pop") \
  |  |   49|    422|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|    422|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|    422|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    422|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  318|       |
  319|    422|    data->staticData = source;
  320|       |
  321|    422|    data->sharedDataCached = false;
  322|       |
  323|       |    /* fill in fields from the loaded data */
  324|    422|    data->dataMemory = (void*)pData; /* for future use */
  325|       |
  326|    422|    if(data->impl->load != nullptr) {
  ------------------
  |  Branch (326:8): [True: 422, False: 0]
  ------------------
  327|    422|        data->impl->load(data, pArgs, raw + source->structSize, status);
  328|    422|        if(U_FAILURE(*status)) {
  ------------------
  |  Branch (328:12): [True: 0, False: 422]
  ------------------
  329|      0|            uprv_free(data);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  330|      0|            return nullptr;
  331|      0|        }
  332|    422|    }
  333|    422|    return data;
  334|    422|}
ucnv_bld.cpp:_ZL27ucnv_getSharedConverterDataPKc:
  484|  35.0k|{
  485|       |    /*special case when no Table has yet been created we return nullptr */
  486|  35.0k|    if (SHARED_DATA_HASHTABLE == nullptr)
  ------------------
  |  Branch (486:9): [True: 167, False: 34.8k]
  ------------------
  487|    167|    {
  488|    167|        return nullptr;
  489|    167|    }
  490|  34.8k|    else
  491|  34.8k|    {
  492|  34.8k|        UConverterSharedData *rc;
  493|       |
  494|  34.8k|        rc = static_cast<UConverterSharedData*>(uhash_get(SHARED_DATA_HASHTABLE, name));
  ------------------
  |  | 1007|  34.8k|#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get)
  |  |  ------------------
  |  |  |  |  123|  34.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  34.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  34.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  34.8k|        UCNV_DEBUG_LOG("get",name,rc);
  496|  34.8k|        return rc;
  497|  34.8k|    }
  498|  35.0k|}
ucnv_bld.cpp:_ZL23ucnv_shareConverterDataP20UConverterSharedData:
  437|    171|{
  438|    171|    UErrorCode err = U_ZERO_ERROR;
  439|       |    /*Lazy evaluates the Hashtable itself */
  440|       |    /*void *sanity = nullptr;*/
  441|       |
  442|    171|    if (SHARED_DATA_HASHTABLE == nullptr)
  ------------------
  |  Branch (442:9): [True: 1, False: 170]
  ------------------
  443|      1|    {
  444|      1|        SHARED_DATA_HASHTABLE = uhash_openSize(uhash_hashChars, uhash_compareChars, nullptr,
  ------------------
  |  | 1031|      1|#define uhash_openSize U_ICU_ENTRY_POINT_RENAME(uhash_openSize)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      SHARED_DATA_HASHTABLE = uhash_openSize(uhash_hashChars, uhash_compareChars, nullptr,
  ------------------
  |  | 1011|      1|#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      SHARED_DATA_HASHTABLE = uhash_openSize(uhash_hashChars, uhash_compareChars, nullptr,
  ------------------
  |  |  993|      1|#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  445|      1|                            ucnv_io_countKnownConverters(&err)*UCNV_CACHE_LOAD_FACTOR,
  ------------------
  |  |  693|      1|#define ucnv_io_countKnownConverters U_ICU_ENTRY_POINT_RENAME(ucnv_io_countKnownConverters)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                          ucnv_io_countKnownConverters(&err)*UCNV_CACHE_LOAD_FACTOR,
  ------------------
  |  |  427|      1|#define UCNV_CACHE_LOAD_FACTOR 2
  ------------------
  446|      1|                            &err);
  447|      1|        ucnv_enableCleanup();
  ------------------
  |  |  651|      1|#define ucnv_enableCleanup U_ICU_ENTRY_POINT_RENAME(ucnv_enableCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|       |
  449|      1|        if (U_FAILURE(err))
  ------------------
  |  Branch (449:13): [True: 0, False: 1]
  ------------------
  450|      0|            return;
  451|      1|    }
  452|       |
  453|       |    /* ### check to see if the element is not already there! */
  454|       |
  455|       |    /*
  456|       |    sanity =   ucnv_getSharedConverterData (data->staticData->name);
  457|       |    if(sanity != nullptr)
  458|       |    {
  459|       |    UCNV_DEBUG_LOG("put:overwrite!",data->staticData->name,sanity);
  460|       |    }
  461|       |    UCNV_DEBUG_LOG("put:chk",data->staticData->name,sanity);
  462|       |    */
  463|       |
  464|       |    /* Mark it shared */
  465|    171|    data->sharedDataCached = true;
  466|       |
  467|    171|    uhash_put(SHARED_DATA_HASHTABLE,
  ------------------
  |  | 1032|    171|#define uhash_put U_ICU_ENTRY_POINT_RENAME(uhash_put)
  |  |  ------------------
  |  |  |  |  123|    171|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    171|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    171|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  468|    171|            (void*) data->staticData->name, /* Okay to cast away const as long as
  469|       |            keyDeleter == nullptr */
  470|    171|            data,
  471|    171|            &err);
  472|    171|    UCNV_DEBUG_LOG("put", data->staticData->name,data);
  473|       |
  474|    171|}
ucnv_bld.cpp:_ZL30ucnv_deleteSharedConverterDataP20UConverterSharedData:
  513|    251|{
  514|    251|    UTRACE_ENTRY_OC(UTRACE_UCNV_UNLOAD);
  515|    251|    UTRACE_DATA2(UTRACE_OPEN_CLOSE, "unload converter %s shared data %p", deadSharedData->staticData->name, deadSharedData);
  516|       |
  517|    251|    if (deadSharedData->referenceCounter > 0) {
  ------------------
  |  Branch (517:9): [True: 0, False: 251]
  ------------------
  518|      0|        UTRACE_EXIT_VALUE((int32_t)false);
  519|      0|        return false;
  520|      0|    }
  521|       |
  522|    251|    if (deadSharedData->impl->unload != nullptr) {
  ------------------
  |  Branch (522:9): [True: 251, False: 0]
  ------------------
  523|    251|        deadSharedData->impl->unload(deadSharedData);
  524|    251|    }
  525|       |
  526|    251|    if(deadSharedData->dataMemory != nullptr)
  ------------------
  |  Branch (526:8): [True: 251, False: 0]
  ------------------
  527|    251|    {
  528|    251|        UDataMemory *data = (UDataMemory*)deadSharedData->dataMemory;
  529|    251|        udata_close(data);
  ------------------
  |  |  885|    251|#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close)
  |  |  ------------------
  |  |  |  |  123|    251|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    251|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    251|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  530|    251|    }
  531|       |
  532|    251|    uprv_free(deadSharedData);
  ------------------
  |  | 1503|    251|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|    251|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    251|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    251|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  533|       |
  534|    251|    UTRACE_EXIT_VALUE((int32_t)true);
  535|    251|    return true;
  536|    251|}
ucnv_bld.cpp:_ZL21parseConverterOptionsPKcP20UConverterNamePiecesP18UConverterLoadArgsP10UErrorCode:
  630|  40.8k|{
  631|  40.8k|    char *cnvName = pPieces->cnvName;
  632|  40.8k|    char c;
  633|  40.8k|    int32_t len = 0;
  634|       |
  635|  40.8k|    pArgs->name=inName;
  636|  40.8k|    pArgs->locale=pPieces->locale;
  637|  40.8k|    pArgs->options=pPieces->options;
  638|       |
  639|       |    /* copy the converter name itself to cnvName */
  640|   731k|    while((c=*inName)!=0 && c!=UCNV_OPTION_SEP_CHAR) {
  ------------------
  |  |  240|   692k|#define UCNV_OPTION_SEP_CHAR ','
  ------------------
  |  Branch (640:11): [True: 692k, False: 39.3k]
  |  Branch (640:29): [True: 690k, False: 1.42k]
  ------------------
  641|   690k|        if (++len>=UCNV_MAX_CONVERTER_NAME_LENGTH) {
  ------------------
  |  |   79|   690k|#define UCNV_MAX_CONVERTER_NAME_LENGTH 60
  ------------------
  |  Branch (641:13): [True: 0, False: 690k]
  ------------------
  642|      0|            *err = U_ILLEGAL_ARGUMENT_ERROR;    /* bad name */
  643|      0|            pPieces->cnvName[0]=0;
  644|      0|            return;
  645|      0|        }
  646|   690k|        *cnvName++=c;
  647|   690k|        inName++;
  648|   690k|    }
  649|  40.8k|    *cnvName=0;
  650|  40.8k|    pArgs->name=pPieces->cnvName;
  651|       |
  652|       |    /* parse options. No more name copying should occur. */
  653|  43.2k|    while((c=*inName)!=0) {
  ------------------
  |  Branch (653:11): [True: 2.45k, False: 40.8k]
  ------------------
  654|  2.45k|        if(c==UCNV_OPTION_SEP_CHAR) {
  ------------------
  |  |  240|  2.45k|#define UCNV_OPTION_SEP_CHAR ','
  ------------------
  |  Branch (654:12): [True: 2.45k, False: 0]
  ------------------
  655|  2.45k|            ++inName;
  656|  2.45k|        }
  657|       |
  658|       |        /* inName is behind an option separator */
  659|  2.45k|        if(uprv_strncmp(inName, "locale=", 7)==0) {
  ------------------
  |  |   44|  2.45k|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|  2.45k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (659:12): [True: 1.03k, False: 1.42k]
  ------------------
  660|       |            /* do not modify locale itself in case we have multiple locale options */
  661|  1.03k|            char *dest=pPieces->locale;
  662|       |
  663|       |            /* copy the locale option value */
  664|  1.03k|            inName+=7;
  665|  1.03k|            len=0;
  666|  3.10k|            while((c=*inName)!=0 && c!=UCNV_OPTION_SEP_CHAR) {
  ------------------
  |  |  240|  3.10k|#define UCNV_OPTION_SEP_CHAR ','
  ------------------
  |  Branch (666:19): [True: 3.10k, False: 0]
  |  Branch (666:37): [True: 2.07k, False: 1.03k]
  ------------------
  667|  2.07k|                ++inName;
  668|       |
  669|  2.07k|                if(++len>=ULOC_FULLNAME_CAPACITY) {
  ------------------
  |  |  264|  2.07k|#define ULOC_FULLNAME_CAPACITY 157
  ------------------
  |  Branch (669:20): [True: 0, False: 2.07k]
  ------------------
  670|      0|                    *err=U_ILLEGAL_ARGUMENT_ERROR;    /* bad name */
  671|      0|                    pPieces->locale[0]=0;
  672|      0|                    return;
  673|      0|                }
  674|       |
  675|  2.07k|                *dest++=c;
  676|  2.07k|            }
  677|  1.03k|            *dest=0;
  678|  1.42k|        } else if(uprv_strncmp(inName, "version=", 8)==0) {
  ------------------
  |  |   44|  1.42k|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|  1.42k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (678:19): [True: 1.36k, False: 52]
  ------------------
  679|       |            /* copy the version option value into bits 3..0 of pPieces->options */
  680|  1.36k|            inName+=8;
  681|  1.36k|            c=*inName;
  682|  1.36k|            if(c==0) {
  ------------------
  |  Branch (682:16): [True: 0, False: 1.36k]
  ------------------
  683|      0|                pArgs->options=(pPieces->options&=~UCNV_OPTION_VERSION);
  ------------------
  |  |   44|      0|#define UCNV_OPTION_VERSION     0xf
  ------------------
  684|      0|                return;
  685|  1.36k|            } else if (static_cast<uint8_t>(c - '0') < 10) {
  ------------------
  |  Branch (685:24): [True: 1.36k, False: 0]
  ------------------
  686|  1.36k|                pArgs->options = pPieces->options = (pPieces->options & ~UCNV_OPTION_VERSION) | static_cast<uint32_t>(c - '0');
  ------------------
  |  |   44|  1.36k|#define UCNV_OPTION_VERSION     0xf
  ------------------
  687|  1.36k|                ++inName;
  688|  1.36k|            }
  689|  1.36k|        } else if(uprv_strncmp(inName, "swaplfnl", 8)==0) {
  ------------------
  |  |   44|     52|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|     52|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (689:19): [True: 52, False: 0]
  ------------------
  690|     52|            inName+=8;
  691|     52|            pArgs->options=(pPieces->options|=UCNV_OPTION_SWAP_LFNL);
  ------------------
  |  |   45|     52|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
  692|       |        /* add processing for new options here with another } else if(uprv_strncmp(inName, "option-name=", XX)==0) { */
  693|     52|        } else {
  694|       |            /* ignore any other options until we define some */
  695|      0|            while(((c = *inName++) != 0) && (c != UCNV_OPTION_SEP_CHAR)) {
  ------------------
  |  |  240|      0|#define UCNV_OPTION_SEP_CHAR ','
  ------------------
  |  Branch (695:19): [True: 0, False: 0]
  |  Branch (695:45): [True: 0, False: 0]
  ------------------
  696|      0|            }
  697|      0|            if(c==0) {
  ------------------
  |  Branch (697:16): [True: 0, False: 0]
  ------------------
  698|      0|                return;
  699|      0|            }
  700|      0|        }
  701|  2.45k|    }
  702|  40.8k|}
ucnv_bld.cpp:_ZL26getAlgorithmicTypeFromNamePKc:
  384|  40.8k|{
  385|  40.8k|    uint32_t mid, start, limit;
  386|  40.8k|    uint32_t lastMid;
  387|  40.8k|    int result;
  388|  40.8k|    char strippedName[UCNV_MAX_CONVERTER_NAME_LENGTH];
  389|       |
  390|       |    /* Lower case and remove ignoreable characters. */
  391|  40.8k|    ucnv_io_stripForCompare(strippedName, realName);
  ------------------
  |  |   73|  40.8k|#   define ucnv_io_stripForCompare ucnv_io_stripASCIIForCompare
  |  |  ------------------
  |  |  |  |  695|  40.8k|#define ucnv_io_stripASCIIForCompare U_ICU_ENTRY_POINT_RENAME(ucnv_io_stripASCIIForCompare)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  40.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  40.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  40.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  392|       |
  393|       |    /* do a binary search for the alias */
  394|  40.8k|    start = 0;
  395|  40.8k|    limit = UPRV_LENGTHOF(cnvNameType);
  ------------------
  |  |   99|  40.8k|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  396|  40.8k|    mid = limit;
  397|  40.8k|    lastMid = UINT32_MAX;
  398|       |
  399|   274k|    for (;;) {
  400|   274k|        mid = (start + limit) / 2;
  401|   274k|        if (lastMid == mid) {   /* Have we moved? */
  ------------------
  |  Branch (401:13): [True: 35.0k, False: 239k]
  ------------------
  402|  35.0k|            break;  /* We haven't moved, and it wasn't found. */
  403|  35.0k|        }
  404|   239k|        lastMid = mid;
  405|   239k|        result = uprv_strcmp(strippedName, cnvNameType[mid].name);
  ------------------
  |  |   38|   239k|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|   239k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  406|       |
  407|   239k|        if (result < 0) {
  ------------------
  |  Branch (407:13): [True: 143k, False: 96.6k]
  ------------------
  408|   143k|            limit = mid;
  409|   143k|        } else if (result > 0) {
  ------------------
  |  Branch (409:20): [True: 90.8k, False: 5.79k]
  ------------------
  410|  90.8k|            start = mid;
  411|  90.8k|        } else {
  412|  5.79k|            return converterData[cnvNameType[mid].type];
  413|  5.79k|        }
  414|   239k|    }
  415|       |
  416|  35.0k|    return nullptr;
  417|  40.8k|}
ucnv_bld.cpp:_ZL26haveAvailableConverterListP10UErrorCode:
 1140|  14.0k|static UBool haveAvailableConverterList(UErrorCode *pErrorCode) {
 1141|  14.0k|    umtx_initOnce(gAvailableConvertersInitOnce, &initAvailableConvertersList, *pErrorCode);
 1142|  14.0k|    return U_SUCCESS(*pErrorCode);
 1143|  14.0k|}
ucnv_bld.cpp:_ZL27initAvailableConvertersListR10UErrorCode:
 1103|      1|static void U_CALLCONV initAvailableConvertersList(UErrorCode &errCode) {
 1104|      1|    U_ASSERT(gAvailableConverterCount == 0);
  ------------------
  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  ------------------
 1105|      1|    U_ASSERT(gAvailableConverters == nullptr);
  ------------------
  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  ------------------
 1106|       |
 1107|      1|    ucnv_enableCleanup();
  ------------------
  |  |  651|      1|#define ucnv_enableCleanup U_ICU_ENTRY_POINT_RENAME(ucnv_enableCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1108|      1|    UEnumeration *allConvEnum = ucnv_openAllNames(&errCode);
  ------------------
  |  |  702|      1|#define ucnv_openAllNames U_ICU_ENTRY_POINT_RENAME(ucnv_openAllNames)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1109|      1|    int32_t allConverterCount = uenum_count(allConvEnum, &errCode);
  ------------------
  |  |  949|      1|#define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1110|      1|    if (U_FAILURE(errCode)) {
  ------------------
  |  Branch (1110:9): [True: 0, False: 1]
  ------------------
 1111|      0|        return;
 1112|      0|    }
 1113|       |
 1114|       |    /* We can't have more than "*converterTable" converters to open */
 1115|      1|    gAvailableConverters = static_cast<const char**>(uprv_malloc(allConverterCount * sizeof(char*)));
  ------------------
  |  | 1524|      1|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1116|      1|    if (!gAvailableConverters) {
  ------------------
  |  Branch (1116:9): [True: 0, False: 1]
  ------------------
 1117|      0|        errCode = U_MEMORY_ALLOCATION_ERROR;
 1118|      0|        return;
 1119|      0|    }
 1120|       |
 1121|       |    /* Open the default converter to make sure that it has first dibs in the hash table. */
 1122|      1|    UErrorCode localStatus = U_ZERO_ERROR;
 1123|      1|    UConverter tempConverter;
 1124|      1|    ucnv_close(ucnv_createConverter(&tempConverter, nullptr, &localStatus));
  ------------------
  |  |  639|      1|#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  ucnv_close(ucnv_createConverter(&tempConverter, nullptr, &localStatus));
  ------------------
  |  |  647|      1|#define ucnv_createConverter U_ICU_ENTRY_POINT_RENAME(ucnv_createConverter)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1125|       |
 1126|      1|    gAvailableConverterCount = 0;
 1127|       |
 1128|    366|    for (int32_t idx = 0; idx < allConverterCount; idx++) {
  ------------------
  |  Branch (1128:27): [True: 365, False: 1]
  ------------------
 1129|    365|        localStatus = U_ZERO_ERROR;
 1130|    365|        const char *converterName = uenum_next(allConvEnum, nullptr, &localStatus);
  ------------------
  |  |  950|    365|#define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next)
  |  |  ------------------
  |  |  |  |  123|    365|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    365|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    365|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1131|    365|        if (ucnv_canCreateConverter(converterName, &localStatus)) {
  ------------------
  |  |  632|    365|#define ucnv_canCreateConverter U_ICU_ENTRY_POINT_RENAME(ucnv_canCreateConverter)
  |  |  ------------------
  |  |  |  |  123|    365|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    365|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    365|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1131:13): [True: 232, False: 133]
  ------------------
 1132|    232|            gAvailableConverters[gAvailableConverterCount++] = converterName;
 1133|    232|        }
 1134|    365|    }
 1135|       |
 1136|      1|    uenum_close(allConvEnum);
  ------------------
  |  |  948|      1|#define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1137|      1|}

ucnv_cbFromUWriteBytes_78:
   42|  40.0M|{
   43|  40.0M|    if(U_FAILURE(*err)) {
  ------------------
  |  Branch (43:8): [True: 0, False: 40.0M]
  ------------------
   44|      0|        return;
   45|      0|    }
   46|       |
   47|  40.0M|    ucnv_fromUWriteBytes(
  ------------------
  |  |  664|  40.0M|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  40.0M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  40.0M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  40.0M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   48|  40.0M|        args->converter,
   49|  40.0M|        source, length,
   50|  40.0M|        &args->target, args->targetLimit,
   51|  40.0M|        &args->offsets, offsetIndex,
   52|  40.0M|        err);
   53|  40.0M|}
ucnv_cbFromUWriteUChars_78:
   61|  34.3M|{
   62|       |    /*
   63|       |    This is a fun one.  Recursion can occur - we're basically going to
   64|       |    just retry shoving data through the same converter. Note, if you got
   65|       |    here through some kind of invalid sequence, you maybe should emit a
   66|       |    reset sequence of some kind and/or call ucnv_reset().  Since this
   67|       |    IS an actual conversion, take care that you've changed the callback
   68|       |    or the data, or you'll get an infinite loop.
   69|       |
   70|       |    Please set the err value to something reasonable before calling
   71|       |    into this.
   72|       |    */
   73|       |
   74|  34.3M|    char *oldTarget;
   75|       |
   76|  34.3M|    if(U_FAILURE(*err))
  ------------------
  |  Branch (76:8): [True: 0, False: 34.3M]
  ------------------
   77|      0|    {
   78|      0|        return;
   79|      0|    }
   80|       |
   81|  34.3M|    oldTarget = args->target;
   82|       |
   83|  34.3M|    ucnv_fromUnicode(args->converter,
  ------------------
  |  |  665|  34.3M|#define ucnv_fromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode)
  |  |  ------------------
  |  |  |  |  123|  34.3M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  34.3M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  34.3M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|  34.3M|        &args->target,
   85|  34.3M|        args->targetLimit,
   86|  34.3M|        source,
   87|  34.3M|        sourceLimit,
   88|  34.3M|        nullptr, /* no offsets */
   89|  34.3M|        false, /* no flush */
   90|  34.3M|        err);
   91|       |
   92|  34.3M|    if(args->offsets)
  ------------------
  |  Branch (92:8): [True: 0, False: 34.3M]
  ------------------
   93|      0|    {
   94|      0|        while (args->target != oldTarget)  /* if it moved at all.. */
  ------------------
  |  Branch (94:16): [True: 0, False: 0]
  ------------------
   95|      0|        {
   96|      0|            *(args->offsets)++ = offsetIndex;
   97|      0|            oldTarget++;
   98|      0|        }
   99|      0|    }
  100|       |
  101|       |    /*
  102|       |    Note, if you did something like used a Stop subcallback, things would get interesting.
  103|       |    In fact, here's where we want to return the partially consumed in-source!
  104|       |    */
  105|  34.3M|    if(*err == U_BUFFER_OVERFLOW_ERROR)
  ------------------
  |  Branch (105:8): [True: 567, False: 34.3M]
  ------------------
  106|       |    /* && (*source < sourceLimit && args->target >= args->targetLimit)
  107|       |    -- S. Hrcek */
  108|    567|    {
  109|       |        /* Overflowed the target.  Now, we'll write into the charErrorBuffer.
  110|       |        It's a fixed size. If we overflow it... Hmm */
  111|    567|        char *newTarget;
  112|    567|        const char *newTargetLimit;
  113|    567|        UErrorCode err2 = U_ZERO_ERROR;
  114|       |
  115|    567|        int8_t errBuffLen;
  116|       |
  117|    567|        errBuffLen  = args->converter->charErrorBufferLength;
  118|       |
  119|       |        /* start the new target at the first free slot in the errbuff.. */
  120|    567|        newTarget = (char *)(args->converter->charErrorBuffer + errBuffLen);
  121|       |
  122|    567|        newTargetLimit = (char *)(args->converter->charErrorBuffer +
  123|    567|            sizeof(args->converter->charErrorBuffer));
  124|       |
  125|    567|        if(newTarget >= newTargetLimit)
  ------------------
  |  Branch (125:12): [True: 0, False: 567]
  ------------------
  126|      0|        {
  127|      0|            *err = U_INTERNAL_PROGRAM_ERROR;
  128|      0|            return;
  129|      0|        }
  130|       |
  131|       |        /* We're going to tell the converter that the errbuff len is empty.
  132|       |        This prevents the existing errbuff from being 'flushed' out onto
  133|       |        itself.  If the errbuff is needed by the converter this time,
  134|       |        we're hosed - we're out of space! */
  135|       |
  136|    567|        args->converter->charErrorBufferLength = 0;
  137|       |
  138|    567|        ucnv_fromUnicode(args->converter,
  ------------------
  |  |  665|    567|#define ucnv_fromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode)
  |  |  ------------------
  |  |  |  |  123|    567|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    567|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    567|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|    567|                         &newTarget,
  140|    567|                         newTargetLimit,
  141|    567|                         source,
  142|    567|                         sourceLimit,
  143|    567|                         nullptr,
  144|    567|                         false,
  145|    567|                         &err2);
  146|       |
  147|       |        /* We can go ahead and overwrite the  length here. We know just how
  148|       |        to recalculate it. */
  149|       |
  150|    567|        args->converter->charErrorBufferLength = (int8_t)(
  151|    567|            newTarget - (char*)args->converter->charErrorBuffer);
  152|       |
  153|    567|        if((newTarget >= newTargetLimit) || (err2 == U_BUFFER_OVERFLOW_ERROR))
  ------------------
  |  Branch (153:12): [True: 0, False: 567]
  |  Branch (153:45): [True: 0, False: 567]
  ------------------
  154|      0|        {
  155|       |            /* now we're REALLY in trouble.
  156|       |            Internal program error - callback shouldn't have written this much
  157|       |            data!
  158|       |            */
  159|      0|            *err = U_INTERNAL_PROGRAM_ERROR;
  160|      0|            return;
  161|      0|        }
  162|       |        /*else {*/
  163|       |            /* sub errs could be invalid/truncated/illegal chars or w/e.
  164|       |            These might want to be passed on up.. But the problem is, we already
  165|       |            need to pass U_BUFFER_OVERFLOW_ERROR. That has to override these
  166|       |            other errs.. */
  167|       |
  168|       |            /*
  169|       |            if(U_FAILURE(err2))
  170|       |            ??
  171|       |            */
  172|       |        /*}*/
  173|    567|    }
  174|  34.3M|}
ucnv_cbFromUWriteSub_78:
  180|  75.3M|{
  181|  75.3M|    UConverter *converter;
  182|  75.3M|    int32_t length;
  183|       |
  184|  75.3M|    if(U_FAILURE(*err)) {
  ------------------
  |  Branch (184:8): [True: 0, False: 75.3M]
  ------------------
  185|      0|        return;
  186|      0|    }
  187|  75.3M|    converter = args->converter;
  188|  75.3M|    length = converter->subCharLen;
  189|       |
  190|  75.3M|    if(length == 0) {
  ------------------
  |  Branch (190:8): [True: 0, False: 75.3M]
  ------------------
  191|      0|        return;
  192|      0|    }
  193|       |
  194|  75.3M|    if(length < 0) {
  ------------------
  |  Branch (194:8): [True: 34.3M, False: 41.0M]
  ------------------
  195|       |        /*
  196|       |         * Write/convert the substitution string. Its real length is -length.
  197|       |         * Unlike the escape callback, we need not change the converter's
  198|       |         * callback function because ucnv_setSubstString() verified that
  199|       |         * the string can be converted, so we will not get a conversion error
  200|       |         * and will not recurse.
  201|       |         * At worst we should get a U_BUFFER_OVERFLOW_ERROR.
  202|       |         */
  203|  34.3M|        const char16_t *source = (const char16_t *)converter->subChars;
  204|  34.3M|        ucnv_cbFromUWriteUChars(args, &source, source - length, offsetIndex, err);
  ------------------
  |  |  635|  34.3M|#define ucnv_cbFromUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteUChars)
  |  |  ------------------
  |  |  |  |  123|  34.3M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  34.3M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  34.3M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  34.3M|        return;
  206|  34.3M|    }
  207|       |
  208|  41.0M|    if(converter->sharedData->impl->writeSub!=nullptr) {
  ------------------
  |  Branch (208:8): [True: 32.6M, False: 8.44M]
  ------------------
  209|  32.6M|        converter->sharedData->impl->writeSub(args, offsetIndex, err);
  210|  32.6M|    }
  211|  8.44M|    else if(converter->subChar1!=0 && (uint16_t)converter->invalidUCharBuffer[0]<=(uint16_t)0xffu) {
  ------------------
  |  Branch (211:13): [True: 0, False: 8.44M]
  |  Branch (211:39): [True: 0, False: 0]
  ------------------
  212|       |        /*
  213|       |        TODO: Is this untestable because the MBCS converter has a writeSub function to call
  214|       |        and the other converters don't use subChar1?
  215|       |        */
  216|      0|        ucnv_cbFromUWriteBytes(args,
  ------------------
  |  |  633|      0|#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|      0|                               (const char *)&converter->subChar1, 1,
  218|      0|                               offsetIndex, err);
  219|      0|    }
  220|  8.44M|    else {
  221|  8.44M|        ucnv_cbFromUWriteBytes(args,
  ------------------
  |  |  633|  8.44M|#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  8.44M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  8.44M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  8.44M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|  8.44M|                               (const char *)converter->subChars, length,
  223|  8.44M|                               offsetIndex, err);
  224|  8.44M|    }
  225|  41.0M|}

ucnv_fromUWriteBytes_78:
   60|  57.8M|                     UErrorCode *pErrorCode) {
   61|  57.8M|    char *t=*target;
   62|  57.8M|    int32_t *o;
   63|       |
   64|       |    /* write bytes */
   65|  57.8M|    if(offsets==nullptr || (o=*offsets)==nullptr) {
  ------------------
  |  Branch (65:8): [True: 0, False: 57.8M]
  |  Branch (65:28): [True: 57.8M, False: 0]
  ------------------
   66|   234M|        while(length>0 && t<targetLimit) {
  ------------------
  |  Branch (66:15): [True: 176M, False: 57.8M]
  |  Branch (66:27): [True: 176M, False: 4.46k]
  ------------------
   67|   176M|            *t++=*bytes++;
   68|   176M|            --length;
   69|   176M|        }
   70|  57.8M|    } else {
   71|       |        /* output with offsets */
   72|      0|        while(length>0 && t<targetLimit) {
  ------------------
  |  Branch (72:15): [True: 0, False: 0]
  |  Branch (72:27): [True: 0, False: 0]
  ------------------
   73|      0|            *t++=*bytes++;
   74|      0|            *o++=sourceIndex;
   75|      0|            --length;
   76|      0|        }
   77|      0|        *offsets=o;
   78|      0|    }
   79|  57.8M|    *target=t;
   80|       |
   81|       |    /* write overflow */
   82|  57.8M|    if(length>0) {
  ------------------
  |  Branch (82:8): [True: 4.46k, False: 57.8M]
  ------------------
   83|  4.46k|        if(cnv!=nullptr) {
  ------------------
  |  Branch (83:12): [True: 4.46k, False: 0]
  ------------------
   84|  4.46k|            t=(char *)cnv->charErrorBuffer;
   85|  4.46k|            cnv->charErrorBufferLength=(int8_t)length;
   86|  11.7k|            do {
   87|  11.7k|                *t++=(uint8_t)*bytes++;
   88|  11.7k|            } while(--length>0);
  ------------------
  |  Branch (88:21): [True: 7.29k, False: 4.46k]
  ------------------
   89|  4.46k|        }
   90|  4.46k|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
   91|  4.46k|    }
   92|  57.8M|}

ucnv_ct.cpp:_ZL17_CompoundTextOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
  262|  1.34k|_CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
  263|  1.34k|    cnv->extraInfo = uprv_malloc (sizeof (UConverterDataCompoundText));
  ------------------
  |  | 1524|  1.34k|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  264|  1.34k|    if (cnv->extraInfo != nullptr) {
  ------------------
  |  Branch (264:9): [True: 1.34k, False: 0]
  ------------------
  265|  1.34k|        UConverterDataCompoundText *myConverterData = (UConverterDataCompoundText *) cnv->extraInfo;
  266|       |
  267|  1.34k|        UConverterNamePieces stackPieces;
  268|  1.34k|        UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
  ------------------
  |  |   62|  1.34k|    { (int32_t)sizeof(UConverterLoadArgs), 0, false, false, 0, 0, NULL, NULL, NULL }
  ------------------
  269|       |
  270|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_0] = nullptr;
  271|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_1] = ucnv_loadSharedData("icu-internal-compound-s1", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  272|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_2] = ucnv_loadSharedData("icu-internal-compound-s2", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_3] = ucnv_loadSharedData("icu-internal-compound-s3", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  274|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_1] = ucnv_loadSharedData("icu-internal-compound-d1", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  275|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_2] = ucnv_loadSharedData("icu-internal-compound-d2", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_3] = ucnv_loadSharedData("icu-internal-compound-d3", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  277|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_4] = ucnv_loadSharedData("icu-internal-compound-d4", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_5] = ucnv_loadSharedData("icu-internal-compound-d5", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_6] = ucnv_loadSharedData("icu-internal-compound-d6", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_DOUBLE_7] = ucnv_loadSharedData("icu-internal-compound-d7", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  281|  1.34k|        myConverterData->myConverterArray[COMPOUND_TEXT_TRIPLE_DOUBLE] = ucnv_loadSharedData("icu-internal-compound-t", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|       |
  283|  1.34k|        myConverterData->myConverterArray[IBM_915] = ucnv_loadSharedData("ibm-915_P100-1995", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|  1.34k|        myConverterData->myConverterArray[IBM_916] = ucnv_loadSharedData("ibm-916_P100-1995", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|  1.34k|        myConverterData->myConverterArray[IBM_914] = ucnv_loadSharedData("ibm-914_P100-1995", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|  1.34k|        myConverterData->myConverterArray[IBM_874] = ucnv_loadSharedData("ibm-874_P100-1995", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  287|  1.34k|        myConverterData->myConverterArray[IBM_912] = ucnv_loadSharedData("ibm-912_P100-1995", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  288|  1.34k|        myConverterData->myConverterArray[IBM_913] = ucnv_loadSharedData("ibm-913_P100-2000", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.34k|        myConverterData->myConverterArray[ISO_8859_14] = ucnv_loadSharedData("iso-8859_14-1998", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|  1.34k|        myConverterData->myConverterArray[IBM_923] = ucnv_loadSharedData("ibm-923_P100-1998", &stackPieces, &stackArgs, errorCode);
  ------------------
  |  |  700|  1.34k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  291|       |
  292|  1.34k|        if (U_FAILURE(*errorCode) || pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (292:13): [True: 0, False: 1.34k]
  |  Branch (292:38): [True: 1, False: 1.34k]
  ------------------
  293|      1|            _CompoundTextClose(cnv);
  294|      1|            return;
  295|      1|        }
  296|       |
  297|  1.34k|        myConverterData->state = (COMPOUND_TEXT_CONVERTERS)0;
  298|  1.34k|    } else {
  299|      0|        *errorCode = U_MEMORY_ALLOCATION_ERROR;
  300|      0|    }
  301|  1.34k|}
ucnv_ct.cpp:_ZL18_CompoundTextCloseP10UConverter:
  305|  1.34k|_CompoundTextClose(UConverter *converter) {
  306|  1.34k|    UConverterDataCompoundText* myConverterData = (UConverterDataCompoundText*)(converter->extraInfo);
  307|  1.34k|    int32_t i;
  308|       |
  309|  1.34k|    if (converter->extraInfo != nullptr) {
  ------------------
  |  Branch (309:9): [True: 1.34k, False: 0]
  ------------------
  310|       |        /*close the array of converter pointers and free the memory*/
  311|  28.3k|        for (i = 0; i < NUM_OF_CONVERTERS; i++) {
  ------------------
  |  Branch (311:21): [True: 26.9k, False: 1.34k]
  ------------------
  312|  26.9k|            if (myConverterData->myConverterArray[i] != nullptr) {
  ------------------
  |  Branch (312:17): [True: 25.6k, False: 1.34k]
  ------------------
  313|  25.6k|                ucnv_unloadSharedDataIfReady(myConverterData->myConverterArray[i]);
  ------------------
  |  |  726|  25.6k|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|  25.6k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  25.6k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  25.6k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  314|  25.6k|            }
  315|  26.9k|        }
  316|       |
  317|  1.34k|        uprv_free(converter->extraInfo);
  ------------------
  |  | 1503|  1.34k|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|  1.34k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.34k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.34k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  318|  1.34k|        converter->extraInfo = nullptr;
  319|  1.34k|    }
  320|  1.34k|}
ucnv_ct.cpp:_ZL18_CompoundTextResetP10UConverter21UConverterResetChoice:
  323|  2.69k|_CompoundTextReset(UConverter *converter, UConverterResetChoice choice) {
  324|  2.69k|    (void)converter;
  325|  2.69k|    (void)choice;
  326|  2.69k|}
ucnv_ct.cpp:_ZL43UConverter_fromUnicode_CompoundText_OFFSETSP25UConverterFromUnicodeArgsP10UErrorCode:
  335|  4.85k|UConverter_fromUnicode_CompoundText_OFFSETS(UConverterFromUnicodeArgs* args, UErrorCode* err){
  336|  4.85k|    UConverter *cnv = args->converter;
  337|  4.85k|    uint8_t *target = (uint8_t *) args->target;
  338|  4.85k|    const uint8_t *targetLimit = (const uint8_t *) args->targetLimit;
  339|  4.85k|    const char16_t* source = args->source;
  340|  4.85k|    const char16_t* sourceLimit = args->sourceLimit;
  341|       |    /* int32_t* offsets = args->offsets; */
  342|  4.85k|    UChar32 sourceChar;
  343|  4.85k|    UBool useFallback = cnv->useFallback;
  344|  4.85k|    uint8_t tmpTargetBuffer[7];
  345|  4.85k|    int32_t tmpTargetBufferLength = 0;
  346|  4.85k|    COMPOUND_TEXT_CONVERTERS currentState, tmpState;
  347|  4.85k|    uint32_t pValue;
  348|  4.85k|    int32_t pValueLength = 0;
  349|  4.85k|    int32_t i, n, j;
  350|       |
  351|  4.85k|    UConverterDataCompoundText *myConverterData = (UConverterDataCompoundText *) cnv->extraInfo;
  352|       |
  353|  4.85k|    currentState = myConverterData->state;
  354|       |
  355|       |    /* check if the last codepoint of previous buffer was a lead surrogate*/
  356|  4.85k|    if((sourceChar = cnv->fromUChar32)!=0 && target< targetLimit) {
  ------------------
  |  Branch (356:8): [True: 0, False: 4.85k]
  |  Branch (356:46): [True: 0, False: 0]
  ------------------
  357|      0|        goto getTrail;
  358|      0|    }
  359|       |
  360|  5.58M|    while( source < sourceLimit){
  ------------------
  |  Branch (360:12): [True: 5.57M, False: 1.35k]
  ------------------
  361|  5.57M|        if(target < targetLimit){
  ------------------
  |  Branch (361:12): [True: 5.57M, False: 1.54k]
  ------------------
  362|       |
  363|  5.57M|            sourceChar  = *(source++);
  364|       |            /*check if the char is a First surrogate*/
  365|  5.57M|             if(U16_IS_SURROGATE(sourceChar)) {
  ------------------
  |  |   75|  5.57M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  5.57M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 2.81k, False: 5.57M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  366|  2.81k|                if(U16_IS_SURROGATE_LEAD(sourceChar)) {
  ------------------
  |  |   84|  2.81k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 1.83k, False: 980]
  |  |  ------------------
  ------------------
  367|  1.83k|getTrail:
  368|       |                    /*look ahead to find the trail surrogate*/
  369|  1.83k|                    if(source < sourceLimit) {
  ------------------
  |  Branch (369:24): [True: 1.82k, False: 15]
  ------------------
  370|       |                        /* test the following code unit */
  371|  1.82k|                        char16_t trail = *source;
  372|  1.82k|                        if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  1.82k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 867, False: 957]
  |  |  ------------------
  ------------------
  373|    867|                            source++;
  374|    867|                            sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
  ------------------
  |  |  113|    867|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    867|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
  375|    867|                            cnv->fromUChar32=0x00;
  376|       |                            /* convert this supplementary code point */
  377|       |                            /* exit this condition tree */
  378|    957|                        } else {
  379|       |                            /* this is an unmatched lead code unit (1st surrogate) */
  380|       |                            /* callback(illegal) */
  381|    957|                            *err=U_ILLEGAL_CHAR_FOUND;
  382|    957|                            cnv->fromUChar32=sourceChar;
  383|    957|                            break;
  384|    957|                        }
  385|  1.82k|                    } else {
  386|       |                        /* no more input */
  387|     15|                        cnv->fromUChar32=sourceChar;
  388|     15|                        break;
  389|     15|                    }
  390|  1.83k|                } else {
  391|       |                    /* this is an unmatched trail code unit (2nd surrogate) */
  392|       |                    /* callback(illegal) */
  393|    980|                    *err=U_ILLEGAL_CHAR_FOUND;
  394|    980|                    cnv->fromUChar32=sourceChar;
  395|    980|                    break;
  396|    980|                }
  397|  2.81k|            }
  398|       |
  399|  5.57M|             tmpTargetBufferLength = 0;
  400|  5.57M|             tmpState = getState(sourceChar);
  401|       |
  402|  5.57M|             if (tmpState != DO_SEARCH && currentState != tmpState) {
  ------------------
  |  Branch (402:18): [True: 54.8k, False: 5.52M]
  |  Branch (402:43): [True: 21.7k, False: 33.0k]
  ------------------
  403|       |                 /* Get escape sequence if necessary */
  404|  21.7k|                 currentState = tmpState;
  405|  87.0k|                 for (i = 0; escSeqCompoundText[currentState][i] != 0; i++) {
  ------------------
  |  Branch (405:30): [True: 65.2k, False: 21.7k]
  ------------------
  406|  65.2k|                     tmpTargetBuffer[tmpTargetBufferLength++] = escSeqCompoundText[currentState][i];
  407|  65.2k|                 }
  408|  21.7k|             }
  409|       |
  410|  5.57M|             if (tmpState == DO_SEARCH) {
  ------------------
  |  Branch (410:18): [True: 5.52M, False: 54.8k]
  ------------------
  411|       |                 /* Test all available converters */
  412|  25.5M|                 for (i = 1; i < SEARCH_LENGTH; i++) {
  ------------------
  |  |   63|  25.5M|#define SEARCH_LENGTH 12
  ------------------
  |  Branch (412:30): [True: 25.4M, False: 91.2k]
  ------------------
  413|  25.4M|                     pValueLength = ucnv_MBCSFromUChar32(myConverterData->myConverterArray[i], sourceChar, &pValue, useFallback);
  ------------------
  |  |  622|  25.4M|#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
  |  |  ------------------
  |  |  |  |  123|  25.4M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  25.4M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  25.4M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  414|  25.4M|                     if (pValueLength > 0) {
  ------------------
  |  Branch (414:26): [True: 5.43M, False: 20.0M]
  ------------------
  415|  5.43M|                         tmpState = (COMPOUND_TEXT_CONVERTERS)i;
  416|  5.43M|                         if (currentState != tmpState) {
  ------------------
  |  Branch (416:30): [True: 5.42M, False: 7.53k]
  ------------------
  417|  5.42M|                             currentState = tmpState;
  418|  27.1M|                             for (j = 0; escSeqCompoundText[currentState][j] != 0; j++) {
  ------------------
  |  Branch (418:42): [True: 21.6M, False: 5.42M]
  ------------------
  419|  21.6M|                                 tmpTargetBuffer[tmpTargetBufferLength++] = escSeqCompoundText[currentState][j];
  420|  21.6M|                             }
  421|  5.42M|                         }
  422|  16.2M|                         for (n = (pValueLength - 1); n >= 0; n--) {
  ------------------
  |  Branch (422:55): [True: 10.8M, False: 5.43M]
  ------------------
  423|  10.8M|                             tmpTargetBuffer[tmpTargetBufferLength++] = (uint8_t)(pValue >> (n * 8));
  424|  10.8M|                         }
  425|  5.43M|                         break;
  426|  5.43M|                     }
  427|  25.4M|                 }
  428|  5.52M|             } else if (tmpState == COMPOUND_TEXT_SINGLE_0) {
  ------------------
  |  Branch (428:25): [True: 19.3k, False: 35.5k]
  ------------------
  429|  19.3k|                 tmpTargetBuffer[tmpTargetBufferLength++] = (uint8_t)sourceChar;
  430|  35.5k|             } else {
  431|  35.5k|                 pValueLength = ucnv_MBCSFromUChar32(myConverterData->myConverterArray[currentState], sourceChar, &pValue, useFallback);
  ------------------
  |  |  622|  35.5k|#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
  |  |  ------------------
  |  |  |  |  123|  35.5k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  35.5k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  35.5k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  432|  35.5k|                 if (pValueLength > 0) {
  ------------------
  |  Branch (432:22): [True: 33.8k, False: 1.62k]
  ------------------
  433|  67.7k|                     for (n = (pValueLength - 1); n >= 0; n--) {
  ------------------
  |  Branch (433:51): [True: 33.8k, False: 33.8k]
  ------------------
  434|  33.8k|                         tmpTargetBuffer[tmpTargetBufferLength++] = (uint8_t)(pValue >> (n * 8));
  435|  33.8k|                     }
  436|  33.8k|                 }
  437|  35.5k|             }
  438|       |
  439|  38.2M|             for (i = 0; i < tmpTargetBufferLength; i++) {
  ------------------
  |  Branch (439:26): [True: 32.6M, False: 5.57M]
  ------------------
  440|  32.6M|                 if (target < targetLimit) {
  ------------------
  |  Branch (440:22): [True: 32.6M, False: 1.39k]
  ------------------
  441|  32.6M|                     *target++ = tmpTargetBuffer[i];
  442|  32.6M|                 } else {
  443|  1.39k|                     *err = U_BUFFER_OVERFLOW_ERROR;
  444|  1.39k|                     break;
  445|  1.39k|                 }
  446|  32.6M|             }
  447|       |
  448|  5.57M|             if (*err == U_BUFFER_OVERFLOW_ERROR) {
  ------------------
  |  Branch (448:18): [True: 1.39k, False: 5.57M]
  ------------------
  449|  5.59k|                 for (; i < tmpTargetBufferLength; i++) {
  ------------------
  |  Branch (449:25): [True: 4.20k, False: 1.39k]
  ------------------
  450|  4.20k|                     args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = tmpTargetBuffer[i];
  451|  4.20k|                 }
  452|  1.39k|             }
  453|  5.57M|        } else {
  454|  1.54k|            *err = U_BUFFER_OVERFLOW_ERROR;
  455|  1.54k|            break;
  456|  1.54k|        }
  457|  5.57M|    }
  458|       |
  459|       |    /*save the state and return */
  460|  4.85k|    myConverterData->state = currentState;
  461|  4.85k|    args->source = source;
  462|  4.85k|    args->target = (char*)target;
  463|  4.85k|}
ucnv_ct.cpp:_ZL8getStatei:
  194|  5.57M|static COMPOUND_TEXT_CONVERTERS getState(int codepoint) {
  195|  5.57M|    COMPOUND_TEXT_CONVERTERS state = DO_SEARCH;
  196|       |
  197|  5.57M|    if (isASCIIRange(codepoint)) {
  ------------------
  |  |  105|  5.57M|        ((codepoint == 0x0000) || (codepoint == 0x0009) || (codepoint == 0x000A) || \
  |  |  ------------------
  |  |  |  Branch (105:10): [True: 15.2k, False: 5.56M]
  |  |  |  Branch (105:35): [True: 372, False: 5.56M]
  |  |  |  Branch (105:60): [True: 377, False: 5.56M]
  |  |  ------------------
  |  |  106|  5.57M|         (codepoint >= 0x0020 && codepoint <= 0x007f) || (codepoint >= 0x00A0 && codepoint <= 0x00FF))
  |  |  ------------------
  |  |  |  Branch (106:11): [True: 5.54M, False: 11.0k]
  |  |  |  Branch (106:34): [True: 2.30k, False: 5.54M]
  |  |  |  Branch (106:59): [True: 5.54M, False: 12.2k]
  |  |  |  Branch (106:82): [True: 1.01k, False: 5.54M]
  |  |  ------------------
  ------------------
  198|  19.3k|        state = COMPOUND_TEXT_SINGLE_0;
  199|  5.55M|    } else if (isIBM912(codepoint)) {
  ------------------
  |  |  133|  5.55M|        ((codepoint >= 0x0102 && codepoint <= 0x0107) || (codepoint >= 0x010C && codepoint <= 0x0111) || (codepoint >= 0x0118 && codepoint <= 0x011B) || \
  |  |  ------------------
  |  |  |  Branch (133:11): [True: 5.53M, False: 18.4k]
  |  |  |  Branch (133:34): [True: 4.88k, False: 5.53M]
  |  |  |  Branch (133:59): [True: 5.53M, False: 18.7k]
  |  |  |  Branch (133:82): [True: 285, False: 5.53M]
  |  |  |  Branch (133:107): [True: 5.53M, False: 19.6k]
  |  |  |  Branch (133:130): [True: 300, False: 5.53M]
  |  |  ------------------
  |  |  134|  5.55M|         (codepoint == 0x0139) || (codepoint == 0x013A) || (codepoint == 0x013D) || (codepoint == 0x013E) || (codepoint >= 0x0141 && codepoint <= 0x0144) || \
  |  |  ------------------
  |  |  |  Branch (134:10): [True: 207, False: 5.55M]
  |  |  |  Branch (134:35): [True: 211, False: 5.55M]
  |  |  |  Branch (134:60): [True: 201, False: 5.55M]
  |  |  |  Branch (134:85): [True: 195, False: 5.55M]
  |  |  |  Branch (134:111): [True: 5.52M, False: 23.7k]
  |  |  |  Branch (134:134): [True: 214, False: 5.52M]
  |  |  ------------------
  |  |  135|  5.55M|         (codepoint == 0x0147) || (codepoint == 0x0147) || (codepoint == 0x0150) || (codepoint == 0x0151) || (codepoint == 0x0154) || (codepoint == 0x0155) || \
  |  |  ------------------
  |  |  |  Branch (135:10): [True: 198, False: 5.55M]
  |  |  |  Branch (135:35): [True: 0, False: 5.55M]
  |  |  |  Branch (135:60): [True: 305, False: 5.54M]
  |  |  |  Branch (135:85): [True: 202, False: 5.54M]
  |  |  |  Branch (135:110): [True: 198, False: 5.54M]
  |  |  |  Branch (135:135): [True: 201, False: 5.54M]
  |  |  ------------------
  |  |  136|  5.55M|         (codepoint >= 0x0158 && codepoint <= 0x015B) || (codepoint == 0x015E) || (codepoint == 0x015F) || (codepoint >= 0x0160 && codepoint <= 0x0165) || \
  |  |  ------------------
  |  |  |  Branch (136:11): [True: 5.52M, False: 25.1k]
  |  |  |  Branch (136:34): [True: 212, False: 5.52M]
  |  |  |  Branch (136:58): [True: 199, False: 5.54M]
  |  |  |  Branch (136:83): [True: 194, False: 5.54M]
  |  |  |  Branch (136:109): [True: 5.52M, False: 25.5k]
  |  |  |  Branch (136:132): [True: 228, False: 5.52M]
  |  |  ------------------
  |  |  137|  5.55M|         (codepoint == 0x016E) || (codepoint == 0x016F) || (codepoint == 0x0170) || (codepoint ==  0x0171) || (codepoint >= 0x0179 && codepoint <= 0x017E) || \
  |  |  ------------------
  |  |  |  Branch (137:10): [True: 194, False: 5.54M]
  |  |  |  Branch (137:35): [True: 201, False: 5.54M]
  |  |  |  Branch (137:60): [True: 196, False: 5.54M]
  |  |  |  Branch (137:85): [True: 194, False: 5.54M]
  |  |  |  Branch (137:112): [True: 5.52M, False: 27.0k]
  |  |  |  Branch (137:135): [True: 210, False: 5.52M]
  |  |  ------------------
  |  |  138|  5.55M|         (codepoint == 0x02C7) || (codepoint == 0x02D8) || (codepoint == 0x02D9) || (codepoint == 0x02DB) || (codepoint == 0x02DD))
  |  |  ------------------
  |  |  |  Branch (138:10): [True: 205, False: 5.54M]
  |  |  |  Branch (138:35): [True: 194, False: 5.54M]
  |  |  |  Branch (138:60): [True: 195, False: 5.54M]
  |  |  |  Branch (138:85): [True: 195, False: 5.54M]
  |  |  |  Branch (138:110): [True: 202, False: 5.54M]
  |  |  ------------------
  ------------------
  200|  10.4k|        state = IBM_912;
  201|  5.54M|    }else if (isIBM913(codepoint)) {
  ------------------
  |  |  141|  5.54M|        ((codepoint >= 0x0108 && codepoint <= 0x010B) || (codepoint == 0x011C) || \
  |  |  ------------------
  |  |  |  Branch (141:11): [True: 5.52M, False: 18.4k]
  |  |  |  Branch (141:34): [True: 269, False: 5.52M]
  |  |  |  Branch (141:58): [True: 210, False: 5.54M]
  |  |  ------------------
  |  |  142|  5.54M|         (codepoint == 0x011D) || (codepoint == 0x0120) || (codepoint == 0x0121) || \
  |  |  ------------------
  |  |  |  Branch (142:10): [True: 202, False: 5.54M]
  |  |  |  Branch (142:35): [True: 200, False: 5.54M]
  |  |  |  Branch (142:60): [True: 213, False: 5.54M]
  |  |  ------------------
  |  |  143|  5.54M|         (codepoint >= 0x0124 && codepoint <= 0x0127) || (codepoint == 0x0134) || (codepoint == 0x0135) || \
  |  |  ------------------
  |  |  |  Branch (143:11): [True: 5.52M, False: 20.2k]
  |  |  |  Branch (143:34): [True: 248, False: 5.52M]
  |  |  |  Branch (143:58): [True: 201, False: 5.54M]
  |  |  |  Branch (143:83): [True: 195, False: 5.54M]
  |  |  ------------------
  |  |  144|  5.54M|         (codepoint == 0x015C) || (codepoint == 0x015D) || (codepoint == 0x016C) || (codepoint ==  0x016D))
  |  |  ------------------
  |  |  |  Branch (144:10): [True: 194, False: 5.54M]
  |  |  |  Branch (144:35): [True: 197, False: 5.54M]
  |  |  |  Branch (144:60): [True: 200, False: 5.54M]
  |  |  |  Branch (144:85): [True: 203, False: 5.54M]
  |  |  ------------------
  ------------------
  202|  2.53k|        state = IBM_913;
  203|  5.54M|    } else if (isISO8859_14(codepoint)) {
  ------------------
  |  |  151|  5.54M|        ((codepoint >= 0x0174 && codepoint <= 0x0177) || (codepoint == 0x1E0A) || \
  |  |  ------------------
  |  |  |  Branch (151:11): [True: 5.51M, False: 24.0k]
  |  |  |  Branch (151:34): [True: 314, False: 5.51M]
  |  |  |  Branch (151:58): [True: 195, False: 5.54M]
  |  |  ------------------
  |  |  152|  5.54M|         (codepoint == 0x1E0B) || (codepoint == 0x1E1E) || (codepoint == 0x1E1F) || \
  |  |  ------------------
  |  |  |  Branch (152:10): [True: 196, False: 5.54M]
  |  |  |  Branch (152:35): [True: 214, False: 5.54M]
  |  |  |  Branch (152:60): [True: 194, False: 5.54M]
  |  |  ------------------
  |  |  153|  5.54M|         (codepoint == 0x1E40) || (codepoint == 0x1E41) || (codepoint == 0x1E56) || \
  |  |  ------------------
  |  |  |  Branch (153:10): [True: 194, False: 5.54M]
  |  |  |  Branch (153:35): [True: 194, False: 5.54M]
  |  |  |  Branch (153:60): [True: 195, False: 5.54M]
  |  |  ------------------
  |  |  154|  5.54M|         (codepoint == 0x1E57) || (codepoint == 0x1E60) || (codepoint == 0x1E61) || \
  |  |  ------------------
  |  |  |  Branch (154:10): [True: 196, False: 5.54M]
  |  |  |  Branch (154:35): [True: 195, False: 5.54M]
  |  |  |  Branch (154:60): [True: 194, False: 5.54M]
  |  |  ------------------
  |  |  155|  5.54M|         (codepoint == 0x1E6A) || (codepoint == 0x1E6B) || (codepoint == 0x1EF2) || \
  |  |  ------------------
  |  |  |  Branch (155:10): [True: 194, False: 5.54M]
  |  |  |  Branch (155:35): [True: 194, False: 5.54M]
  |  |  |  Branch (155:60): [True: 194, False: 5.54M]
  |  |  ------------------
  |  |  156|  5.54M|         (codepoint == 0x1EF3) || (codepoint >= 0x1E80 && codepoint <= 0x1E85))
  |  |  ------------------
  |  |  |  Branch (156:10): [True: 195, False: 5.54M]
  |  |  |  Branch (156:36): [True: 5.47M, False: 62.0k]
  |  |  |  Branch (156:59): [True: 195, False: 5.47M]
  |  |  ------------------
  ------------------
  204|  3.25k|        state = ISO_8859_14;
  205|  5.54M|    } else if (isIBM923(codepoint)) {
  ------------------
  |  |  159|  5.54M|        ((codepoint == 0x0152) || (codepoint == 0x0153) || (codepoint == 0x0178) || (codepoint == 0x20AC))
  |  |  ------------------
  |  |  |  Branch (159:10): [True: 200, False: 5.54M]
  |  |  |  Branch (159:35): [True: 198, False: 5.54M]
  |  |  |  Branch (159:60): [True: 198, False: 5.54M]
  |  |  |  Branch (159:85): [True: 195, False: 5.53M]
  |  |  ------------------
  ------------------
  206|    791|        state = IBM_923;
  207|  5.53M|    } else if (isIBM874(codepoint)) {
  ------------------
  |  |  130|  5.53M|        ((codepoint >= 0x0E01 && codepoint <= 0x0E3A) || (codepoint >= 0x0E3F && codepoint <= 0x0E5B))
  |  |  ------------------
  |  |  |  Branch (130:11): [True: 5.48M, False: 55.1k]
  |  |  |  Branch (130:34): [True: 359, False: 5.48M]
  |  |  |  Branch (130:59): [True: 5.48M, False: 55.1k]
  |  |  |  Branch (130:82): [True: 209, False: 5.48M]
  |  |  ------------------
  ------------------
  208|    568|        state = IBM_874;
  209|  5.53M|    } else if (isIBM914(codepoint)) {
  ------------------
  |  |  123|  5.53M|        ((codepoint == 0x0100) || (codepoint == 0x0101) || (codepoint == 0x0112) || (codepoint == 0x0113) || (codepoint == 0x0116) || (codepoint == 0x0117) || \
  |  |  ------------------
  |  |  |  Branch (123:10): [True: 5.34k, False: 5.53M]
  |  |  |  Branch (123:35): [True: 923, False: 5.53M]
  |  |  |  Branch (123:60): [True: 211, False: 5.53M]
  |  |  |  Branch (123:85): [True: 219, False: 5.53M]
  |  |  |  Branch (123:110): [True: 218, False: 5.53M]
  |  |  |  Branch (123:135): [True: 224, False: 5.53M]
  |  |  ------------------
  |  |  124|  5.53M|         (codepoint == 0x0122) || (codepoint == 0x0123) || (codepoint >= 0x0128 && codepoint <= 0x012B) || (codepoint == 0x012E) || (codepoint == 0x012F) || \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 213, False: 5.53M]
  |  |  |  Branch (124:35): [True: 196, False: 5.53M]
  |  |  |  Branch (124:61): [True: 5.51M, False: 12.6k]
  |  |  |  Branch (124:84): [True: 241, False: 5.51M]
  |  |  |  Branch (124:108): [True: 201, False: 5.53M]
  |  |  |  Branch (124:133): [True: 199, False: 5.53M]
  |  |  ------------------
  |  |  125|  5.53M|         (codepoint >= 0x0136 && codepoint <= 0x0138) || (codepoint == 0x013B) || (codepoint == 0x013C) || (codepoint == 0x0145) || (codepoint ==  0x0146) || \
  |  |  ------------------
  |  |  |  Branch (125:11): [True: 5.51M, False: 13.1k]
  |  |  |  Branch (125:34): [True: 220, False: 5.51M]
  |  |  |  Branch (125:58): [True: 195, False: 5.53M]
  |  |  |  Branch (125:83): [True: 201, False: 5.53M]
  |  |  |  Branch (125:108): [True: 200, False: 5.53M]
  |  |  |  Branch (125:133): [True: 202, False: 5.53M]
  |  |  ------------------
  |  |  126|  5.53M|         (codepoint >= 0x014A && codepoint <= 0x014D) || (codepoint == 0x0156) || (codepoint == 0x0157) || (codepoint >= 0x0166 && codepoint <= 0x016B) || \
  |  |  ------------------
  |  |  |  Branch (126:11): [True: 5.51M, False: 13.1k]
  |  |  |  Branch (126:34): [True: 212, False: 5.51M]
  |  |  |  Branch (126:58): [True: 195, False: 5.52M]
  |  |  |  Branch (126:83): [True: 202, False: 5.52M]
  |  |  |  Branch (126:109): [True: 5.51M, False: 13.2k]
  |  |  |  Branch (126:132): [True: 211, False: 5.51M]
  |  |  ------------------
  |  |  127|  5.53M|         (codepoint == 0x0172) || (codepoint == 0x0173))
  |  |  ------------------
  |  |  |  Branch (127:10): [True: 209, False: 5.52M]
  |  |  |  Branch (127:35): [True: 205, False: 5.52M]
  |  |  ------------------
  ------------------
  210|  10.4k|        state = IBM_914;
  211|  5.52M|    } else if (isCompoundS2(codepoint)) {
  ------------------
  |  |  120|  5.52M|        ((codepoint == 0x02BC) || (codepoint == 0x02BD) || (codepoint >= 0x0384 && codepoint <= 0x03CE) || (codepoint == 0x2015))
  |  |  ------------------
  |  |  |  Branch (120:10): [True: 199, False: 5.52M]
  |  |  |  Branch (120:35): [True: 197, False: 5.52M]
  |  |  |  Branch (120:61): [True: 5.49M, False: 29.5k]
  |  |  |  Branch (120:84): [True: 1.92k, False: 5.49M]
  |  |  |  Branch (120:108): [True: 194, False: 5.52M]
  |  |  ------------------
  ------------------
  212|  2.51k|        state = COMPOUND_TEXT_SINGLE_2;
  213|  5.52M|    } else if (isCompoundS3(codepoint)) {
  ------------------
  |  |  115|  5.52M|        ((codepoint == 0x060C) || (codepoint == 0x061B) || (codepoint == 0x061F) || (codepoint >= 0x0621 && codepoint <= 0x063A) || \
  |  |  ------------------
  |  |  |  Branch (115:10): [True: 194, False: 5.52M]
  |  |  |  Branch (115:35): [True: 198, False: 5.52M]
  |  |  |  Branch (115:60): [True: 194, False: 5.52M]
  |  |  |  Branch (115:86): [True: 5.48M, False: 37.3k]
  |  |  |  Branch (115:109): [True: 209, False: 5.48M]
  |  |  ------------------
  |  |  116|  5.52M|         (codepoint >= 0x0640 && codepoint <= 0x0652) || (codepoint >= 0x0660 && codepoint <= 0x066D) || (codepoint == 0x200B) || \
  |  |  ------------------
  |  |  |  Branch (116:11): [True: 5.48M, False: 37.3k]
  |  |  |  Branch (116:34): [True: 215, False: 5.48M]
  |  |  |  Branch (116:59): [True: 5.48M, False: 37.3k]
  |  |  |  Branch (116:82): [True: 226, False: 5.48M]
  |  |  |  Branch (116:106): [True: 198, False: 5.52M]
  |  |  ------------------
  |  |  117|  5.52M|         (codepoint >= 0x0FE70 && codepoint <= 0x0FE72) || (codepoint == 0x0FE74) || (codepoint >= 0x0FE76 && codepoint <= 0x0FEBE))
  |  |  ------------------
  |  |  |  Branch (117:11): [True: 9.41k, False: 5.51M]
  |  |  |  Branch (117:35): [True: 198, False: 9.21k]
  |  |  |  Branch (117:60): [True: 194, False: 5.52M]
  |  |  |  Branch (117:87): [True: 9.02k, False: 5.51M]
  |  |  |  Branch (117:111): [True: 310, False: 8.71k]
  |  |  ------------------
  ------------------
  214|  2.13k|        state = COMPOUND_TEXT_SINGLE_3;
  215|  5.52M|    } else if (isIBM916(codepoint)) {
  ------------------
  |  |  112|  5.52M|        ((codepoint >= 0x05D0 && codepoint <= 0x05EA) || (codepoint == 0x2017) || (codepoint == 0x203E))
  |  |  ------------------
  |  |  |  Branch (112:11): [True: 5.48M, False: 36.4k]
  |  |  |  Branch (112:34): [True: 263, False: 5.48M]
  |  |  |  Branch (112:58): [True: 194, False: 5.52M]
  |  |  |  Branch (112:83): [True: 199, False: 5.52M]
  |  |  ------------------
  ------------------
  216|    656|        state = IBM_916;
  217|  5.52M|    } else if (isIBM915(codepoint)) {
  ------------------
  |  |  109|  5.52M|        ((codepoint >= 0x0401 && codepoint <= 0x045F) || (codepoint == 0x2116))
  |  |  ------------------
  |  |  |  Branch (109:11): [True: 5.49M, False: 29.8k]
  |  |  |  Branch (109:34): [True: 885, False: 5.49M]
  |  |  |  Branch (109:58): [True: 194, False: 5.52M]
  |  |  ------------------
  ------------------
  218|  1.07k|        state = IBM_915;
  219|  5.52M|    } else if (isCompoundS1(codepoint)) {
  ------------------
  |  |  147|  5.52M|        ((codepoint == 0x011E) || (codepoint == 0x011F) || (codepoint == 0x0130) || \
  |  |  ------------------
  |  |  |  Branch (147:10): [True: 216, False: 5.52M]
  |  |  |  Branch (147:35): [True: 208, False: 5.52M]
  |  |  |  Branch (147:60): [True: 207, False: 5.52M]
  |  |  ------------------
  |  |  148|  5.52M|         (codepoint == 0x0131) || (codepoint >= 0x0218 && codepoint <= 0x021B))
  |  |  ------------------
  |  |  |  Branch (148:10): [True: 204, False: 5.52M]
  |  |  |  Branch (148:36): [True: 5.49M, False: 22.7k]
  |  |  |  Branch (148:59): [True: 278, False: 5.49M]
  |  |  ------------------
  ------------------
  220|  1.11k|        state = COMPOUND_TEXT_SINGLE_1;
  221|  1.11k|    }
  222|       |
  223|  5.57M|    return state;
  224|  5.57M|}

UCNV_FROM_U_CALLBACK_SUBSTITUTE_78:
  169|  74.4M|{
  170|  74.4M|    (void)codeUnits;
  171|  74.4M|    (void)length;
  172|  74.4M|    if (reason <= UCNV_IRREGULAR)
  ------------------
  |  Branch (172:9): [True: 74.4M, False: 0]
  ------------------
  173|  74.4M|    {
  174|  74.4M|        if (reason == UCNV_UNASSIGNED && IS_DEFAULT_IGNORABLE_CODE_POINT(codePoint))
  ------------------
  |  |   68|  38.3M|#define IS_DEFAULT_IGNORABLE_CODE_POINT(c) ( \
  |  |   69|  38.3M|    (c == 0x00AD) || \
  |  |  ------------------
  |  |  |  Branch (69:5): [True: 388, False: 38.3M]
  |  |  ------------------
  |  |   70|  38.3M|    (c == 0x034F) || \
  |  |  ------------------
  |  |  |  Branch (70:5): [True: 577, False: 38.3M]
  |  |  ------------------
  |  |   71|  38.3M|    (c == 0x061C) || \
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 642, False: 38.3M]
  |  |  ------------------
  |  |   72|  38.3M|    (c == 0x115F) || \
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 619, False: 38.3M]
  |  |  ------------------
  |  |   73|  38.3M|    (c == 0x1160) || \
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 895, False: 38.3M]
  |  |  ------------------
  |  |   74|  38.3M|    (0x17B4 <= c && c <= 0x17B5) || \
  |  |  ------------------
  |  |  |  Branch (74:6): [True: 35.5M, False: 2.77M]
  |  |  |  Branch (74:21): [True: 1.32k, False: 35.5M]
  |  |  ------------------
  |  |   75|  38.3M|    (0x180B <= c && c <= 0x180F) || \
  |  |  ------------------
  |  |  |  Branch (75:6): [True: 35.5M, False: 2.79M]
  |  |  |  Branch (75:21): [True: 1.28k, False: 35.5M]
  |  |  ------------------
  |  |   76|  38.3M|    (0x200B <= c && c <= 0x200F) || \
  |  |  ------------------
  |  |  |  Branch (76:6): [True: 34.9M, False: 3.43M]
  |  |  |  Branch (76:21): [True: 1.42k, False: 34.9M]
  |  |  ------------------
  |  |   77|  38.3M|    (0x202A <= c && c <= 0x202E) || \
  |  |  ------------------
  |  |  |  Branch (77:6): [True: 34.8M, False: 3.49M]
  |  |  |  Branch (77:21): [True: 4.77k, False: 34.8M]
  |  |  ------------------
  |  |   78|  38.3M|    (0x2060 <= c && c <= 0x206F) || \
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 34.8M, False: 3.53M]
  |  |  |  Branch (78:21): [True: 29.6k, False: 34.7M]
  |  |  ------------------
  |  |   79|  38.3M|    (c == 0x3164) || \
  |  |  ------------------
  |  |  |  Branch (79:5): [True: 435, False: 38.3M]
  |  |  ------------------
  |  |   80|  38.3M|    (0xFE00 <= c && c <= 0xFE0F) || \
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 555k, False: 37.7M]
  |  |  |  Branch (80:21): [True: 8.94k, False: 546k]
  |  |  ------------------
  |  |   81|  38.3M|    (c == 0xFEFF) || \
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 1.84k, False: 38.3M]
  |  |  ------------------
  |  |   82|  38.3M|    (c == 0xFFA0) || \
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 447, False: 38.3M]
  |  |  ------------------
  |  |   83|  38.3M|    (0xFFF0 <= c && c <= 0xFFF8) || \
  |  |  ------------------
  |  |  |  Branch (83:6): [True: 351k, False: 37.9M]
  |  |  |  Branch (83:21): [True: 6.18k, False: 345k]
  |  |  ------------------
  |  |   84|  38.3M|    (0x1BCA0 <= c && c <= 0x1BCA3) || \
  |  |  ------------------
  |  |  |  Branch (84:6): [True: 5.59k, False: 38.2M]
  |  |  |  Branch (84:22): [True: 467, False: 5.12k]
  |  |  ------------------
  |  |   85|  38.3M|    (0x1D173 <= c && c <= 0x1D17A) || \
  |  |  ------------------
  |  |  |  Branch (85:6): [True: 5.03k, False: 38.2M]
  |  |  |  Branch (85:22): [True: 262, False: 4.77k]
  |  |  ------------------
  |  |   86|  38.3M|    (0xE0000 <= c && c <= 0xE0FFF))
  |  |  ------------------
  |  |  |  Branch (86:6): [True: 1.57k, False: 38.3M]
  |  |  |  Branch (86:22): [True: 233, False: 1.34k]
  |  |  ------------------
  ------------------
  |  Branch (174:13): [True: 38.3M, False: 36.0M]
  ------------------
  175|  60.3k|        {
  176|       |            /*
  177|       |             * Skip if the codepoint has unicode property of default ignorable.
  178|       |             */
  179|  60.3k|            *err = U_ZERO_ERROR;
  180|  60.3k|        }
  181|  74.4M|        else if (context == nullptr || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
  ------------------
  |  |   53|      0|#define UCNV_PRV_STOP_ON_ILLEGAL    'i'
  ------------------
  |  Branch (181:18): [True: 74.4M, False: 0]
  |  Branch (181:41): [True: 0, False: 0]
  |  Branch (181:90): [True: 0, False: 0]
  ------------------
  182|  74.4M|        {
  183|  74.4M|            *err = U_ZERO_ERROR;
  184|  74.4M|            ucnv_cbFromUWriteSub(fromArgs, 0, err);
  ------------------
  |  |  634|  74.4M|#define ucnv_cbFromUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteSub)
  |  |  ------------------
  |  |  |  |  123|  74.4M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  74.4M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  74.4M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|  74.4M|        }
  186|       |        /* else the caller must have set the error code accordingly. */
  187|  74.4M|    }
  188|       |    /* else ignore the reset, close and clone calls. */
  189|  74.4M|}

ucnv_extInitialMatchFromU_78:
  756|  6.81M|                          UErrorCode *pErrorCode) {
  757|  6.81M|    uint32_t value = 0;  /* initialize output-only param to 0 to silence gcc */
  758|  6.81M|    int32_t match;
  759|       |
  760|       |    /* try to match */
  761|  6.81M|    match=ucnv_extMatchFromU(cx, cp,
  762|  6.81M|                             nullptr, 0,
  763|  6.81M|                             *src, (int32_t)(srcLimit-*src),
  764|  6.81M|                             &value,
  765|  6.81M|                             cnv->useFallback, flush);
  766|       |
  767|       |    /* reject a match if the result is a single byte for DBCS-only */
  768|  6.81M|    if( match>=2 &&
  ------------------
  |  Branch (768:9): [True: 38.2k, False: 6.77M]
  ------------------
  769|  6.81M|        !(UCNV_EXT_FROM_U_GET_LENGTH(value)==1 &&
  ------------------
  |  |  474|  38.2k|#define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)&UCNV_EXT_MAX_BYTES)
  |  |  ------------------
  |  |  |  |  451|  38.2k|#define UCNV_EXT_FROM_U_LENGTH_SHIFT 24
  |  |  ------------------
  |  |               #define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)&UCNV_EXT_MAX_BYTES)
  |  |  ------------------
  |  |  |  |  465|  38.2k|#define UCNV_EXT_MAX_BYTES 0x1f
  |  |  ------------------
  ------------------
  |  Branch (769:11): [True: 32.7k, False: 5.50k]
  ------------------
  770|  38.2k|          cnv->sharedData->mbcs.outputType==MBCS_OUTPUT_DBCS_ONLY)
  ------------------
  |  Branch (770:11): [True: 247, False: 32.5k]
  ------------------
  771|  6.81M|    ) {
  772|       |        /* advance src pointer for the consumed input */
  773|  38.0k|        *src+=match-2; /* remove 2 for the initial code point */
  774|       |
  775|       |        /* write result to target */
  776|  38.0k|        ucnv_extWriteFromU(cnv, cx,
  777|  38.0k|                           value,
  778|  38.0k|                           target, targetLimit,
  779|  38.0k|                           offsets, srcIndex,
  780|  38.0k|                           pErrorCode);
  781|  38.0k|        return true;
  782|  6.77M|    } else if(match<0) {
  ------------------
  |  Branch (782:15): [True: 0, False: 6.77M]
  ------------------
  783|       |        /* save state for partial match */
  784|      0|        const char16_t *s;
  785|      0|        int32_t j;
  786|       |
  787|       |        /* copy the first code point */
  788|      0|        cnv->preFromUFirstCP=cp;
  789|       |
  790|       |        /* now copy the newly consumed input */
  791|      0|        s=*src;
  792|      0|        match=-match-2; /* remove 2 for the initial code point */
  793|      0|        for(j=0; j<match; ++j) {
  ------------------
  |  Branch (793:18): [True: 0, False: 0]
  ------------------
  794|      0|            cnv->preFromU[j]=*s++;
  795|      0|        }
  796|      0|        *src=s; /* same as *src=srcLimit; because we reached the end of input */
  797|      0|        cnv->preFromULength=(int8_t)match;
  798|      0|        return true;
  799|  6.77M|    } else if(match==1) {
  ------------------
  |  Branch (799:15): [True: 28.0k, False: 6.74M]
  ------------------
  800|       |        /* matched, no mapping but request for <subchar1> */
  801|  28.0k|        cnv->useSubChar1=true;
  802|  28.0k|        return false;
  803|  6.74M|    } else /* match==0 no match */ {
  804|  6.74M|        return false;
  805|  6.74M|    }
  806|  6.81M|}
ucnv_extSimpleMatchFromU_78:
  815|  14.4M|                         UBool useFallback) {
  816|  14.4M|    uint32_t value;
  817|  14.4M|    int32_t match;
  818|       |
  819|       |    /* try to match */
  820|  14.4M|    match=ucnv_extMatchFromU(cx,
  821|  14.4M|                             cp,
  822|  14.4M|                             nullptr, 0,
  823|  14.4M|                             nullptr, 0,
  824|  14.4M|                             &value,
  825|  14.4M|                             useFallback, true);
  826|  14.4M|    if(match>=2) {
  ------------------
  |  Branch (826:8): [True: 13.5k, False: 14.4M]
  ------------------
  827|       |        /* write result for simple, single-character conversion */
  828|  13.5k|        int32_t length;
  829|  13.5k|        int isRoundtrip;
  830|       |
  831|  13.5k|        isRoundtrip=UCNV_EXT_FROM_U_IS_ROUNDTRIP(value);
  ------------------
  |  |  470|  13.5k|#define UCNV_EXT_FROM_U_IS_ROUNDTRIP(value) (((value)&UCNV_EXT_FROM_U_ROUNDTRIP_FLAG)!=0)
  |  |  ------------------
  |  |  |  |  452|  13.5k|#define UCNV_EXT_FROM_U_ROUNDTRIP_FLAG ((uint32_t)1<<31)
  |  |  ------------------
  ------------------
  832|  13.5k|        length=UCNV_EXT_FROM_U_GET_LENGTH(value);
  ------------------
  |  |  474|  13.5k|#define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)&UCNV_EXT_MAX_BYTES)
  |  |  ------------------
  |  |  |  |  451|  13.5k|#define UCNV_EXT_FROM_U_LENGTH_SHIFT 24
  |  |  ------------------
  |  |               #define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)&UCNV_EXT_MAX_BYTES)
  |  |  ------------------
  |  |  |  |  465|  13.5k|#define UCNV_EXT_MAX_BYTES 0x1f
  |  |  ------------------
  ------------------
  833|  13.5k|        value = UCNV_EXT_FROM_U_GET_DATA(value);
  ------------------
  |  |  477|  13.5k|#define UCNV_EXT_FROM_U_GET_DATA(value) ((value)&UCNV_EXT_FROM_U_DATA_MASK)
  |  |  ------------------
  |  |  |  |  456|  13.5k|#define UCNV_EXT_FROM_U_DATA_MASK 0xffffff
  |  |  ------------------
  ------------------
  834|       |
  835|  13.5k|        if(length<=UCNV_EXT_FROM_U_MAX_DIRECT_LENGTH) {
  ------------------
  |  |  462|  13.5k|#define UCNV_EXT_FROM_U_MAX_DIRECT_LENGTH 3
  ------------------
  |  Branch (835:12): [True: 13.5k, False: 0]
  ------------------
  836|  13.5k|            *pValue=value;
  837|  13.5k|            return isRoundtrip ? length : -length;
  ------------------
  |  Branch (837:20): [True: 13.3k, False: 199]
  ------------------
  838|       |#if 0 /* not currently used */
  839|       |        } else if(length==4) {
  840|       |            /* de-serialize a 4-byte result */
  841|       |            const uint8_t *result=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_BYTES_INDEX, uint8_t)+value;
  842|       |            *pValue=
  843|       |                ((uint32_t)result[0]<<24)|
  844|       |                ((uint32_t)result[1]<<16)|
  845|       |                ((uint32_t)result[2]<<8)|
  846|       |                result[3];
  847|       |            return isRoundtrip ? 4 : -4;
  848|       |#endif
  849|  13.5k|        }
  850|  13.5k|    }
  851|       |
  852|       |    /*
  853|       |     * return no match because
  854|       |     * - match>1 && resultLength>4: result too long for simple conversion
  855|       |     * - match==1: no match found, <subchar1> preferred
  856|       |     * - match==0: no match found in the first place
  857|       |     * - match<0: partial match, not supported for simple conversion (and flush==true)
  858|       |     */
  859|  14.4M|    return 0;
  860|  14.4M|}
ucnv_ext.cpp:_ZL18ucnv_extMatchFromUPKiiPKDsiS2_iPjaa:
  536|  21.2M|                   UBool useFallback, UBool flush) {
  537|  21.2M|    const uint16_t *stage12, *stage3;
  538|  21.2M|    const uint32_t *stage3b;
  539|       |
  540|  21.2M|    const char16_t *fromUTableUChars, *fromUSectionUChars;
  541|  21.2M|    const uint32_t *fromUTableValues, *fromUSectionValues;
  542|       |
  543|  21.2M|    uint32_t value, matchValue;
  544|  21.2M|    int32_t i, j, idx, length, matchLength;
  545|  21.2M|    char16_t c;
  546|       |
  547|  21.2M|    if(cx==nullptr) {
  ------------------
  |  Branch (547:8): [True: 0, False: 21.2M]
  ------------------
  548|      0|        return 0; /* no extension data, no match */
  549|      0|    }
  550|       |
  551|       |    /* trie lookup of firstCP */
  552|  21.2M|    idx=firstCP>>10; /* stage 1 index */
  553|  21.2M|    if(idx>=cx[UCNV_EXT_FROM_U_STAGE_1_LENGTH]) {
  ------------------
  |  Branch (553:8): [True: 5.67M, False: 15.5M]
  ------------------
  554|  5.67M|        return 0; /* the first code point is outside the trie */
  555|  5.67M|    }
  556|       |
  557|  15.5M|    stage12=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_STAGE_12_INDEX, uint16_t);
  ------------------
  |  |  345|  15.5M|    ((const itemType *)((const char *)(indexes)+(indexes)[index]))
  ------------------
  558|  15.5M|    stage3=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_STAGE_3_INDEX, uint16_t);
  ------------------
  |  |  345|  15.5M|    ((const itemType *)((const char *)(indexes)+(indexes)[index]))
  ------------------
  559|  15.5M|    idx=UCNV_EXT_FROM_U(stage12, stage3, idx, firstCP);
  ------------------
  |  |  449|  15.5M|    (stage3)[ ((int32_t)(stage12)[ (stage12)[s1Index] +(((c)>>4)&0x3f) ]<<UCNV_EXT_STAGE_2_LEFT_SHIFT) +((c)&0xf) ]
  |  |  ------------------
  |  |  |  |  444|  15.5M|#define UCNV_EXT_STAGE_2_LEFT_SHIFT 2
  |  |  ------------------
  ------------------
  560|       |
  561|  15.5M|    stage3b=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_STAGE_3B_INDEX, uint32_t);
  ------------------
  |  |  345|  15.5M|    ((const itemType *)((const char *)(indexes)+(indexes)[index]))
  ------------------
  562|  15.5M|    value=stage3b[idx];
  563|  15.5M|    if(value==0) {
  ------------------
  |  Branch (563:8): [True: 15.4M, False: 93.8k]
  ------------------
  564|  15.4M|        return 0;
  565|  15.4M|    }
  566|       |
  567|       |    /*
  568|       |     * Tests for (value&UCNV_EXT_FROM_U_RESERVED_MASK)==0:
  569|       |     * Do not interpret values with reserved bits used, for forward compatibility,
  570|       |     * and do not even remember intermediate results with reserved bits used.
  571|       |     */
  572|       |
  573|  93.8k|    if(UCNV_EXT_TO_U_IS_PARTIAL(value)) {
  ------------------
  |  |  426|  93.8k|#define UCNV_EXT_TO_U_IS_PARTIAL(value) ((value)<UCNV_EXT_TO_U_MIN_CODE_POINT)
  |  |  ------------------
  |  |  |  |  411|  93.8k|#define UCNV_EXT_TO_U_MIN_CODE_POINT 0x1f0000
  |  |  ------------------
  |  |  |  Branch (426:41): [True: 1.32k, False: 92.5k]
  |  |  ------------------
  ------------------
  574|       |        /* partial match, enter the loop below */
  575|  1.32k|        idx = static_cast<int32_t>(UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value));
  ------------------
  |  |  468|  1.32k|#define UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value) (value)
  ------------------
  576|       |
  577|       |        /* initialize */
  578|  1.32k|        fromUTableUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, char16_t);
  ------------------
  |  |  345|  1.32k|    ((const itemType *)((const char *)(indexes)+(indexes)[index]))
  ------------------
  579|  1.32k|        fromUTableValues=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_VALUES_INDEX, uint32_t);
  ------------------
  |  |  345|  1.32k|    ((const itemType *)((const char *)(indexes)+(indexes)[index]))
  ------------------
  580|       |
  581|  1.32k|        matchValue=0;
  582|  1.32k|        i=j=matchLength=0;
  583|       |
  584|       |        /* we must not remember fallback matches when not using fallbacks */
  585|       |
  586|       |        /* match input units until there is a full match or the input is consumed */
  587|  1.32k|        for(;;) {
  588|       |            /* go to the next section */
  589|  1.32k|            fromUSectionUChars=fromUTableUChars+idx;
  590|  1.32k|            fromUSectionValues=fromUTableValues+idx;
  591|       |
  592|       |            /* read first pair of the section */
  593|  1.32k|            length=*fromUSectionUChars++;
  594|  1.32k|            value=*fromUSectionValues++;
  595|  1.32k|            if(value!=0 && extFromUUseMapping(useFallback, value, firstCP)) {
  ------------------
  |  Branch (595:16): [True: 1.32k, False: 0]
  |  Branch (595:28): [True: 1.32k, False: 0]
  ------------------
  596|       |                /* remember longest match so far */
  597|  1.32k|                matchValue=value;
  598|  1.32k|                matchLength=2+i+j;
  599|  1.32k|            }
  600|       |
  601|       |            /* match pre[] then src[] */
  602|  1.32k|            if(i<preLength) {
  ------------------
  |  Branch (602:16): [True: 0, False: 1.32k]
  ------------------
  603|      0|                c=pre[i++];
  604|  1.32k|            } else if(j<srcLength) {
  ------------------
  |  Branch (604:23): [True: 1.29k, False: 31]
  ------------------
  605|  1.29k|                c=src[j++];
  606|  1.29k|            } else {
  607|       |                /* all input consumed, partial match */
  608|     31|                if(flush || (length=(i+j))>UCNV_EXT_MAX_UCHARS) {
  ------------------
  |  |  419|      0|#define UCNV_EXT_MAX_UCHARS 19
  ------------------
  |  Branch (608:20): [True: 31, False: 0]
  |  Branch (608:29): [True: 0, False: 0]
  ------------------
  609|       |                    /*
  610|       |                     * end of the entire input stream, stop with the longest match so far
  611|       |                     * or: partial match must not be longer than UCNV_EXT_MAX_UCHARS
  612|       |                     * because it must fit into state buffers
  613|       |                     */
  614|     31|                    break;
  615|     31|                } else {
  616|       |                    /* continue with more input next time */
  617|      0|                    return -(2+length);
  618|      0|                }
  619|     31|            }
  620|       |
  621|       |            /* search for the current char16_t */
  622|  1.29k|            idx=ucnv_extFindFromU(fromUSectionUChars, length, c);
  623|  1.29k|            if(idx<0) {
  ------------------
  |  Branch (623:16): [True: 1.09k, False: 194]
  ------------------
  624|       |                /* no match here, stop with the longest match so far */
  625|  1.09k|                break;
  626|  1.09k|            } else {
  627|    194|                value=fromUSectionValues[idx];
  628|    194|                if(UCNV_EXT_FROM_U_IS_PARTIAL(value)) {
  ------------------
  |  |  467|    194|#define UCNV_EXT_FROM_U_IS_PARTIAL(value) (((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)==0)
  |  |  ------------------
  |  |  |  |  451|    194|#define UCNV_EXT_FROM_U_LENGTH_SHIFT 24
  |  |  ------------------
  |  |  |  Branch (467:43): [True: 0, False: 194]
  |  |  ------------------
  ------------------
  629|       |                    /* partial match, continue */
  630|      0|                    idx = static_cast<int32_t>(UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value));
  ------------------
  |  |  468|      0|#define UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value) (value)
  ------------------
  631|    194|                } else {
  632|    194|                    if(extFromUUseMapping(useFallback, value, firstCP)) {
  ------------------
  |  Branch (632:24): [True: 194, False: 0]
  ------------------
  633|       |                        /* full match, stop with result */
  634|    194|                        matchValue=value;
  635|    194|                        matchLength=2+i+j;
  636|    194|                    } else {
  637|       |                        /* full match on fallback not taken, stop with the longest match so far */
  638|      0|                    }
  639|    194|                    break;
  640|    194|                }
  641|    194|            }
  642|  1.29k|        }
  643|       |
  644|  1.32k|        if(matchLength==0) {
  ------------------
  |  Branch (644:12): [True: 0, False: 1.32k]
  ------------------
  645|       |            /* no match at all */
  646|      0|            return 0;
  647|      0|        }
  648|  92.5k|    } else /* result from firstCP trie lookup */ {
  649|  92.5k|        if(extFromUUseMapping(useFallback, value, firstCP)) {
  ------------------
  |  Branch (649:12): [True: 78.8k, False: 13.6k]
  ------------------
  650|       |            /* full match, stop with result */
  651|  78.8k|            matchValue=value;
  652|  78.8k|            matchLength=2;
  653|  78.8k|        } else {
  654|       |            /* fallback not taken */
  655|  13.6k|            return 0;
  656|  13.6k|        }
  657|  92.5k|    }
  658|       |
  659|       |    /* return result */
  660|  80.1k|    if(matchValue==UCNV_EXT_FROM_U_SUBCHAR1) {
  ------------------
  |  |  459|  80.1k|#define UCNV_EXT_FROM_U_SUBCHAR1 0x80000001
  ------------------
  |  Branch (660:8): [True: 28.3k, False: 51.8k]
  ------------------
  661|  28.3k|        return 1; /* assert matchLength==2 */
  662|  28.3k|    }
  663|       |
  664|  51.8k|    *pMatchValue=matchValue;
  665|  51.8k|    return matchLength;
  666|  80.1k|}
ucnv_ext.cpp:_ZL18extFromUUseMappingaji:
  454|  94.0k|extFromUUseMapping(UBool useFallback, uint32_t value, UChar32 firstCP) {
  455|  94.0k|    return
  456|  94.0k|        ((value&UCNV_EXT_FROM_U_STATUS_MASK)!=0 ||
  ------------------
  |  |  454|  94.0k|#define UCNV_EXT_FROM_U_STATUS_MASK 0xc0000000
  ------------------
  |  Branch (456:10): [True: 80.1k, False: 13.8k]
  ------------------
  457|  94.0k|            FROM_U_USE_FALLBACK(useFallback, firstCP)) &&
  ------------------
  |  |  275|  13.8k|#define FROM_U_USE_FALLBACK(useFallback, c) ((useFallback) || IS_PRIVATE_USE(c))
  |  |  ------------------
  |  |  |  |  274|  13.8k|#define IS_PRIVATE_USE(c) ((uint32_t)((c)-0xe000)<0x1900 || (uint32_t)((c)-0xf0000)<0x20000)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:28): [True: 211, False: 13.6k]
  |  |  |  |  |  Branch (274:61): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (275:46): [True: 0, False: 13.8k]
  |  |  ------------------
  ------------------
  458|  94.0k|        (value&UCNV_EXT_FROM_U_RESERVED_MASK)==0;
  ------------------
  |  |  455|  80.3k|#define UCNV_EXT_FROM_U_RESERVED_MASK 0x20000000
  ------------------
  |  Branch (458:9): [True: 80.3k, False: 0]
  ------------------
  459|  94.0k|}
ucnv_ext.cpp:_ZL17ucnv_extFindFromUPKDsiDs:
  465|  1.29k|ucnv_extFindFromU(const char16_t *fromUSection, int32_t length, char16_t u) {
  466|  1.29k|    int32_t i, start, limit;
  467|       |
  468|       |    /* binary search */
  469|  1.29k|    start=0;
  470|  1.29k|    limit=length;
  471|  1.29k|    for(;;) {
  472|  1.29k|        i=limit-start;
  473|  1.29k|        if(i<=1) {
  ------------------
  |  Branch (473:12): [True: 650, False: 643]
  ------------------
  474|    650|            break; /* done */
  475|    650|        }
  476|       |        /* start<limit-1 */
  477|       |
  478|    643|        if(i<=4) {
  ------------------
  |  Branch (478:12): [True: 643, False: 0]
  ------------------
  479|       |            /* linear search for the last part */
  480|    643|            if(u<=fromUSection[start]) {
  ------------------
  |  Branch (480:16): [True: 253, False: 390]
  ------------------
  481|    253|                break;
  482|    253|            }
  483|    390|            if(++start<limit && u<=fromUSection[start]) {
  ------------------
  |  Branch (483:16): [True: 390, False: 0]
  |  Branch (483:33): [True: 194, False: 196]
  ------------------
  484|    194|                break;
  485|    194|            }
  486|    196|            if(++start<limit && u<=fromUSection[start]) {
  ------------------
  |  Branch (486:16): [True: 0, False: 196]
  |  Branch (486:33): [True: 0, False: 0]
  ------------------
  487|      0|                break;
  488|      0|            }
  489|       |            /* always break at start==limit-1 */
  490|    196|            ++start;
  491|    196|            break;
  492|    196|        }
  493|       |
  494|      0|        i=(start+limit)/2;
  495|      0|        if(u<fromUSection[i]) {
  ------------------
  |  Branch (495:12): [True: 0, False: 0]
  ------------------
  496|      0|            limit=i;
  497|      0|        } else {
  498|      0|            start=i;
  499|      0|        }
  500|      0|    }
  501|       |
  502|       |    /* did we really find it? */
  503|  1.29k|    if(start<limit && u==fromUSection[start]) {
  ------------------
  |  Branch (503:8): [True: 1.09k, False: 196]
  |  Branch (503:23): [True: 194, False: 903]
  ------------------
  504|    194|        return start;
  505|  1.09k|    } else {
  506|  1.09k|        return -1; /* not found */
  507|  1.09k|    }
  508|  1.29k|}
ucnv_ext.cpp:_ZL18ucnv_extWriteFromUP10UConverterPKijPPcPKcPPiiP10UErrorCode:
  676|  38.0k|                   UErrorCode *pErrorCode) {
  677|  38.0k|    uint8_t buffer[1+UCNV_EXT_MAX_BYTES];
  678|  38.0k|    const uint8_t *result;
  679|  38.0k|    int32_t length, prevLength;
  680|       |
  681|  38.0k|    length=UCNV_EXT_FROM_U_GET_LENGTH(value);
  ------------------
  |  |  474|  38.0k|#define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)&UCNV_EXT_MAX_BYTES)
  |  |  ------------------
  |  |  |  |  451|  38.0k|#define UCNV_EXT_FROM_U_LENGTH_SHIFT 24
  |  |  ------------------
  |  |               #define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LENGTH_SHIFT)&UCNV_EXT_MAX_BYTES)
  |  |  ------------------
  |  |  |  |  465|  38.0k|#define UCNV_EXT_MAX_BYTES 0x1f
  |  |  ------------------
  ------------------
  682|  38.0k|    value = UCNV_EXT_FROM_U_GET_DATA(value);
  ------------------
  |  |  477|  38.0k|#define UCNV_EXT_FROM_U_GET_DATA(value) ((value)&UCNV_EXT_FROM_U_DATA_MASK)
  |  |  ------------------
  |  |  |  |  456|  38.0k|#define UCNV_EXT_FROM_U_DATA_MASK 0xffffff
  |  |  ------------------
  ------------------
  683|       |
  684|       |    /* output the result */
  685|  38.0k|    if(length<=UCNV_EXT_FROM_U_MAX_DIRECT_LENGTH) {
  ------------------
  |  |  462|  38.0k|#define UCNV_EXT_FROM_U_MAX_DIRECT_LENGTH 3
  ------------------
  |  Branch (685:8): [True: 38.0k, False: 0]
  ------------------
  686|       |        /*
  687|       |         * Generate a byte array and then write it below.
  688|       |         * This is not the fastest possible way, but it should be ok for
  689|       |         * extension mappings, and it is much simpler.
  690|       |         * Offset and overflow handling are only done once this way.
  691|       |         */
  692|  38.0k|        uint8_t *p=buffer+1; /* reserve buffer[0] for shiftByte below */
  693|  38.0k|        switch(length) {
  694|    194|        case 3:
  ------------------
  |  Branch (694:9): [True: 194, False: 37.8k]
  ------------------
  695|    194|            *p++ = static_cast<uint8_t>(value >> 16);
  696|    194|            U_FALLTHROUGH;
  ------------------
  |  |  511|    194|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  697|  5.50k|        case 2:
  ------------------
  |  Branch (697:9): [True: 5.31k, False: 32.6k]
  ------------------
  698|  5.50k|            *p++ = static_cast<uint8_t>(value >> 8);
  699|  5.50k|            U_FALLTHROUGH;
  ------------------
  |  |  511|  5.50k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  700|  38.0k|        case 1:
  ------------------
  |  Branch (700:9): [True: 32.5k, False: 5.50k]
  ------------------
  701|  38.0k|            *p++ = static_cast<uint8_t>(value);
  702|  38.0k|            U_FALLTHROUGH;
  ------------------
  |  |  511|  38.0k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  703|  38.0k|        default:
  ------------------
  |  Branch (703:9): [True: 0, False: 38.0k]
  ------------------
  704|  38.0k|            break; /* will never occur */
  705|  38.0k|        }
  706|  38.0k|        result=buffer+1;
  707|  38.0k|    } else {
  708|      0|        result=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_BYTES_INDEX, uint8_t)+value;
  ------------------
  |  |  345|      0|    ((const itemType *)((const char *)(indexes)+(indexes)[index]))
  ------------------
  709|      0|    }
  710|       |
  711|       |    /* with correct data we have length>0 */
  712|       |
  713|  38.0k|    if((prevLength=cnv->fromUnicodeStatus)!=0) {
  ------------------
  |  Branch (713:8): [True: 33.4k, False: 4.60k]
  ------------------
  714|       |        /* handle SI/SO stateful output */
  715|  33.4k|        uint8_t shiftByte;
  716|       |
  717|  33.4k|        if(prevLength>1 && length==1) {
  ------------------
  |  Branch (717:12): [True: 10.8k, False: 22.5k]
  |  Branch (717:28): [True: 10.2k, False: 593]
  ------------------
  718|       |            /* change from double-byte mode to single-byte */
  719|  10.2k|            shiftByte = static_cast<uint8_t>(UCNV_SI);
  ------------------
  |  |   84|  10.2k|#define  UCNV_SI 0x0F
  ------------------
  720|  10.2k|            cnv->fromUnicodeStatus=1;
  721|  23.1k|        } else if(prevLength==1 && length>1) {
  ------------------
  |  Branch (721:19): [True: 22.5k, False: 593]
  |  Branch (721:36): [True: 342, False: 22.1k]
  ------------------
  722|       |            /* change from single-byte mode to double-byte */
  723|    342|            shiftByte = static_cast<uint8_t>(UCNV_SO);
  ------------------
  |  |   86|    342|#define  UCNV_SO 0x0E
  ------------------
  724|    342|            cnv->fromUnicodeStatus=2;
  725|  22.7k|        } else {
  726|  22.7k|            shiftByte=0;
  727|  22.7k|        }
  728|       |
  729|  33.4k|        if(shiftByte!=0) {
  ------------------
  |  Branch (729:12): [True: 10.6k, False: 22.7k]
  ------------------
  730|       |            /* prepend the shift byte to the result bytes */
  731|  10.6k|            buffer[0]=shiftByte;
  732|  10.6k|            if(result!=buffer+1) {
  ------------------
  |  Branch (732:16): [True: 0, False: 10.6k]
  ------------------
  733|      0|                uprv_memcpy(buffer+1, result, length);
  ------------------
  |  |   42|      0|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      0|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      0|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      0|    _Pragma("clang diagnostic push") \
  |  |   45|      0|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      0|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      0|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      0|    _Pragma("clang diagnostic pop") \
  |  |   49|      0|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      0|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      0|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|      0|            }
  735|  10.6k|            result=buffer;
  736|  10.6k|            ++length;
  737|  10.6k|        }
  738|  33.4k|    }
  739|       |
  740|  38.0k|    ucnv_fromUWriteBytes(cnv, reinterpret_cast<const char*>(result), length,
  ------------------
  |  |  664|  38.0k|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  38.0k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  38.0k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  38.0k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  741|  38.0k|                         target, targetLimit,
  742|  38.0k|                         offsets, srcIndex,
  743|  38.0k|                         pErrorCode);
  744|  38.0k|}

ucnv_io_stripASCIIForCompare_78:
  387|  81.6k|ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
  388|  81.6k|    char *dstItr = dst;
  389|  81.6k|    uint8_t type, nextType;
  390|  81.6k|    char c1;
  391|  81.6k|    UBool afterDigit = false;
  392|       |
  393|  1.51M|    while ((c1 = *name++) != 0) {
  ------------------
  |  Branch (393:12): [True: 1.43M, False: 81.6k]
  ------------------
  394|  1.43M|        type = GET_ASCII_TYPE(c1);
  ------------------
  |  |  360|  1.43M|#define GET_ASCII_TYPE(c) ((int8_t)(c) >= 0 ? asciiTypes[(uint8_t)c] : (uint8_t)UIGNORE)
  |  |  ------------------
  |  |  |  Branch (360:28): [True: 1.43M, False: 0]
  |  |  ------------------
  ------------------
  395|  1.43M|        switch (type) {
  396|   201k|        case UIGNORE:
  ------------------
  |  Branch (396:9): [True: 201k, False: 1.22M]
  ------------------
  397|   201k|            afterDigit = false;
  398|   201k|            continue; /* ignore all but letters and digits */
  399|  74.6k|        case ZERO:
  ------------------
  |  Branch (399:9): [True: 74.6k, False: 1.35M]
  ------------------
  400|  74.6k|            if (!afterDigit) {
  ------------------
  |  Branch (400:17): [True: 52, False: 74.5k]
  ------------------
  401|     52|                nextType = GET_ASCII_TYPE(*name);
  ------------------
  |  |  360|     52|#define GET_ASCII_TYPE(c) ((int8_t)(c) >= 0 ? asciiTypes[(uint8_t)c] : (uint8_t)UIGNORE)
  |  |  ------------------
  |  |  |  Branch (360:28): [True: 52, False: 0]
  |  |  ------------------
  ------------------
  402|     52|                if (nextType == ZERO || nextType == NONZERO) {
  ------------------
  |  Branch (402:21): [True: 0, False: 52]
  |  Branch (402:41): [True: 40, False: 12]
  ------------------
  403|     40|                    continue; /* ignore leading zero before another digit */
  404|     40|                }
  405|     52|            }
  406|  74.5k|            break;
  407|   306k|        case NONZERO:
  ------------------
  |  Branch (407:9): [True: 306k, False: 1.12M]
  ------------------
  408|   306k|            afterDigit = true;
  409|   306k|            break;
  410|   848k|        default:
  ------------------
  |  Branch (410:9): [True: 848k, False: 583k]
  ------------------
  411|   848k|            c1 = (char)type; /* lowercased letter */
  412|   848k|            afterDigit = false;
  413|   848k|            break;
  414|  1.43M|        }
  415|  1.22M|        *dstItr++ = c1;
  416|  1.22M|    }
  417|  81.6k|    *dstItr = 0;
  418|  81.6k|    return dst;
  419|  81.6k|}
ucnv_io_getConverterName_78:
  738|  40.8k|ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *pErrorCode) {
  739|  40.8k|    const char *aliasTmp = alias;
  740|  40.8k|    int32_t i = 0;
  741|  58.2k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (741:17): [True: 58.2k, False: 0]
  ------------------
  742|  58.2k|        if (i == 1) {
  ------------------
  |  Branch (742:13): [True: 17.4k, False: 40.8k]
  ------------------
  743|       |            /*
  744|       |             * After the first unsuccess converter lookup, check to see if
  745|       |             * the name begins with 'x-'. If it does, strip it off and try
  746|       |             * again.  This behaviour is similar to how ICU4J does it.
  747|       |             */
  748|  17.4k|            if (aliasTmp[0] == 'x' && aliasTmp[1] == '-') {
  ------------------
  |  Branch (748:17): [True: 0, False: 17.4k]
  |  Branch (748:39): [True: 0, False: 0]
  ------------------
  749|      0|                aliasTmp = aliasTmp+2;
  750|  17.4k|            } else {
  751|  17.4k|                break;
  752|  17.4k|            }
  753|  17.4k|        }
  754|  40.8k|        if(haveAliasData(pErrorCode) && isAlias(aliasTmp, pErrorCode)) {
  ------------------
  |  Branch (754:12): [True: 40.8k, False: 0]
  |  Branch (754:41): [True: 40.8k, False: 0]
  ------------------
  755|  40.8k|            uint32_t convNum = findConverter(aliasTmp, containsOption, pErrorCode);
  756|  40.8k|            if (convNum < gMainTable.converterListSize) {
  ------------------
  |  Branch (756:17): [True: 23.3k, False: 17.4k]
  ------------------
  757|  23.3k|                return GET_STRING(gMainTable.converterList[convNum]);
  ------------------
  |  |  201|  23.3k|#define GET_STRING(idx) (const char *)(gMainTable.stringTable + (idx))
  ------------------
  758|  23.3k|            }
  759|       |            /* else converter not found */
  760|  40.8k|        } else {
  761|      0|            break;
  762|      0|        }
  763|  40.8k|    }
  764|       |
  765|  17.4k|    return nullptr;
  766|  40.8k|}
ucnv_openAllNames_78:
 1064|      1|ucnv_openAllNames(UErrorCode *pErrorCode) {
 1065|      1|    UEnumeration *myEnum = nullptr;
 1066|      1|    if (haveAliasData(pErrorCode)) {
  ------------------
  |  Branch (1066:9): [True: 1, False: 0]
  ------------------
 1067|      1|        uint16_t *myContext;
 1068|       |
 1069|      1|        myEnum = static_cast<UEnumeration *>(uprv_malloc(sizeof(UEnumeration)));
  ------------------
  |  | 1524|      1|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|      1|        if (myEnum == nullptr) {
  ------------------
  |  Branch (1070:13): [True: 0, False: 1]
  ------------------
 1071|      0|            *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
 1072|      0|            return nullptr;
 1073|      0|        }
 1074|      1|        uprv_memcpy(myEnum, &gEnumAllConverters, sizeof(UEnumeration));
  ------------------
  |  |   42|      1|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      1|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      1|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      1|    _Pragma("clang diagnostic push") \
  |  |   45|      1|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      1|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      1|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      1|    _Pragma("clang diagnostic pop") \
  |  |   49|      1|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      1|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      1|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      1|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1075|      1|        myContext = static_cast<uint16_t *>(uprv_malloc(sizeof(uint16_t)));
  ------------------
  |  | 1524|      1|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1076|      1|        if (myContext == nullptr) {
  ------------------
  |  Branch (1076:13): [True: 0, False: 1]
  ------------------
 1077|      0|            *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
 1078|      0|            uprv_free(myEnum);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1079|      0|            return nullptr;
 1080|      0|        }
 1081|      1|        *myContext = 0;
 1082|      1|        myEnum->context = myContext;
 1083|      1|    }
 1084|      1|    return myEnum;
 1085|      1|}
ucnv_io_countKnownConverters_78:
 1088|      1|ucnv_io_countKnownConverters(UErrorCode *pErrorCode) {
 1089|      1|    if (haveAliasData(pErrorCode)) {
  ------------------
  |  Branch (1089:9): [True: 1, False: 0]
  ------------------
 1090|      1|        return (uint16_t)gMainTable.converterListSize;
 1091|      1|    }
 1092|      0|    return 0;
 1093|      1|}
ucnv_io.cpp:_ZL13haveAliasDataP10UErrorCode:
  313|  40.8k|haveAliasData(UErrorCode *pErrorCode) {
  314|  40.8k|    umtx_initOnce(gAliasDataInitOnce, &initAliasData, *pErrorCode);
  315|  40.8k|    return U_SUCCESS(*pErrorCode);
  316|  40.8k|}
ucnv_io.cpp:_ZL13initAliasDataR10UErrorCode:
  232|      1|static void U_CALLCONV initAliasData(UErrorCode &errCode) {
  233|      1|    UDataMemory *data;
  234|      1|    const uint16_t *table;
  235|      1|    const uint32_t *sectionSizes;
  236|      1|    uint32_t tableStart;
  237|      1|    uint32_t currOffset;
  238|       |
  239|      1|    ucln_common_registerCleanup(UCLN_COMMON_UCNV_IO, ucnv_io_cleanup);
  ------------------
  |  |  617|      1|#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  240|       |
  241|      1|    U_ASSERT(gAliasData == nullptr);
  ------------------
  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  ------------------
  242|      1|    data = udata_openChoice(nullptr, DATA_TYPE, DATA_NAME, isAcceptable, nullptr, &errCode);
  ------------------
  |  |  894|      1|#define udata_openChoice U_ICU_ENTRY_POINT_RENAME(udata_openChoice)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  243|      1|    if(U_FAILURE(errCode)) {
  ------------------
  |  Branch (243:8): [True: 0, False: 1]
  ------------------
  244|      0|        return;
  245|      0|    }
  246|       |
  247|      1|    sectionSizes = static_cast<const uint32_t*>(udata_getMemory(data));
  ------------------
  |  |  891|      1|#define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|      1|    table = reinterpret_cast<const uint16_t*>(sectionSizes);
  249|       |
  250|      1|    tableStart      = sectionSizes[0];
  251|      1|    if (tableStart < minTocLength) {
  ------------------
  |  Branch (251:9): [True: 0, False: 1]
  ------------------
  252|      0|        errCode = U_INVALID_FORMAT_ERROR;
  253|      0|        udata_close(data);
  ------------------
  |  |  885|      0|#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|      0|        return;
  255|      0|    }
  256|      1|    gAliasData = data;
  257|       |
  258|      1|    gMainTable.converterListSize      = sectionSizes[1];
  259|      1|    gMainTable.tagListSize            = sectionSizes[2];
  260|      1|    gMainTable.aliasListSize          = sectionSizes[3];
  261|      1|    gMainTable.untaggedConvArraySize  = sectionSizes[4];
  262|      1|    gMainTable.taggedAliasArraySize   = sectionSizes[5];
  263|      1|    gMainTable.taggedAliasListsSize   = sectionSizes[6];
  264|      1|    gMainTable.optionTableSize        = sectionSizes[7];
  265|      1|    gMainTable.stringTableSize        = sectionSizes[8];
  266|       |
  267|      1|    if (tableStart > 8) {
  ------------------
  |  Branch (267:9): [True: 1, False: 0]
  ------------------
  268|      1|        gMainTable.normalizedStringTableSize = sectionSizes[9];
  269|      1|    }
  270|       |
  271|      1|    currOffset = tableStart * (sizeof(uint32_t)/sizeof(uint16_t)) + (sizeof(uint32_t)/sizeof(uint16_t));
  272|      1|    gMainTable.converterList = table + currOffset;
  273|       |
  274|      1|    currOffset += gMainTable.converterListSize;
  275|      1|    gMainTable.tagList = table + currOffset;
  276|       |
  277|      1|    currOffset += gMainTable.tagListSize;
  278|      1|    gMainTable.aliasList = table + currOffset;
  279|       |
  280|      1|    currOffset += gMainTable.aliasListSize;
  281|      1|    gMainTable.untaggedConvArray = table + currOffset;
  282|       |
  283|      1|    currOffset += gMainTable.untaggedConvArraySize;
  284|      1|    gMainTable.taggedAliasArray = table + currOffset;
  285|       |
  286|       |    /* aliasLists is a 1's based array, but it has a padding character */
  287|      1|    currOffset += gMainTable.taggedAliasArraySize;
  288|      1|    gMainTable.taggedAliasLists = table + currOffset;
  289|       |
  290|      1|    currOffset += gMainTable.taggedAliasListsSize;
  291|      1|    if (gMainTable.optionTableSize > 0
  ------------------
  |  Branch (291:9): [True: 1, False: 0]
  ------------------
  292|      1|        && reinterpret_cast<const UConverterAliasOptions*>(table + currOffset)->stringNormalizationType < UCNV_IO_NORM_TYPE_COUNT)
  ------------------
  |  Branch (292:12): [True: 1, False: 0]
  ------------------
  293|      1|    {
  294|       |        /* Faster table */
  295|      1|        gMainTable.optionTable = reinterpret_cast<const UConverterAliasOptions*>(table + currOffset);
  296|      1|    }
  297|      0|    else {
  298|       |        /* Smaller table, or I can't handle this normalization mode!
  299|       |        Use the original slower table lookup. */
  300|      0|        gMainTable.optionTable = &defaultTableOptions;
  301|      0|    }
  302|       |
  303|      1|    currOffset += gMainTable.optionTableSize;
  304|      1|    gMainTable.stringTable = table + currOffset;
  305|       |
  306|      1|    currOffset += gMainTable.stringTableSize;
  307|      1|    gMainTable.normalizedStringTable = ((gMainTable.optionTable->stringNormalizationType == UCNV_IO_UNNORMALIZED)
  ------------------
  |  Branch (307:41): [True: 0, False: 1]
  ------------------
  308|      1|        ? gMainTable.stringTable : (table + currOffset));
  309|      1|}
ucnv_io.cpp:_ZL12isAcceptablePvPKcS1_PK9UDataInfo:
  207|      1|             const UDataInfo *pInfo) {
  208|      1|    return
  209|      1|        pInfo->size>=20 &&
  ------------------
  |  Branch (209:9): [True: 1, False: 0]
  ------------------
  210|      1|        pInfo->isBigEndian==U_IS_BIG_ENDIAN &&
  ------------------
  |  |  353|      2|#   define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  ------------------
  |  Branch (210:9): [True: 1, False: 0]
  ------------------
  211|      1|        pInfo->charsetFamily==U_CHARSET_FAMILY &&
  ------------------
  |  |  588|      1|#   define U_CHARSET_FAMILY U_ASCII_FAMILY
  |  |  ------------------
  |  |  |  |  531|      2|#define U_ASCII_FAMILY 0
  |  |  ------------------
  ------------------
  |  Branch (211:9): [True: 1, False: 0]
  ------------------
  212|      1|        pInfo->dataFormat[0]==0x43 &&   /* dataFormat="CvAl" */
  ------------------
  |  Branch (212:9): [True: 1, False: 0]
  ------------------
  213|      1|        pInfo->dataFormat[1]==0x76 &&
  ------------------
  |  Branch (213:9): [True: 1, False: 0]
  ------------------
  214|      1|        pInfo->dataFormat[2]==0x41 &&
  ------------------
  |  Branch (214:9): [True: 1, False: 0]
  ------------------
  215|      1|        pInfo->dataFormat[3]==0x6c &&
  ------------------
  |  Branch (215:9): [True: 1, False: 0]
  ------------------
  216|      1|        pInfo->formatVersion[0]==3;
  ------------------
  |  Branch (216:9): [True: 1, False: 0]
  ------------------
  217|      1|}
ucnv_io.cpp:_ZL7isAliasPKcP10UErrorCode:
  319|  40.8k|isAlias(const char *alias, UErrorCode *pErrorCode) {
  320|  40.8k|    if(alias==nullptr) {
  ------------------
  |  Branch (320:8): [True: 0, False: 40.8k]
  ------------------
  321|      0|        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
  322|      0|        return false;
  323|      0|    }
  324|  40.8k|    return *alias != 0;
  325|  40.8k|}
ucnv_io.cpp:_ZL13findConverterPKcPaP10UErrorCode:
  552|  40.8k|findConverter(const char *alias, UBool *containsOption, UErrorCode *pErrorCode) {
  553|  40.8k|    uint32_t mid, start, limit;
  554|  40.8k|    uint32_t lastMid;
  555|  40.8k|    int result;
  556|  40.8k|    int isUnnormalized = (gMainTable.optionTable->stringNormalizationType == UCNV_IO_UNNORMALIZED);
  557|  40.8k|    char strippedName[UCNV_MAX_CONVERTER_NAME_LENGTH];
  558|       |
  559|  40.8k|    if (!isUnnormalized) {
  ------------------
  |  Branch (559:9): [True: 40.8k, False: 0]
  ------------------
  560|  40.8k|        if (uprv_strlen(alias) >= UCNV_MAX_CONVERTER_NAME_LENGTH) {
  ------------------
  |  |   37|  40.8k|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|  40.8k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
                      if (uprv_strlen(alias) >= UCNV_MAX_CONVERTER_NAME_LENGTH) {
  ------------------
  |  |   79|  40.8k|#define UCNV_MAX_CONVERTER_NAME_LENGTH 60
  ------------------
  |  Branch (560:13): [True: 0, False: 40.8k]
  ------------------
  561|      0|            *pErrorCode = U_BUFFER_OVERFLOW_ERROR;
  562|      0|            return UINT32_MAX;
  563|      0|        }
  564|       |
  565|       |        /* Lower case and remove ignoreable characters. */
  566|  40.8k|        ucnv_io_stripForCompare(strippedName, alias);
  ------------------
  |  |   73|  40.8k|#   define ucnv_io_stripForCompare ucnv_io_stripASCIIForCompare
  |  |  ------------------
  |  |  |  |  695|  40.8k|#define ucnv_io_stripASCIIForCompare U_ICU_ENTRY_POINT_RENAME(ucnv_io_stripASCIIForCompare)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  40.8k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  122|  40.8k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  121|  40.8k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  567|  40.8k|        alias = strippedName;
  568|  40.8k|    }
  569|       |
  570|       |    /* do a binary search for the alias */
  571|  40.8k|    start = 0;
  572|  40.8k|    limit = gMainTable.untaggedConvArraySize;
  573|  40.8k|    mid = limit;
  574|  40.8k|    lastMid = UINT32_MAX;
  575|       |
  576|   449k|    for (;;) {
  577|   449k|        mid = (start + limit) / 2;
  578|   449k|        if (lastMid == mid) {   /* Have we moved? */
  ------------------
  |  Branch (578:13): [True: 17.4k, False: 431k]
  ------------------
  579|  17.4k|            break;  /* We haven't moved, and it wasn't found. */
  580|  17.4k|        }
  581|   431k|        lastMid = mid;
  582|   431k|        if (isUnnormalized) {
  ------------------
  |  Branch (582:13): [True: 0, False: 431k]
  ------------------
  583|      0|            result = ucnv_compareNames(alias, GET_STRING(gMainTable.aliasList[mid]));
  ------------------
  |  |  640|      0|#define ucnv_compareNames U_ICU_ENTRY_POINT_RENAME(ucnv_compareNames)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          result = ucnv_compareNames(alias, GET_STRING(gMainTable.aliasList[mid]));
  ------------------
  |  |  201|      0|#define GET_STRING(idx) (const char *)(gMainTable.stringTable + (idx))
  ------------------
  584|      0|        }
  585|   431k|        else {
  586|   431k|            result = uprv_strcmp(alias, GET_NORMALIZED_STRING(gMainTable.aliasList[mid]));
  ------------------
  |  |   38|   431k|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|   431k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  587|   431k|        }
  588|       |
  589|   431k|        if (result < 0) {
  ------------------
  |  Branch (589:13): [True: 198k, False: 233k]
  ------------------
  590|   198k|            limit = mid;
  591|   233k|        } else if (result > 0) {
  ------------------
  |  Branch (591:20): [True: 209k, False: 23.3k]
  ------------------
  592|   209k|            start = mid;
  593|   209k|        } else {
  594|       |            /* Since the gencnval tool folds duplicates into one entry,
  595|       |             * this alias in gAliasList is unique, but different standards
  596|       |             * may map an alias to different converters.
  597|       |             */
  598|  23.3k|            if (gMainTable.untaggedConvArray[mid] & UCNV_AMBIGUOUS_ALIAS_MAP_BIT) {
  ------------------
  |  |   24|  23.3k|#define UCNV_AMBIGUOUS_ALIAS_MAP_BIT 0x8000
  ------------------
  |  Branch (598:17): [True: 3.47k, False: 19.8k]
  ------------------
  599|  3.47k|                *pErrorCode = U_AMBIGUOUS_ALIAS_WARNING;
  600|  3.47k|            }
  601|       |            /* State whether the canonical converter name contains an option.
  602|       |            This information is contained in this list in order to maintain backward & forward compatibility. */
  603|  23.3k|            if (containsOption) {
  ------------------
  |  Branch (603:17): [True: 23.3k, False: 0]
  ------------------
  604|  23.3k|                UBool containsCnvOptionInfo = static_cast<UBool>(gMainTable.optionTable->containsCnvOptionInfo);
  605|  23.3k|                *containsOption = static_cast<UBool>((containsCnvOptionInfo
  ------------------
  |  Branch (605:55): [True: 23.3k, False: 0]
  ------------------
  606|  23.3k|                    && ((gMainTable.untaggedConvArray[mid] & UCNV_CONTAINS_OPTION_BIT) != 0))
  ------------------
  |  |   25|  23.3k|#define UCNV_CONTAINS_OPTION_BIT 0x4000
  ------------------
  |  Branch (606:24): [True: 0, False: 23.3k]
  ------------------
  607|  23.3k|                    || !containsCnvOptionInfo);
  ------------------
  |  Branch (607:24): [True: 0, False: 23.3k]
  ------------------
  608|  23.3k|            }
  609|  23.3k|            return gMainTable.untaggedConvArray[mid] & UCNV_CONVERTER_INDEX_MASK;
  ------------------
  |  |   26|  23.3k|#define UCNV_CONVERTER_INDEX_MASK 0xFFF
  ------------------
  610|  23.3k|        }
  611|   431k|    }
  612|       |
  613|  17.4k|    return UINT32_MAX;
  614|  40.8k|}
ucnv_io.cpp:_ZL25ucnv_io_closeUEnumerationP12UEnumeration:
  816|      1|ucnv_io_closeUEnumeration(UEnumeration *enumerator) {
  817|      1|    uprv_free(enumerator->context);
  ------------------
  |  | 1503|      1|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  818|      1|    uprv_free(enumerator);
  ------------------
  |  | 1503|      1|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  819|      1|}
ucnv_io.cpp:_ZL26ucnv_io_countAllConvertersP12UEnumerationP10UErrorCode:
 1023|      1|ucnv_io_countAllConverters(UEnumeration * /*enumerator*/, UErrorCode * /*pErrorCode*/) {
 1024|      1|    return gMainTable.converterListSize;
 1025|      1|}
ucnv_io.cpp:_ZL25ucnv_io_nextAllConvertersP12UEnumerationPiP10UErrorCode:
 1031|    365|{
 1032|    365|    uint16_t *myContext = (uint16_t *)(enumerator->context);
 1033|       |
 1034|    365|    if (*myContext < gMainTable.converterListSize) {
  ------------------
  |  Branch (1034:9): [True: 365, False: 0]
  ------------------
 1035|    365|        const char *myStr = GET_STRING(gMainTable.converterList[(*myContext)++]);
  ------------------
  |  |  201|    365|#define GET_STRING(idx) (const char *)(gMainTable.stringTable + (idx))
  ------------------
 1036|    365|        if (resultLength) {
  ------------------
  |  Branch (1036:13): [True: 365, False: 0]
  ------------------
 1037|    365|            *resultLength = (int32_t)uprv_strlen(myStr);
  ------------------
  |  |   37|    365|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|    365|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1038|    365|        }
 1039|    365|        return myStr;
 1040|    365|    }
 1041|       |    /* Either we accessed a zero length list, or we enumerated too far. */
 1042|      0|    if (resultLength) {
  ------------------
  |  Branch (1042:9): [True: 0, False: 0]
  ------------------
 1043|      0|        *resultLength = 0;
 1044|      0|    }
 1045|      0|    return nullptr;
 1046|    365|}

ucnv_lmb.cpp:_ZL11_LMBCSOpen1P10UConverterP18UConverterLoadArgsP10UErrorCode:
  624|    345|   _LMBCSOpen##n(UConverter* _this, UConverterLoadArgs* pArgs, UErrorCode* err) \
  625|    345|{ _LMBCSOpenWorker(_this, pArgs, err, n); }
ucnv_lmb.cpp:_ZL16_LMBCSOpenWorkerP10UConverterP18UConverterLoadArgsP10UErrorCodeh:
  635|    345|{
  636|    345|    UConverterDataLMBCS* extraInfo = static_cast<UConverterDataLMBCS*>(uprv_malloc(sizeof(UConverterDataLMBCS)));
  ------------------
  |  | 1524|    345|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|    345|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    345|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    345|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  637|    345|    _this->extraInfo = extraInfo;
  638|    345|    if(extraInfo != nullptr)
  ------------------
  |  Branch (638:8): [True: 345, False: 0]
  ------------------
  639|    345|    {
  640|    345|        UConverterNamePieces stackPieces;
  641|    345|        UConverterLoadArgs stackArgs= UCNV_LOAD_ARGS_INITIALIZER;
  ------------------
  |  |   62|    345|    { (int32_t)sizeof(UConverterLoadArgs), 0, false, false, 0, 0, NULL, NULL, NULL }
  ------------------
  642|    345|        ulmbcs_byte_t i;
  643|       |
  644|    345|        uprv_memset(extraInfo, 0, sizeof(UConverterDataLMBCS));
  ------------------
  |  |  100|    345|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|    345|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  645|       |
  646|    345|        stackArgs.onlyTestIsLoadable = pArgs->onlyTestIsLoadable;
  647|       |
  648|  7.24k|        for (i=0; i <= ULMBCS_GRP_LAST && U_SUCCESS(*err); i++)         
  ------------------
  |  |  235|  14.4k|#define ULMBCS_GRP_LAST       0x13   /* last LMBCS group that has a converter */
  ------------------
  |  Branch (648:19): [True: 6.90k, False: 345]
  |  Branch (648:43): [True: 6.90k, False: 0]
  ------------------
  649|  6.90k|        {
  650|  6.90k|            if(OptGroupByteToCPName[i] != nullptr) {
  ------------------
  |  Branch (650:16): [True: 4.48k, False: 2.41k]
  ------------------
  651|  4.48k|                extraInfo->OptGrpConverter[i] = ucnv_loadSharedData(OptGroupByteToCPName[i], &stackPieces, &stackArgs, err);
  ------------------
  |  |  700|  4.48k|#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData)
  |  |  ------------------
  |  |  |  |  123|  4.48k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  4.48k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  4.48k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  652|  4.48k|            }
  653|  6.90k|        }
  654|       |
  655|    345|        if(U_FAILURE(*err) || pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (655:12): [True: 0, False: 345]
  |  Branch (655:31): [True: 1, False: 344]
  ------------------
  656|      1|            _LMBCSClose(_this);
  657|      1|            return;
  658|      1|        }
  659|    344|        extraInfo->OptGroup = OptGroup;
  660|    344|        extraInfo->localeConverterIndex = FindLMBCSLocale(pArgs->locale);
  661|    344|    }
  662|      0|    else
  663|      0|    {
  664|      0|        *err = U_MEMORY_ALLOCATION_ERROR;
  665|      0|    }
  666|    345|}
ucnv_lmb.cpp:_ZL15FindLMBCSLocalePKc:
  539|    344|{
  540|    344|   const struct _LocaleLMBCSGrpMap *pTable = LocaleLMBCSGrpMap;
  541|       |
  542|    344|   if ((!LocaleID) || (!*LocaleID)) 
  ------------------
  |  Branch (542:8): [True: 0, False: 344]
  |  Branch (542:23): [True: 344, False: 0]
  ------------------
  543|    344|   {
  544|    344|      return 0;
  545|    344|   }
  546|       |
  547|      0|   while (pTable->LocaleID)
  ------------------
  |  Branch (547:11): [True: 0, False: 0]
  ------------------
  548|      0|   {
  549|      0|      if (*pTable->LocaleID == *LocaleID) /* Check only first char for speed */
  ------------------
  |  Branch (549:11): [True: 0, False: 0]
  ------------------
  550|      0|      {
  551|       |         /* First char matches - check whole name, for entry-length */
  552|      0|         if (uprv_strncmp(pTable->LocaleID, LocaleID, strlen(pTable->LocaleID)) == 0)
  ------------------
  |  |   44|      0|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (552:14): [True: 0, False: 0]
  ------------------
  553|      0|            return pTable->OptGroup;
  554|      0|      }
  555|      0|      else
  556|      0|      if (*pTable->LocaleID > *LocaleID) /* Sorted alphabetically - exit */
  ------------------
  |  Branch (556:11): [True: 0, False: 0]
  ------------------
  557|      0|         break;
  558|      0|      pTable++;
  559|      0|   }
  560|      0|   return ULMBCS_GRP_L1;
  ------------------
  |  |  108|      0|#define ULMBCS_GRP_L1         0x01   /* Latin-1    :ibm-850  */
  ------------------
  561|      0|}
ucnv_lmb.cpp:_ZL11_LMBCSCloseP10UConverter:
  671|    345|{
  672|    345|    if (_this->extraInfo != nullptr)
  ------------------
  |  Branch (672:9): [True: 345, False: 0]
  ------------------
  673|    345|    {
  674|    345|        ulmbcs_byte_t Ix;
  675|    345|        UConverterDataLMBCS * extraInfo = (UConverterDataLMBCS *) _this->extraInfo;
  676|       |
  677|  7.24k|        for (Ix=0; Ix <= ULMBCS_GRP_LAST; Ix++)
  ------------------
  |  |  235|  7.24k|#define ULMBCS_GRP_LAST       0x13   /* last LMBCS group that has a converter */
  ------------------
  |  Branch (677:20): [True: 6.90k, False: 345]
  ------------------
  678|  6.90k|        {
  679|  6.90k|           if (extraInfo->OptGrpConverter[Ix] != nullptr)
  ------------------
  |  Branch (679:16): [True: 4.48k, False: 2.41k]
  ------------------
  680|  4.48k|              ucnv_unloadSharedDataIfReady(extraInfo->OptGrpConverter[Ix]);
  ------------------
  |  |  726|  4.48k|#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady)
  |  |  ------------------
  |  |  |  |  123|  4.48k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  4.48k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  4.48k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  681|  6.90k|        }
  682|    345|        if (!_this->isExtraLocal) {
  ------------------
  |  Branch (682:13): [True: 345, False: 0]
  ------------------
  683|    345|            uprv_free (_this->extraInfo);
  ------------------
  |  | 1503|    345|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|    345|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    345|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    345|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  684|    345|            _this->extraInfo = nullptr;
  685|    345|        }
  686|    345|    }
  687|    345|}
ucnv_lmb.cpp:_ZL17_LMBCSFromUnicodeP25UConverterFromUnicodeArgsP10UErrorCode:
  854|  1.45k|{
  855|  1.45k|   ulmbcs_byte_t lastConverterIndex = 0;
  856|  1.45k|   char16_t uniChar;
  857|  1.45k|   ulmbcs_byte_t  LMBCS[ULMBCS_CHARSIZE_MAX];
  858|  1.45k|   ulmbcs_byte_t  * pLMBCS;
  859|  1.45k|   int32_t bytes_written;
  860|  1.45k|   UBool groups_tried[ULMBCS_GRP_LAST+1];
  861|  1.45k|   UConverterDataLMBCS * extraInfo = (UConverterDataLMBCS *) args->converter->extraInfo;
  862|  1.45k|   int sourceIndex = 0; 
  863|       |
  864|       |   /* Basic strategy: attempt to fill in local LMBCS 1-char buffer.(LMBCS)
  865|       |      If that succeeds, see if it will all fit into the target & copy it over 
  866|       |      if it does.
  867|       |
  868|       |      We try conversions in the following order:
  869|       |
  870|       |      1. Single-byte ascii & special fixed control chars (&null)
  871|       |      2. Look up group in table & try that (could be 
  872|       |            A) Unicode group
  873|       |            B) control group,
  874|       |            C) national encoding, 
  875|       |               or ambiguous SBCS or MBCS group (on to step 4...)
  876|       |        
  877|       |      3. If its ambiguous, try this order:
  878|       |         A) The optimization group
  879|       |         B) The locale group
  880|       |         C) The last group that succeeded with this string.
  881|       |         D) every other group that's relevant (single or double)
  882|       |         E) If its single-byte ambiguous, try the exceptions group
  883|       |
  884|       |      4. And as a grand fallback: Unicode
  885|       |   */
  886|       |
  887|       |    /*Fix for SPR#DJOE66JFN3 (Lotus)*/
  888|  1.45k|    ulmbcs_byte_t OldConverterIndex = 0;
  889|       |
  890|  14.4M|   while (args->source < args->sourceLimit && !U_FAILURE(*err))
  ------------------
  |  Branch (890:11): [True: 14.4M, False: 354]
  |  Branch (890:47): [True: 14.4M, False: 789]
  ------------------
  891|  14.4M|   {
  892|       |      /*Fix for SPR#DJOE66JFN3 (Lotus)*/
  893|  14.4M|      OldConverterIndex = extraInfo->localeConverterIndex;
  894|       |
  895|  14.4M|      if (args->target >= args->targetLimit)
  ------------------
  |  Branch (895:11): [True: 316, False: 14.4M]
  ------------------
  896|    316|      {
  897|    316|         *err = U_BUFFER_OVERFLOW_ERROR;
  898|    316|         break;
  899|    316|      }
  900|  14.4M|      uniChar = *(args->source);
  901|  14.4M|      bytes_written = 0;
  902|  14.4M|      pLMBCS = LMBCS;
  903|       |
  904|       |      /* check cases in rough order of how common they are, for speed */
  905|       |
  906|       |      /* single byte matches: strategy 1 */
  907|       |      /*Fix for SPR#DJOE66JFN3 (Lotus)*/
  908|  14.4M|      if((uniChar>=0x80) && (uniChar<=0xff)
  ------------------
  |  Branch (908:10): [True: 14.4M, False: 15.6k]
  |  Branch (908:29): [True: 2.84k, False: 14.3M]
  ------------------
  909|  14.4M|      /*Fix for SPR#JUYA6XAERU and TSAO7GL5NK (Lotus)*/ &&(uniChar!=0xB1) &&(uniChar!=0xD7) &&(uniChar!=0xF7)
  ------------------
  |  Branch (909:59): [True: 2.65k, False: 195]
  |  Branch (909:77): [True: 2.44k, False: 211]
  |  Branch (909:95): [True: 2.24k, False: 194]
  ------------------
  910|  14.4M|        &&(uniChar!=0xB0) &&(uniChar!=0xB4) &&(uniChar!=0xB6) &&(uniChar!=0xA7) &&(uniChar!=0xA8))
  ------------------
  |  Branch (910:11): [True: 2.02k, False: 222]
  |  Branch (910:29): [True: 1.79k, False: 231]
  |  Branch (910:47): [True: 1.59k, False: 203]
  |  Branch (910:65): [True: 1.39k, False: 196]
  |  Branch (910:83): [True: 1.18k, False: 215]
  ------------------
  911|  1.18k|      {
  912|  1.18k|            extraInfo->localeConverterIndex = ULMBCS_GRP_L1;
  ------------------
  |  |  108|  1.18k|#define ULMBCS_GRP_L1         0x01   /* Latin-1    :ibm-850  */
  ------------------
  913|  1.18k|      }
  914|  14.4M|      if (((uniChar > ULMBCS_C0END) && (uniChar < ULMBCS_C1START)) ||
  ------------------
  |  |   92|  14.4M|#define ULMBCS_C0END           0x1F   
  ------------------
                    if (((uniChar > ULMBCS_C0END) && (uniChar < ULMBCS_C1START)) ||
  ------------------
  |  |   93|  14.4M|#define ULMBCS_C1START         0x80   
  ------------------
  |  Branch (914:12): [True: 14.4M, False: 11.3k]
  |  Branch (914:40): [True: 4.30k, False: 14.4M]
  ------------------
  915|  14.4M|          uniChar == 0 || uniChar == ULMBCS_HT || uniChar == ULMBCS_CR || 
  ------------------
  |  |  155|  28.8M|#define ULMBCS_HT    0x09   /* Fixed control char - Horizontal Tab */
  ------------------
                        uniChar == 0 || uniChar == ULMBCS_HT || uniChar == ULMBCS_CR || 
  ------------------
  |  |  157|  28.8M|#define ULMBCS_CR    0x0D   /* Fixed control char - Carriage Return */
  ------------------
  |  Branch (915:11): [True: 6.81k, False: 14.4M]
  |  Branch (915:27): [True: 242, False: 14.4M]
  |  Branch (915:51): [True: 202, False: 14.4M]
  ------------------
  916|  14.4M|          uniChar == ULMBCS_LF || uniChar == ULMBCS_123SYSTEMRANGE 
  ------------------
  |  |  156|  28.8M|#define ULMBCS_LF    0x0A   /* Fixed control char - Line Feed */
  ------------------
                        uniChar == ULMBCS_LF || uniChar == ULMBCS_123SYSTEMRANGE 
  ------------------
  |  |  162|  14.4M|#define ULMBCS_123SYSTEMRANGE  0x19   
  ------------------
  |  Branch (916:11): [True: 352, False: 14.4M]
  |  Branch (916:35): [True: 208, False: 14.4M]
  ------------------
  917|  14.4M|          )
  918|  12.1k|      {
  919|  12.1k|         *pLMBCS++ = (ulmbcs_byte_t ) uniChar;
  920|  12.1k|         bytes_written = 1;
  921|  12.1k|      }
  922|       |
  923|       |
  924|  14.4M|      if (!bytes_written) 
  ------------------
  |  Branch (924:11): [True: 14.4M, False: 12.1k]
  ------------------
  925|  14.4M|      {
  926|       |         /* Check by UNICODE range (Strategy 2) */
  927|  14.4M|         ulmbcs_byte_t group = FindLMBCSUniRange(uniChar);
  928|       |         
  929|  14.4M|         if (group == ULMBCS_GRP_UNICODE)  /* (Strategy 2A) */
  ------------------
  |  |  194|  14.4M|#define ULMBCS_GRP_UNICODE    0x14   
  ------------------
  |  Branch (929:14): [True: 47.2k, False: 14.3M]
  ------------------
  930|  47.2k|         {
  931|  47.2k|            pLMBCS += LMBCSConvertUni(pLMBCS,uniChar);
  932|       |            
  933|  47.2k|            bytes_written = (int32_t)(pLMBCS - LMBCS);
  934|  47.2k|         }
  935|  14.3M|         else if (group == ULMBCS_GRP_CTRL)  /* (Strategy 2B) */
  ------------------
  |  |  169|  14.3M|#define ULMBCS_GRP_CTRL       0x0F   
  ------------------
  |  Branch (935:19): [True: 3.99k, False: 14.3M]
  ------------------
  936|  3.99k|         {
  937|       |            /* Handle control characters here */
  938|  3.99k|            if (uniChar <= ULMBCS_C0END)
  ------------------
  |  |   92|  3.99k|#define ULMBCS_C0END           0x1F   
  ------------------
  |  Branch (938:17): [True: 3.55k, False: 440]
  ------------------
  939|  3.55k|            {
  940|  3.55k|               *pLMBCS++ = ULMBCS_GRP_CTRL;
  ------------------
  |  |  169|  3.55k|#define ULMBCS_GRP_CTRL       0x0F   
  ------------------
  941|  3.55k|               *pLMBCS++ = (ulmbcs_byte_t)(ULMBCS_CTRLOFFSET + uniChar);
  ------------------
  |  |  174|  3.55k|#define ULMBCS_CTRLOFFSET      0x20   
  ------------------
  942|  3.55k|            }
  943|    440|            else if (uniChar >= ULMBCS_C1START && uniChar <= ULMBCS_C1START + ULMBCS_CTRLOFFSET)
  ------------------
  |  |   93|    880|#define ULMBCS_C1START         0x80   
  ------------------
                          else if (uniChar >= ULMBCS_C1START && uniChar <= ULMBCS_C1START + ULMBCS_CTRLOFFSET)
  ------------------
  |  |   93|    440|#define ULMBCS_C1START         0x80   
  ------------------
                          else if (uniChar >= ULMBCS_C1START && uniChar <= ULMBCS_C1START + ULMBCS_CTRLOFFSET)
  ------------------
  |  |  174|    440|#define ULMBCS_CTRLOFFSET      0x20   
  ------------------
  |  Branch (943:22): [True: 440, False: 0]
  |  Branch (943:51): [True: 440, False: 0]
  ------------------
  944|    440|            {
  945|    440|               *pLMBCS++ = ULMBCS_GRP_CTRL;
  ------------------
  |  |  169|    440|#define ULMBCS_GRP_CTRL       0x0F   
  ------------------
  946|    440|               *pLMBCS++ = (ulmbcs_byte_t ) (uniChar & 0x00FF);
  947|    440|            }
  948|  3.99k|            bytes_written = (int32_t)(pLMBCS - LMBCS);
  949|  3.99k|         }
  950|  14.3M|         else if (group < ULMBCS_GRP_UNICODE)  /* (Strategy 2C) */
  ------------------
  |  |  194|  14.3M|#define ULMBCS_GRP_UNICODE    0x14   
  ------------------
  |  Branch (950:19): [True: 2.18k, False: 14.3M]
  ------------------
  951|  2.18k|         {
  952|       |            /* a specific converter has been identified - use it */
  953|  2.18k|            bytes_written = (int32_t)LMBCSConversionWorker (
  954|  2.18k|                              extraInfo, group, pLMBCS, &uniChar, 
  955|  2.18k|                              &lastConverterIndex, groups_tried);
  956|  2.18k|         }
  957|  14.4M|         if (!bytes_written)    /* the ambiguous group cases  (Strategy 3) */
  ------------------
  |  Branch (957:14): [True: 14.3M, False: 52.3k]
  ------------------
  958|  14.3M|         {
  959|  14.3M|            uprv_memset(groups_tried, 0, sizeof(groups_tried));
  ------------------
  |  |  100|  14.3M|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|  14.3M|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  960|       |
  961|       |            /* check for non-default optimization group (Strategy 3A )*/
  962|  14.3M|            if ((extraInfo->OptGroup != 1) && (ULMBCS_AMBIGUOUS_MATCH(group, extraInfo->OptGroup)))
  ------------------
  |  |  289|      0|                  ((((agroup) == ULMBCS_AMBIGUOUS_SBCS) && \
  |  |  ------------------
  |  |  |  |  280|      0|#define ULMBCS_AMBIGUOUS_SBCS   0x80   /* could fit in more than one 
  |  |  ------------------
  |  |  |  Branch (289:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  290|      0|                  (xgroup) < ULMBCS_DOUBLEOPTGROUP_START) || \
  |  |  ------------------
  |  |  |  |  133|      0|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  |  |  ------------------
  |  |  |  Branch (290:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|                  (((agroup) == ULMBCS_AMBIGUOUS_MBCS) && \
  |  |  ------------------
  |  |  |  |  283|      0|#define ULMBCS_AMBIGUOUS_MBCS   0x81   /* could fit in more than one 
  |  |  ------------------
  |  |  |  Branch (291:20): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|                  (xgroup) >= ULMBCS_DOUBLEOPTGROUP_START)) || \
  |  |  ------------------
  |  |  |  |  133|      0|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  |  |  ------------------
  |  |  |  Branch (292:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|                  ((agroup) == ULMBCS_AMBIGUOUS_ALL)
  |  |  ------------------
  |  |  |  |  286|      0|#define ULMBCS_AMBIGUOUS_ALL   0x82
  |  |  ------------------
  |  |  |  Branch (293:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (962:17): [True: 0, False: 14.3M]
  ------------------
  963|      0|            {
  964|       |                /*zhujin: upgrade, merge #39299 here (Lotus) */
  965|       |                /*To make R5 compatible translation, look for exceptional group first for non-DBCS*/
  966|       |
  967|      0|                if(extraInfo->localeConverterIndex < ULMBCS_DOUBLEOPTGROUP_START)
  ------------------
  |  |  133|      0|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  ------------------
  |  Branch (967:20): [True: 0, False: 0]
  ------------------
  968|      0|                {
  969|      0|                  bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
  970|      0|                     ULMBCS_GRP_L1, pLMBCS, &uniChar,
  ------------------
  |  |  108|      0|#define ULMBCS_GRP_L1         0x01   /* Latin-1    :ibm-850  */
  ------------------
  971|      0|                     &lastConverterIndex, groups_tried);
  972|       |
  973|      0|                  if(!bytes_written)
  ------------------
  |  Branch (973:22): [True: 0, False: 0]
  ------------------
  974|      0|                  {
  975|      0|                     bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
  976|      0|                         ULMBCS_GRP_EXCEPT, pLMBCS, &uniChar,
  ------------------
  |  |  189|      0|#define ULMBCS_GRP_EXCEPT     0x00    
  ------------------
  977|      0|                         &lastConverterIndex, groups_tried);
  978|      0|                  }
  979|      0|                  if(!bytes_written)
  ------------------
  |  Branch (979:22): [True: 0, False: 0]
  ------------------
  980|      0|                  {
  981|      0|                      bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
  982|      0|                          extraInfo->localeConverterIndex, pLMBCS, &uniChar,
  983|      0|                          &lastConverterIndex, groups_tried);
  984|      0|                  }
  985|      0|                }
  986|      0|                else
  987|      0|                {
  988|      0|                     bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
  989|      0|                         extraInfo->localeConverterIndex, pLMBCS, &uniChar,
  990|      0|                         &lastConverterIndex, groups_tried);
  991|      0|                }
  992|      0|            }
  993|       |            /* check for locale optimization group (Strategy 3B) */
  994|  14.3M|            if (!bytes_written && (extraInfo->localeConverterIndex) && (ULMBCS_AMBIGUOUS_MATCH(group, extraInfo->localeConverterIndex)))
  ------------------
  |  |  289|    741|                  ((((agroup) == ULMBCS_AMBIGUOUS_SBCS) && \
  |  |  ------------------
  |  |  |  |  280|    741|#define ULMBCS_AMBIGUOUS_SBCS   0x80   /* could fit in more than one 
  |  |  ------------------
  |  |  |  Branch (289:21): [True: 741, False: 0]
  |  |  ------------------
  |  |  290|    741|                  (xgroup) < ULMBCS_DOUBLEOPTGROUP_START) || \
  |  |  ------------------
  |  |  |  |  133|    741|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  |  |  ------------------
  |  |  |  Branch (290:19): [True: 741, False: 0]
  |  |  ------------------
  |  |  291|    741|                  (((agroup) == ULMBCS_AMBIGUOUS_MBCS) && \
  |  |  ------------------
  |  |  |  |  283|      0|#define ULMBCS_AMBIGUOUS_MBCS   0x81   /* could fit in more than one 
  |  |  ------------------
  |  |  |  Branch (291:20): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|                  (xgroup) >= ULMBCS_DOUBLEOPTGROUP_START)) || \
  |  |  ------------------
  |  |  |  |  133|      0|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  |  |  ------------------
  |  |  |  Branch (292:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    741|                  ((agroup) == ULMBCS_AMBIGUOUS_ALL)
  |  |  ------------------
  |  |  |  |  286|      0|#define ULMBCS_AMBIGUOUS_ALL   0x82
  |  |  ------------------
  |  |  |  Branch (293:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (994:17): [True: 14.3M, False: 0]
  |  Branch (994:35): [True: 741, False: 14.3M]
  ------------------
  995|    741|            {
  996|    741|                bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
  997|    741|                        extraInfo->localeConverterIndex, pLMBCS, &uniChar, &lastConverterIndex, groups_tried);
  998|    741|            }
  999|       |            /* check for last optimization group used for this string (Strategy 3C) */
 1000|  14.3M|            if (!bytes_written && (lastConverterIndex) && (ULMBCS_AMBIGUOUS_MATCH(group, lastConverterIndex)))
  ------------------
  |  |  289|  14.3M|                  ((((agroup) == ULMBCS_AMBIGUOUS_SBCS) && \
  |  |  ------------------
  |  |  |  |  280|  14.3M|#define ULMBCS_AMBIGUOUS_SBCS   0x80   /* could fit in more than one 
  |  |  ------------------
  |  |  |  Branch (289:21): [True: 6.70k, False: 14.3M]
  |  |  ------------------
  |  |  290|  14.3M|                  (xgroup) < ULMBCS_DOUBLEOPTGROUP_START) || \
  |  |  ------------------
  |  |  |  |  133|  6.70k|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  |  |  ------------------
  |  |  |  Branch (290:19): [True: 795, False: 5.91k]
  |  |  ------------------
  |  |  291|  14.3M|                  (((agroup) == ULMBCS_AMBIGUOUS_MBCS) && \
  |  |  ------------------
  |  |  |  |  283|  14.3M|#define ULMBCS_AMBIGUOUS_MBCS   0x81   /* could fit in more than one 
  |  |  ------------------
  |  |  |  Branch (291:20): [True: 14.3M, False: 9.45k]
  |  |  ------------------
  |  |  292|  14.3M|                  (xgroup) >= ULMBCS_DOUBLEOPTGROUP_START)) || \
  |  |  ------------------
  |  |  |  |  133|  14.3M|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  |  |  ------------------
  |  |  |  Branch (292:19): [True: 14.3M, False: 2.02k]
  |  |  ------------------
  |  |  293|  14.3M|                  ((agroup) == ULMBCS_AMBIGUOUS_ALL)
  |  |  ------------------
  |  |  |  |  286|  11.4k|#define ULMBCS_AMBIGUOUS_ALL   0x82
  |  |  ------------------
  |  |  |  Branch (293:19): [True: 2.57k, False: 8.90k]
  |  |  ------------------
  ------------------
  |  Branch (1000:17): [True: 14.3M, False: 741]
  |  Branch (1000:35): [True: 14.3M, False: 4.66k]
  ------------------
 1001|  14.3M|            {
 1002|  14.3M|                bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
 1003|  14.3M|                        lastConverterIndex, pLMBCS, &uniChar, &lastConverterIndex, groups_tried);
 1004|  14.3M|            }
 1005|  14.3M|            if (!bytes_written)
  ------------------
  |  Branch (1005:17): [True: 101k, False: 14.2M]
  ------------------
 1006|   101k|            {
 1007|       |               /* just check every possible matching converter (Strategy 3D) */ 
 1008|   101k|               ulmbcs_byte_t grp_start;
 1009|   101k|               ulmbcs_byte_t grp_end;  
 1010|   101k|               ulmbcs_byte_t grp_ix;
 1011|   101k|               grp_start = (ulmbcs_byte_t)((group == ULMBCS_AMBIGUOUS_MBCS) 
  ------------------
  |  |  283|   101k|#define ULMBCS_AMBIGUOUS_MBCS   0x81   /* could fit in more than one 
  ------------------
  |  Branch (1011:44): [True: 92.2k, False: 9.26k]
  ------------------
 1012|   101k|                        ? ULMBCS_DOUBLEOPTGROUP_START 
  ------------------
  |  |  133|  92.2k|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  ------------------
 1013|   101k|                        :  ULMBCS_GRP_L1);
  ------------------
  |  |  108|  9.26k|#define ULMBCS_GRP_L1         0x01   /* Latin-1    :ibm-850  */
  ------------------
 1014|   101k|               grp_end = (ulmbcs_byte_t)((group == ULMBCS_AMBIGUOUS_MBCS) 
  ------------------
  |  |  283|   101k|#define ULMBCS_AMBIGUOUS_MBCS   0x81   /* could fit in more than one 
  ------------------
  |  Branch (1014:42): [True: 92.2k, False: 9.26k]
  ------------------
 1015|   101k|                        ? ULMBCS_GRP_LAST 
  ------------------
  |  |  235|  92.2k|#define ULMBCS_GRP_LAST       0x13   /* last LMBCS group that has a converter */
  ------------------
 1016|   101k|                        :  ULMBCS_GRP_TH);
  ------------------
  |  |  115|  9.26k|#define ULMBCS_GRP_TH         0x0B   /* Thai       :ibm-874  */
  ------------------
 1017|   101k|               if(group == ULMBCS_AMBIGUOUS_ALL)
  ------------------
  |  |  286|   101k|#define ULMBCS_AMBIGUOUS_ALL   0x82
  ------------------
  |  Branch (1017:19): [True: 697, False: 100k]
  ------------------
 1018|    697|               {
 1019|    697|                   grp_start = ULMBCS_GRP_L1;
  ------------------
  |  |  108|    697|#define ULMBCS_GRP_L1         0x01   /* Latin-1    :ibm-850  */
  ------------------
 1020|    697|                   grp_end = ULMBCS_GRP_LAST;
  ------------------
  |  |  235|    697|#define ULMBCS_GRP_LAST       0x13   /* last LMBCS group that has a converter */
  ------------------
 1021|    697|               }
 1022|   101k|               for (grp_ix = grp_start;
 1023|   532k|                   grp_ix <= grp_end && !bytes_written; 
  ------------------
  |  Branch (1023:20): [True: 453k, False: 79.1k]
  |  Branch (1023:41): [True: 430k, False: 22.4k]
  ------------------
 1024|   430k|                    grp_ix++)
 1025|   430k|               {
 1026|   430k|                  if (extraInfo->OptGrpConverter [grp_ix] && !groups_tried [grp_ix])
  ------------------
  |  Branch (1026:23): [True: 404k, False: 26.5k]
  |  Branch (1026:62): [True: 329k, False: 74.5k]
  ------------------
 1027|   329k|                  {
 1028|   329k|                     bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
 1029|   329k|                       grp_ix, pLMBCS, &uniChar, 
 1030|   329k|                       &lastConverterIndex, groups_tried);
 1031|   329k|                  }
 1032|   430k|               }
 1033|       |                /* a final conversion fallback to the exceptions group if its likely 
 1034|       |                     to be single byte  (Strategy 3E) */
 1035|   101k|               if (!bytes_written && grp_start == ULMBCS_GRP_L1)
  ------------------
  |  |  108|  68.6k|#define ULMBCS_GRP_L1         0x01   /* Latin-1    :ibm-850  */
  ------------------
  |  Branch (1035:20): [True: 68.6k, False: 32.8k]
  |  Branch (1035:38): [True: 8.16k, False: 60.5k]
  ------------------
 1036|  8.16k|               {
 1037|  8.16k|                  bytes_written = (int32_t)LMBCSConversionWorker (extraInfo,
 1038|  8.16k|                     ULMBCS_GRP_EXCEPT, pLMBCS, &uniChar, 
  ------------------
  |  |  189|  8.16k|#define ULMBCS_GRP_EXCEPT     0x00    
  ------------------
 1039|  8.16k|                     &lastConverterIndex, groups_tried);
 1040|  8.16k|               }
 1041|   101k|            }
 1042|       |            /* all of our other strategies failed. Fallback to Unicode. (Strategy 4)*/
 1043|  14.3M|            if (!bytes_written)
  ------------------
  |  Branch (1043:17): [True: 66.8k, False: 14.2M]
  ------------------
 1044|  66.8k|            {
 1045|       |
 1046|  66.8k|               pLMBCS += LMBCSConvertUni(pLMBCS, uniChar);
 1047|  66.8k|               bytes_written = (int32_t)(pLMBCS - LMBCS);
 1048|  66.8k|            }
 1049|  14.3M|         }
 1050|  14.4M|      }
 1051|       |  
 1052|       |      /* we have a translation. increment source and write as much as possible to target */
 1053|  14.4M|      args->source++;
 1054|  14.4M|      pLMBCS = LMBCS;
 1055|  57.6M|      while (args->target < args->targetLimit && bytes_written--)
  ------------------
  |  Branch (1055:14): [True: 57.6M, False: 1.11k]
  |  Branch (1055:50): [True: 43.2M, False: 14.4M]
  ------------------
 1056|  43.2M|      {
 1057|  43.2M|         *(args->target)++ = *pLMBCS++;
 1058|  43.2M|         if (args->offsets)
  ------------------
  |  Branch (1058:14): [True: 0, False: 43.2M]
  ------------------
 1059|      0|         {
 1060|      0|            *(args->offsets)++ = sourceIndex;
 1061|      0|         }
 1062|  43.2M|      }
 1063|  14.4M|      sourceIndex++;
 1064|  14.4M|      if (bytes_written > 0)
  ------------------
  |  Branch (1064:11): [True: 801, False: 14.4M]
  ------------------
 1065|    801|      {
 1066|       |         /* write any bytes that didn't fit in target to the error buffer,
 1067|       |            common code will move this to target if we get called back with
 1068|       |            enough target room
 1069|       |         */
 1070|    801|         uint8_t * pErrorBuffer = args->converter->charErrorBuffer;
 1071|    801|         *err = U_BUFFER_OVERFLOW_ERROR;
 1072|    801|         args->converter->charErrorBufferLength = (int8_t)bytes_written;
 1073|  2.09k|         while (bytes_written--)
  ------------------
  |  Branch (1073:17): [True: 1.29k, False: 801]
  ------------------
 1074|  1.29k|         {
 1075|  1.29k|            *pErrorBuffer++ = *pLMBCS++;
 1076|  1.29k|         }
 1077|    801|      }
 1078|       |      /*Fix for SPR#DJOE66JFN3 (Lotus)*/
 1079|  14.4M|      extraInfo->localeConverterIndex = OldConverterIndex;
 1080|  14.4M|   }     
 1081|  1.45k|}
ucnv_lmb.cpp:_ZL17FindLMBCSUniRangeDs:
  449|  14.4M|{
  450|  14.4M|   const struct _UniLMBCSGrpMap * pTable = UniLMBCSGrpMap;
  451|       |
  452|  1.88G|   while (uniChar > pTable->uniEndRange) 
  ------------------
  |  Branch (452:11): [True: 1.86G, False: 14.4M]
  ------------------
  453|  1.86G|   {
  454|  1.86G|      pTable++;
  455|  1.86G|   }
  456|       |
  457|  14.4M|   if (uniChar >= pTable->uniStartRange) 
  ------------------
  |  Branch (457:8): [True: 14.3M, False: 42.4k]
  ------------------
  458|  14.3M|   {
  459|  14.3M|      return pTable->GrpType;
  460|  14.3M|   }
  461|  42.4k|   return ULMBCS_GRP_UNICODE;
  ------------------
  |  |  194|  42.4k|#define ULMBCS_GRP_UNICODE    0x14   
  ------------------
  462|  14.4M|}
ucnv_lmb.cpp:_ZL15LMBCSConvertUniPhDs:
  828|   114k|{
  829|       |     /* encode into LMBCS Unicode range */
  830|   114k|   uint8_t LowCh =   (uint8_t)(uniChar & 0x00FF);
  831|   114k|   uint8_t HighCh  = (uint8_t)(uniChar >> 8);
  832|       |
  833|   114k|   *pLMBCS++ = ULMBCS_GRP_UNICODE;
  ------------------
  |  |  194|   114k|#define ULMBCS_GRP_UNICODE    0x14   
  ------------------
  834|       |
  835|   114k|   if (LowCh == 0)
  ------------------
  |  Branch (835:8): [True: 5.58k, False: 108k]
  ------------------
  836|  5.58k|   {
  837|  5.58k|      *pLMBCS++ = ULMBCS_UNICOMPATZERO;
  ------------------
  |  |  201|  5.58k|#define ULMBCS_UNICOMPATZERO   0xF6   
  ------------------
  838|  5.58k|      *pLMBCS++ = HighCh;
  839|  5.58k|   }
  840|   108k|   else
  841|   108k|   {
  842|   108k|      *pLMBCS++ = HighCh;
  843|   108k|      *pLMBCS++ = LowCh;
  844|   108k|   }
  845|   114k|   return ULMBCS_UNICODE_SIZE;
  ------------------
  |  |  205|   114k|#define ULMBCS_UNICODE_SIZE      3    
  ------------------
  846|   114k|}
ucnv_lmb.cpp:_ZL21LMBCSConversionWorkerP19UConverterDataLMBCShPhPDsS1_Pa:
  755|  14.6M|{
  756|  14.6M|   ulmbcs_byte_t  * pLMBCS = pStartLMBCS;
  757|  14.6M|   UConverterSharedData * xcnv = extraInfo->OptGrpConverter[group];
  758|       |
  759|  14.6M|   int bytesConverted;
  760|  14.6M|   uint32_t value;
  761|  14.6M|   ulmbcs_byte_t firstByte;
  762|       |
  763|  14.6M|   U_ASSERT(xcnv);
  ------------------
  |  |   35|  14.6M|#   define U_ASSERT(exp) (void)0
  ------------------
  764|  14.6M|   U_ASSERT(group<ULMBCS_GRP_UNICODE);
  ------------------
  |  |   35|  14.6M|#   define U_ASSERT(exp) (void)0
  ------------------
  765|       |
  766|  14.6M|   bytesConverted = ucnv_MBCSFromUChar32(xcnv, *pUniChar, &value, false);
  ------------------
  |  |  622|  14.6M|#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
  |  |  ------------------
  |  |  |  |  123|  14.6M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  14.6M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  14.6M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  767|       |
  768|       |   /* get the first result byte */
  769|  14.6M|   if(bytesConverted > 0) {
  ------------------
  |  Branch (769:7): [True: 14.2M, False: 392k]
  ------------------
  770|  14.2M|      firstByte = (ulmbcs_byte_t)(value >> ((bytesConverted - 1) * 8));
  771|  14.2M|   } else {
  772|       |      /* most common failure mode is an unassigned character */
  773|   392k|      groups_tried[group] = true;
  774|   392k|      return 0;
  775|   392k|   }
  776|       |
  777|  14.2M|   *lastConverterIndex = group;
  778|       |
  779|       |   /* All initial byte values in lower ascii range should have been caught by now,
  780|       |      except with the exception group.
  781|       |    */
  782|  14.2M|   U_ASSERT((firstByte <= ULMBCS_C0END) || (firstByte >= ULMBCS_C1START) || (group == ULMBCS_GRP_EXCEPT));
  ------------------
  |  |   35|  14.2M|#   define U_ASSERT(exp) (void)0
  ------------------
  783|       |   
  784|       |   /* use converted data: first write 0, 1 or two group bytes */
  785|  14.2M|   if (group != ULMBCS_GRP_EXCEPT && extraInfo->OptGroup != group)
  ------------------
  |  |  189|  28.5M|#define ULMBCS_GRP_EXCEPT     0x00    
  ------------------
  |  Branch (785:8): [True: 14.2M, False: 2.30k]
  |  Branch (785:38): [True: 14.2M, False: 2.26k]
  ------------------
  786|  14.2M|   {
  787|  14.2M|      *pLMBCS++ = group;
  788|  14.2M|      if (bytesConverted == 1 && group >= ULMBCS_DOUBLEOPTGROUP_START)
  ------------------
  |  |  133|  2.15k|#define ULMBCS_DOUBLEOPTGROUP_START  0x10   
  ------------------
  |  Branch (788:11): [True: 2.15k, False: 14.2M]
  |  Branch (788:34): [True: 492, False: 1.66k]
  ------------------
  789|    492|      {
  790|    492|         *pLMBCS++ = group;
  791|    492|      }
  792|  14.2M|   }
  793|       |
  794|       |  /* don't emit control chars */
  795|  14.2M|   if ( bytesConverted == 1 && firstByte < 0x20 )
  ------------------
  |  Branch (795:9): [True: 4.42k, False: 14.2M]
  |  Branch (795:32): [True: 0, False: 4.42k]
  ------------------
  796|      0|      return 0;
  797|       |
  798|       |
  799|       |   /* then move over the converted data */
  800|  14.2M|   switch(bytesConverted)
  801|  14.2M|   {
  802|      0|   case 4:
  ------------------
  |  Branch (802:4): [True: 0, False: 14.2M]
  ------------------
  803|      0|      *pLMBCS++ = (ulmbcs_byte_t)(value >> 24);
  804|      0|      U_FALLTHROUGH;
  ------------------
  |  |  511|      0|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  805|      0|   case 3:
  ------------------
  |  Branch (805:4): [True: 0, False: 14.2M]
  ------------------
  806|      0|      *pLMBCS++ = (ulmbcs_byte_t)(value >> 16);
  807|      0|      U_FALLTHROUGH;
  ------------------
  |  |  511|      0|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  808|  14.2M|   case 2:
  ------------------
  |  Branch (808:4): [True: 14.2M, False: 4.42k]
  ------------------
  809|  14.2M|      *pLMBCS++ = (ulmbcs_byte_t)(value >> 8);
  810|  14.2M|      U_FALLTHROUGH;
  ------------------
  |  |  511|  14.2M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  811|  14.2M|   case 1:
  ------------------
  |  Branch (811:4): [True: 4.42k, False: 14.2M]
  ------------------
  812|  14.2M|      *pLMBCS++ = (ulmbcs_byte_t)value;
  813|  14.2M|      U_FALLTHROUGH;
  ------------------
  |  |  511|  14.2M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  814|  14.2M|   default:
  ------------------
  |  Branch (814:4): [True: 0, False: 14.2M]
  ------------------
  815|       |      /* will never occur */
  816|  14.2M|      break;
  817|  14.2M|   }
  818|       |
  819|  14.2M|   return (pLMBCS - pStartLMBCS);
  820|  14.2M|}

ucnv_u16.cpp:_ZL12_UTF16BEOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
  591|     70|             UErrorCode *pErrorCode) {
  592|     70|    (void)pArgs;
  593|     70|    if(UCNV_GET_VERSION(cnv)<=1) {
  ------------------
  |  |   47|     70|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|     70|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (593:8): [True: 70, False: 0]
  ------------------
  594|     70|        _UTF16BEReset(cnv, UCNV_RESET_BOTH);
  595|     70|    } else {
  596|      0|        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
  597|      0|    }
  598|     70|}
ucnv_u16.cpp:_ZL13_UTF16BEResetP10UConverter21UConverterResetChoice:
  573|    202|_UTF16BEReset(UConverter *cnv, UConverterResetChoice choice) {
  574|    202|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (574:8): [True: 70, False: 132]
  ------------------
  575|       |        /* reset toUnicode state */
  576|     70|        if(UCNV_GET_VERSION(cnv)==0) {
  ------------------
  |  |   47|     70|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|     70|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (576:12): [True: 50, False: 20]
  ------------------
  577|     50|            cnv->mode=8; /* no BOM handling */
  578|     50|        } else {
  579|     20|            cnv->mode=0; /* Java-specific "UnicodeBig" requires BE BOM or no BOM */
  580|     20|        }
  581|     70|    }
  582|    202|    if(choice!=UCNV_RESET_TO_UNICODE && UCNV_GET_VERSION(cnv)==1) {
  ------------------
  |  |   47|    202|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|    202|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (582:8): [True: 202, False: 0]
  |  Branch (582:41): [True: 58, False: 144]
  ------------------
  583|       |        /* reset fromUnicode for "UnicodeBig": prepare to output the UTF-16BE BOM */
  584|     58|        cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM;
  585|     58|    }
  586|    202|}
ucnv_u16.cpp:_ZL30_UTF16BEFromUnicodeWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
   53|   658k|                               UErrorCode *pErrorCode) {
   54|   658k|    UConverter *cnv;
   55|   658k|    const char16_t *source;
   56|   658k|    char *target;
   57|   658k|    int32_t *offsets;
   58|       |
   59|   658k|    uint32_t targetCapacity, length, sourceIndex;
   60|   658k|    char16_t c, trail;
   61|   658k|    char overflow[4];
   62|       |
   63|   658k|    source=pArgs->source;
   64|   658k|    length=(int32_t)(pArgs->sourceLimit-source);
   65|   658k|    if(length<=0) {
  ------------------
  |  Branch (65:8): [True: 21, False: 658k]
  ------------------
   66|       |        /* no input, nothing to do */
   67|     21|        return;
   68|     21|    }
   69|       |
   70|   658k|    cnv=pArgs->converter;
   71|       |
   72|       |    /* write the BOM if necessary */
   73|   658k|    if(cnv->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) {
  ------------------
  |  Branch (73:8): [True: 40, False: 658k]
  ------------------
   74|     40|        static const char bom[]={ (char)0xfeu, (char)0xffu };
   75|     40|        ucnv_fromUWriteBytes(cnv,
  ------------------
  |  |  664|     40|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|     40|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     40|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     40|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   76|     40|                             bom, 2,
   77|     40|                             &pArgs->target, pArgs->targetLimit,
   78|     40|                             &pArgs->offsets, -1,
   79|     40|                             pErrorCode);
   80|     40|        cnv->fromUnicodeStatus=0;
   81|     40|    }
   82|       |
   83|   658k|    target=pArgs->target;
   84|   658k|    if(target >= pArgs->targetLimit) {
  ------------------
  |  Branch (84:8): [True: 0, False: 658k]
  ------------------
   85|      0|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
   86|      0|        return;
   87|      0|    }
   88|       |
   89|   658k|    targetCapacity=(uint32_t)(pArgs->targetLimit-target);
   90|   658k|    offsets=pArgs->offsets;
   91|   658k|    sourceIndex=0;
   92|       |
   93|       |    /* c!=0 indicates in several places outside the main loops that a surrogate was found */
   94|       |
   95|   658k|    if((c=(char16_t)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) {
  ------------------
  |  |   67|   658k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (95:8): [True: 0, False: 658k]
  |  Branch (95:76): [True: 0, False: 0]
  ------------------
   96|       |        /* the last buffer ended with a lead surrogate, output the surrogate pair */
   97|      0|        ++source;
   98|      0|        --length;
   99|      0|        target[0]=(uint8_t)(c>>8);
  100|      0|        target[1]=(uint8_t)c;
  101|      0|        target[2]=(uint8_t)(trail>>8);
  102|      0|        target[3]=(uint8_t)trail;
  103|      0|        target+=4;
  104|      0|        targetCapacity-=4;
  105|      0|        if(offsets!=nullptr) {
  ------------------
  |  Branch (105:12): [True: 0, False: 0]
  ------------------
  106|      0|            *offsets++=-1;
  107|      0|            *offsets++=-1;
  108|      0|            *offsets++=-1;
  109|      0|            *offsets++=-1;
  110|      0|        }
  111|      0|        sourceIndex=1;
  112|      0|        cnv->fromUChar32=c=0;
  113|      0|    }
  114|       |
  115|   658k|    if(c==0) {
  ------------------
  |  Branch (115:8): [True: 658k, False: 0]
  ------------------
  116|       |        /* copy an even number of bytes for complete UChars */
  117|   658k|        uint32_t count=2*length;
  118|   658k|        if(count>targetCapacity) {
  ------------------
  |  Branch (118:12): [True: 0, False: 658k]
  ------------------
  119|      0|            count=targetCapacity&~1;
  120|      0|        }
  121|       |        /* count is even */
  122|   658k|        targetCapacity-=count;
  123|   658k|        count>>=1;
  124|   658k|        length-=count;
  125|       |
  126|   658k|        if(offsets==nullptr) {
  ------------------
  |  Branch (126:12): [True: 658k, False: 0]
  ------------------
  127|  6.37M|            while(count>0) {
  ------------------
  |  Branch (127:19): [True: 6.37M, False: 66]
  ------------------
  128|  6.37M|                c=*source++;
  129|  6.37M|                if(U16_IS_SINGLE(c)) {
  ------------------
  |  |   51|  6.37M|#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  6.37M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (51:26): [True: 5.70M, False: 667k]
  |  |  ------------------
  ------------------
  130|  5.70M|                    target[0]=(uint8_t)(c>>8);
  131|  5.70M|                    target[1]=(uint8_t)c;
  132|  5.70M|                    target+=2;
  133|  5.70M|                } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   84|  1.33M|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 53.7k, False: 614k]
  |  |  ------------------
  ------------------
                              } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   67|  53.7k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 9.05k, False: 44.6k]
  |  |  ------------------
  ------------------
  |  Branch (133:55): [True: 53.7k, False: 7]
  ------------------
  134|  9.05k|                    ++source;
  135|  9.05k|                    --count;
  136|  9.05k|                    target[0]=(uint8_t)(c>>8);
  137|  9.05k|                    target[1]=(uint8_t)c;
  138|  9.05k|                    target[2]=(uint8_t)(trail>>8);
  139|  9.05k|                    target[3]=(uint8_t)trail;
  140|  9.05k|                    target+=4;
  141|   658k|                } else {
  142|   658k|                    break;
  143|   658k|                }
  144|  5.71M|                --count;
  145|  5.71M|            }
  146|   658k|        } else {
  147|      0|            while(count>0) {
  ------------------
  |  Branch (147:19): [True: 0, False: 0]
  ------------------
  148|      0|                c=*source++;
  149|      0|                if(U16_IS_SINGLE(c)) {
  ------------------
  |  |   51|      0|#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|      0|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (51:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  150|      0|                    target[0]=(uint8_t)(c>>8);
  151|      0|                    target[1]=(uint8_t)c;
  152|      0|                    target+=2;
  153|      0|                    *offsets++=sourceIndex;
  154|      0|                    *offsets++=sourceIndex++;
  155|      0|                } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   84|      0|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   67|      0|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (155:55): [True: 0, False: 0]
  ------------------
  156|      0|                    ++source;
  157|      0|                    --count;
  158|      0|                    target[0]=(uint8_t)(c>>8);
  159|      0|                    target[1]=(uint8_t)c;
  160|      0|                    target[2]=(uint8_t)(trail>>8);
  161|      0|                    target[3]=(uint8_t)trail;
  162|      0|                    target+=4;
  163|      0|                    *offsets++=sourceIndex;
  164|      0|                    *offsets++=sourceIndex;
  165|      0|                    *offsets++=sourceIndex;
  166|      0|                    *offsets++=sourceIndex;
  167|      0|                    sourceIndex+=2;
  168|      0|                } else {
  169|      0|                    break;
  170|      0|                }
  171|      0|                --count;
  172|      0|            }
  173|      0|        }
  174|       |
  175|   658k|        if(count==0) {
  ------------------
  |  Branch (175:12): [True: 66, False: 658k]
  ------------------
  176|       |            /* done with the loop for complete UChars */
  177|     66|            if(length>0 && targetCapacity>0) {
  ------------------
  |  Branch (177:16): [True: 0, False: 66]
  |  Branch (177:28): [True: 0, False: 0]
  ------------------
  178|       |                /*
  179|       |                 * there is more input and some target capacity -
  180|       |                 * it must be targetCapacity==1 because otherwise
  181|       |                 * the above would have copied more;
  182|       |                 * prepare for overflow output
  183|       |                 */
  184|      0|                if(U16_IS_SINGLE(c=*source++)) {
  ------------------
  |  |   51|      0|#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|      0|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (51:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  185|      0|                    overflow[0]=(char)(c>>8);
  186|      0|                    overflow[1]=(char)c;
  187|      0|                    length=2; /* 2 bytes to output */
  188|      0|                    c=0;
  189|       |                /* } else { keep c for surrogate handling, length will be set there */
  190|      0|                }
  191|     66|            } else {
  192|     66|                length=0;
  193|     66|                c=0;
  194|     66|            }
  195|   658k|        } else {
  196|       |            /* keep c for surrogate handling, length will be set there */
  197|   658k|            targetCapacity+=2*count;
  198|   658k|        }
  199|   658k|    } else {
  200|      0|        length=0; /* from here on, length counts the bytes in overflow[] */
  201|      0|    }
  202|       |    
  203|   658k|    if(c!=0) {
  ------------------
  |  Branch (203:8): [True: 658k, False: 66]
  ------------------
  204|       |        /*
  205|       |         * c is a surrogate, and
  206|       |         * - source or target too short
  207|       |         * - or the surrogate is unmatched
  208|       |         */
  209|   658k|        length=0;
  210|   658k|        if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|   658k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 44.6k, False: 614k]
  |  |  ------------------
  ------------------
  211|  44.6k|            if(source<pArgs->sourceLimit) {
  ------------------
  |  Branch (211:16): [True: 44.6k, False: 7]
  ------------------
  212|  44.6k|                if(U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   67|  44.6k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 44.6k]
  |  |  ------------------
  ------------------
  213|       |                    /* output the surrogate pair, will overflow (see conditions comment above) */
  214|      0|                    ++source;
  215|      0|                    overflow[0]=(char)(c>>8);
  216|      0|                    overflow[1]=(char)c;
  217|      0|                    overflow[2]=(char)(trail>>8);
  218|      0|                    overflow[3]=(char)trail;
  219|      0|                    length=4; /* 4 bytes to output */
  220|      0|                    c=0;
  221|  44.6k|                } else {
  222|       |                    /* unmatched lead surrogate */
  223|  44.6k|                    *pErrorCode=U_ILLEGAL_CHAR_FOUND;
  224|  44.6k|                }
  225|  44.6k|            } else {
  226|       |                /* see if the trail surrogate is in the next buffer */
  227|      7|            }
  228|   614k|        } else {
  229|       |            /* unmatched trail surrogate */
  230|   614k|            *pErrorCode=U_ILLEGAL_CHAR_FOUND;
  231|   614k|        }
  232|   658k|        cnv->fromUChar32=c;
  233|   658k|    }
  234|       |
  235|   658k|    if(length>0) {
  ------------------
  |  Branch (235:8): [True: 0, False: 658k]
  ------------------
  236|       |        /* output length bytes with overflow (length>targetCapacity>0) */
  237|      0|        ucnv_fromUWriteBytes(cnv,
  ------------------
  |  |  664|      0|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|      0|                             overflow, length,
  239|      0|                             &target, pArgs->targetLimit,
  240|      0|                             &offsets, sourceIndex,
  241|      0|                             pErrorCode);
  242|      0|        targetCapacity = static_cast<uint32_t>(pArgs->targetLimit - target);
  243|      0|    }
  244|       |
  245|   658k|    if(U_SUCCESS(*pErrorCode) && source<pArgs->sourceLimit && targetCapacity==0) {
  ------------------
  |  Branch (245:8): [True: 73, False: 658k]
  |  Branch (245:34): [True: 0, False: 73]
  |  Branch (245:63): [True: 0, False: 0]
  ------------------
  246|      0|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  247|      0|    }
  248|       |
  249|       |    /* write back the updated pointers */
  250|   658k|    pArgs->source=source;
  251|   658k|    pArgs->target = target;
  252|   658k|    pArgs->offsets=offsets;
  253|   658k|}
ucnv_u16.cpp:_ZL12_UTF16LEOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
 1192|     52|             UErrorCode *pErrorCode) {
 1193|     52|    (void)pArgs;
 1194|     52|    if(UCNV_GET_VERSION(cnv)<=1) {
  ------------------
  |  |   47|     52|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|     52|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (1194:8): [True: 52, False: 0]
  ------------------
 1195|     52|        _UTF16LEReset(cnv, UCNV_RESET_BOTH);
 1196|     52|    } else {
 1197|      0|        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
 1198|      0|    }
 1199|     52|}
ucnv_u16.cpp:_ZL13_UTF16LEResetP10UConverter21UConverterResetChoice:
 1174|    148|_UTF16LEReset(UConverter *cnv, UConverterResetChoice choice) {
 1175|    148|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (1175:8): [True: 52, False: 96]
  ------------------
 1176|       |        /* reset toUnicode state */
 1177|     52|        if(UCNV_GET_VERSION(cnv)==0) {
  ------------------
  |  |   47|     52|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|     52|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (1177:12): [True: 26, False: 26]
  ------------------
 1178|     26|            cnv->mode=8; /* no BOM handling */
 1179|     26|        } else {
 1180|     26|            cnv->mode=0; /* Java-specific "UnicodeLittle" requires LE BOM or no BOM */
 1181|     26|        }
 1182|     52|    }
 1183|    148|    if(choice!=UCNV_RESET_TO_UNICODE && UCNV_GET_VERSION(cnv)==1) {
  ------------------
  |  |   47|    148|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|    148|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (1183:8): [True: 148, False: 0]
  |  Branch (1183:41): [True: 76, False: 72]
  ------------------
 1184|       |        /* reset fromUnicode for "UnicodeLittle": prepare to output the UTF-16LE BOM */
 1185|     76|        cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM;
 1186|     76|    }
 1187|    148|}
ucnv_u16.cpp:_ZL30_UTF16LEFromUnicodeWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
  654|   132k|                               UErrorCode *pErrorCode) {
  655|   132k|    UConverter *cnv;
  656|   132k|    const char16_t *source;
  657|   132k|    char *target;
  658|   132k|    int32_t *offsets;
  659|       |
  660|   132k|    uint32_t targetCapacity, length, sourceIndex;
  661|   132k|    char16_t c, trail;
  662|   132k|    char overflow[4];
  663|       |
  664|   132k|    source=pArgs->source;
  665|   132k|    length=(int32_t)(pArgs->sourceLimit-source);
  666|   132k|    if(length<=0) {
  ------------------
  |  Branch (666:8): [True: 20, False: 132k]
  ------------------
  667|       |        /* no input, nothing to do */
  668|     20|        return;
  669|     20|    }
  670|       |
  671|   132k|    cnv=pArgs->converter;
  672|       |
  673|       |    /* write the BOM if necessary */
  674|   132k|    if(cnv->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) {
  ------------------
  |  Branch (674:8): [True: 66, False: 132k]
  ------------------
  675|     66|        static const char bom[]={ (char)0xffu, (char)0xfeu };
  676|     66|        ucnv_fromUWriteBytes(cnv,
  ------------------
  |  |  664|     66|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|     66|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     66|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     66|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  677|     66|                             bom, 2,
  678|     66|                             &pArgs->target, pArgs->targetLimit,
  679|     66|                             &pArgs->offsets, -1,
  680|     66|                             pErrorCode);
  681|     66|        cnv->fromUnicodeStatus=0;
  682|     66|    }
  683|       |
  684|   132k|    target=pArgs->target;
  685|   132k|    if(target >= pArgs->targetLimit) {
  ------------------
  |  Branch (685:8): [True: 0, False: 132k]
  ------------------
  686|      0|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  687|      0|        return;
  688|      0|    }
  689|       |
  690|   132k|    targetCapacity=(uint32_t)(pArgs->targetLimit-pArgs->target);
  691|   132k|    offsets=pArgs->offsets;
  692|   132k|    sourceIndex=0;
  693|       |
  694|       |    /* c!=0 indicates in several places outside the main loops that a surrogate was found */
  695|       |
  696|   132k|    if((c=(char16_t)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) {
  ------------------
  |  |   67|   132k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (696:8): [True: 0, False: 132k]
  |  Branch (696:76): [True: 0, False: 0]
  ------------------
  697|       |        /* the last buffer ended with a lead surrogate, output the surrogate pair */
  698|      0|        ++source;
  699|      0|        --length;
  700|      0|        target[0]=(uint8_t)c;
  701|      0|        target[1]=(uint8_t)(c>>8);
  702|      0|        target[2]=(uint8_t)trail;
  703|      0|        target[3]=(uint8_t)(trail>>8);
  704|      0|        target+=4;
  705|      0|        targetCapacity-=4;
  706|      0|        if(offsets!=nullptr) {
  ------------------
  |  Branch (706:12): [True: 0, False: 0]
  ------------------
  707|      0|            *offsets++=-1;
  708|      0|            *offsets++=-1;
  709|      0|            *offsets++=-1;
  710|      0|            *offsets++=-1;
  711|      0|        }
  712|      0|        sourceIndex=1;
  713|      0|        cnv->fromUChar32=c=0;
  714|      0|    }
  715|       |
  716|   132k|    if(c==0) {
  ------------------
  |  Branch (716:8): [True: 132k, False: 0]
  ------------------
  717|       |        /* copy an even number of bytes for complete UChars */
  718|   132k|        uint32_t count=2*length;
  719|   132k|        if(count>targetCapacity) {
  ------------------
  |  Branch (719:12): [True: 0, False: 132k]
  ------------------
  720|      0|            count=targetCapacity&~1;
  721|      0|        }
  722|       |        /* count is even */
  723|   132k|        targetCapacity-=count;
  724|   132k|        count>>=1;
  725|   132k|        length-=count;
  726|       |
  727|   132k|        if(offsets==nullptr) {
  ------------------
  |  Branch (727:12): [True: 132k, False: 0]
  ------------------
  728|  7.01M|            while(count>0) {
  ------------------
  |  Branch (728:19): [True: 7.01M, False: 69]
  ------------------
  729|  7.01M|                c=*source++;
  730|  7.01M|                if(U16_IS_SINGLE(c)) {
  ------------------
  |  |   51|  7.01M|#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  7.01M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (51:26): [True: 6.88M, False: 134k]
  |  |  ------------------
  ------------------
  731|  6.88M|                    target[0]=(uint8_t)c;
  732|  6.88M|                    target[1]=(uint8_t)(c>>8);
  733|  6.88M|                    target+=2;
  734|  6.88M|                } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   84|   268k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 70.1k, False: 63.9k]
  |  |  ------------------
  ------------------
                              } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   67|  70.1k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 1.82k, False: 68.2k]
  |  |  ------------------
  ------------------
  |  Branch (734:55): [True: 70.1k, False: 10]
  ------------------
  735|  1.82k|                    ++source;
  736|  1.82k|                    --count;
  737|  1.82k|                    target[0]=(uint8_t)c;
  738|  1.82k|                    target[1]=(uint8_t)(c>>8);
  739|  1.82k|                    target[2]=(uint8_t)trail;
  740|  1.82k|                    target[3]=(uint8_t)(trail>>8);
  741|  1.82k|                    target+=4;
  742|   132k|                } else {
  743|   132k|                    break;
  744|   132k|                }
  745|  6.88M|                --count;
  746|  6.88M|            }
  747|   132k|        } else {
  748|      0|            while(count>0) {
  ------------------
  |  Branch (748:19): [True: 0, False: 0]
  ------------------
  749|      0|                c=*source++;
  750|      0|                if(U16_IS_SINGLE(c)) {
  ------------------
  |  |   51|      0|#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|      0|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (51:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  751|      0|                    target[0]=(uint8_t)c;
  752|      0|                    target[1]=(uint8_t)(c>>8);
  753|      0|                    target+=2;
  754|      0|                    *offsets++=sourceIndex;
  755|      0|                    *offsets++=sourceIndex++;
  756|      0|                } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   84|      0|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              } else if(U16_IS_SURROGATE_LEAD(c) && count>=2 && U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   67|      0|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (756:55): [True: 0, False: 0]
  ------------------
  757|      0|                    ++source;
  758|      0|                    --count;
  759|      0|                    target[0]=(uint8_t)c;
  760|      0|                    target[1]=(uint8_t)(c>>8);
  761|      0|                    target[2]=(uint8_t)trail;
  762|      0|                    target[3]=(uint8_t)(trail>>8);
  763|      0|                    target+=4;
  764|      0|                    *offsets++=sourceIndex;
  765|      0|                    *offsets++=sourceIndex;
  766|      0|                    *offsets++=sourceIndex;
  767|      0|                    *offsets++=sourceIndex;
  768|      0|                    sourceIndex+=2;
  769|      0|                } else {
  770|      0|                    break;
  771|      0|                }
  772|      0|                --count;
  773|      0|            }
  774|      0|        }
  775|       |
  776|   132k|        if(count==0) {
  ------------------
  |  Branch (776:12): [True: 69, False: 132k]
  ------------------
  777|       |            /* done with the loop for complete UChars */
  778|     69|            if(length>0 && targetCapacity>0) {
  ------------------
  |  Branch (778:16): [True: 0, False: 69]
  |  Branch (778:28): [True: 0, False: 0]
  ------------------
  779|       |                /*
  780|       |                 * there is more input and some target capacity -
  781|       |                 * it must be targetCapacity==1 because otherwise
  782|       |                 * the above would have copied more;
  783|       |                 * prepare for overflow output
  784|       |                 */
  785|      0|                if(U16_IS_SINGLE(c=*source++)) {
  ------------------
  |  |   51|      0|#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|      0|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (51:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  786|      0|                    overflow[0]=(char)c;
  787|      0|                    overflow[1]=(char)(c>>8);
  788|      0|                    length=2; /* 2 bytes to output */
  789|      0|                    c=0;
  790|       |                /* } else { keep c for surrogate handling, length will be set there */
  791|      0|                }
  792|     69|            } else {
  793|     69|                length=0;
  794|     69|                c=0;
  795|     69|            }
  796|   132k|        } else {
  797|       |            /* keep c for surrogate handling, length will be set there */
  798|   132k|            targetCapacity+=2*count;
  799|   132k|        }
  800|   132k|    } else {
  801|      0|        length=0; /* from here on, length counts the bytes in overflow[] */
  802|      0|    }
  803|       |    
  804|   132k|    if(c!=0) {
  ------------------
  |  Branch (804:8): [True: 132k, False: 69]
  ------------------
  805|       |        /*
  806|       |         * c is a surrogate, and
  807|       |         * - source or target too short
  808|       |         * - or the surrogate is unmatched
  809|       |         */
  810|   132k|        length=0;
  811|   132k|        if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|   132k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 68.3k, False: 63.9k]
  |  |  ------------------
  ------------------
  812|  68.3k|            if(source<pArgs->sourceLimit) {
  ------------------
  |  Branch (812:16): [True: 68.2k, False: 10]
  ------------------
  813|  68.2k|                if(U16_IS_TRAIL(trail=*source)) {
  ------------------
  |  |   67|  68.2k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 0, False: 68.2k]
  |  |  ------------------
  ------------------
  814|       |                    /* output the surrogate pair, will overflow (see conditions comment above) */
  815|      0|                    ++source;
  816|      0|                    overflow[0]=(char)c;
  817|      0|                    overflow[1]=(char)(c>>8);
  818|      0|                    overflow[2]=(char)trail;
  819|      0|                    overflow[3]=(char)(trail>>8);
  820|      0|                    length=4; /* 4 bytes to output */
  821|      0|                    c=0;
  822|  68.2k|                } else {
  823|       |                    /* unmatched lead surrogate */
  824|  68.2k|                    *pErrorCode=U_ILLEGAL_CHAR_FOUND;
  825|  68.2k|                }
  826|  68.2k|            } else {
  827|       |                /* see if the trail surrogate is in the next buffer */
  828|     10|            }
  829|  68.3k|        } else {
  830|       |            /* unmatched trail surrogate */
  831|  63.9k|            *pErrorCode=U_ILLEGAL_CHAR_FOUND;
  832|  63.9k|        }
  833|   132k|        cnv->fromUChar32=c;
  834|   132k|    }
  835|       |
  836|   132k|    if(length>0) {
  ------------------
  |  Branch (836:8): [True: 0, False: 132k]
  ------------------
  837|       |        /* output length bytes with overflow (length>targetCapacity>0) */
  838|      0|        ucnv_fromUWriteBytes(cnv,
  ------------------
  |  |  664|      0|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  839|      0|                             overflow, length,
  840|      0|                             &target, pArgs->targetLimit,
  841|      0|                             &offsets, sourceIndex,
  842|      0|                             pErrorCode);
  843|      0|        targetCapacity = static_cast<uint32_t>(pArgs->targetLimit - target);
  844|      0|    }
  845|       |
  846|   132k|    if(U_SUCCESS(*pErrorCode) && source<pArgs->sourceLimit && targetCapacity==0) {
  ------------------
  |  Branch (846:8): [True: 79, False: 132k]
  |  Branch (846:34): [True: 0, False: 79]
  |  Branch (846:63): [True: 0, False: 0]
  ------------------
  847|      0|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  848|      0|    }
  849|       |
  850|       |    /* write back the updated pointers */
  851|   132k|    pArgs->source=source;
  852|   132k|    pArgs->target=target;
  853|   132k|    pArgs->offsets=offsets;
  854|   132k|}
ucnv_u16.cpp:_ZL10_UTF16OpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
 1295|     67|           UErrorCode *pErrorCode) {
 1296|     67|    if(UCNV_GET_VERSION(cnv)<=2) {
  ------------------
  |  |   47|     67|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|     67|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (1296:8): [True: 67, False: 0]
  ------------------
 1297|     67|        if(UCNV_GET_VERSION(cnv)==2 && !pArgs->onlyTestIsLoadable) {
  ------------------
  |  |   47|     67|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|     67|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (1297:12): [True: 23, False: 44]
  |  Branch (1297:40): [True: 22, False: 1]
  ------------------
 1298|       |            /*
 1299|       |             * Switch implementation, and switch the staticData that's different
 1300|       |             * and was copied into the UConverter.
 1301|       |             * (See ucnv_createConverterFromSharedData() in ucnv_bld.c.)
 1302|       |             * UTF-16,version=2 fromUnicode() always writes a big-endian byte stream.
 1303|       |             */
 1304|     22|            cnv->sharedData=(UConverterSharedData*)&_UTF16v2Data;
  ------------------
  |  |  111|     22|#define _UTF16v2Data U_ICU_ENTRY_POINT_RENAME(_UTF16v2Data)
  |  |  ------------------
  |  |  |  |  123|     22|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     22|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     22|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1305|     22|            uprv_memcpy(cnv->subChars, _UTF16v2Data.staticData->subChar, UCNV_MAX_SUBCHAR_LEN);
  ------------------
  |  |   42|     22|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     22|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     22|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     22|    _Pragma("clang diagnostic push") \
  |  |   45|     22|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     22|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     22|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     22|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     22|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     22|    _Pragma("clang diagnostic pop") \
  |  |   49|     22|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     22|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     22|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     22|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1306|     22|        }
 1307|     67|        _UTF16Reset(cnv, UCNV_RESET_BOTH);
 1308|     67|    } else {
 1309|      0|        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
 1310|      0|    }
 1311|     67|}
ucnv_u16.cpp:_ZL11_UTF16ResetP10UConverter21UConverterResetChoice:
 1279|    191|_UTF16Reset(UConverter *cnv, UConverterResetChoice choice) {
 1280|    191|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (1280:8): [True: 67, False: 124]
  ------------------
 1281|       |        /* reset toUnicode: state=0 */
 1282|     67|        cnv->mode=0;
 1283|     67|    }
 1284|    191|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (1284:8): [True: 191, False: 0]
  ------------------
 1285|       |        /* reset fromUnicode: prepare to output the UTF-16PE BOM */
 1286|    191|        cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM;
 1287|    191|    }
 1288|    191|}

ucnv_u32.cpp:_ZL33T_UConverter_fromUnicode_UTF32_BEP25UConverterFromUnicodeArgsP10UErrorCode:
  215|  2.01k|{
  216|  2.01k|    const char16_t *mySource = args->source;
  217|  2.01k|    unsigned char *myTarget;
  218|  2.01k|    const char16_t *sourceLimit = args->sourceLimit;
  219|  2.01k|    const unsigned char *targetLimit = (unsigned char *) args->targetLimit;
  220|  2.01k|    UChar32 ch, ch2;
  221|  2.01k|    unsigned int indexToWrite;
  222|  2.01k|    unsigned char temp[sizeof(uint32_t)];
  223|       |
  224|  2.01k|    if(mySource >= sourceLimit) {
  ------------------
  |  Branch (224:8): [True: 19, False: 1.99k]
  ------------------
  225|       |        /* no input, nothing to do */
  226|     19|        return;
  227|     19|    }
  228|       |
  229|       |    /* write the BOM if necessary */
  230|  1.99k|    if(args->converter->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) {
  ------------------
  |  Branch (230:8): [True: 0, False: 1.99k]
  ------------------
  231|      0|        static const char bom[]={ 0, 0, (char)0xfeu, (char)0xffu };
  232|      0|        ucnv_fromUWriteBytes(args->converter,
  ------------------
  |  |  664|      0|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  233|      0|                             bom, 4,
  234|      0|                             &args->target, args->targetLimit,
  235|      0|                             &args->offsets, -1,
  236|      0|                             err);
  237|      0|        args->converter->fromUnicodeStatus=0;
  238|      0|    }
  239|       |
  240|  1.99k|    myTarget = (unsigned char *) args->target;
  241|  1.99k|    temp[0] = 0;
  242|       |
  243|  1.99k|    if (args->converter->fromUChar32) {
  ------------------
  |  Branch (243:9): [True: 0, False: 1.99k]
  ------------------
  244|      0|        ch = args->converter->fromUChar32;
  245|      0|        args->converter->fromUChar32 = 0;
  246|      0|        goto lowsurogate;
  247|      0|    }
  248|       |
  249|  3.79M|    while (mySource < sourceLimit && myTarget < targetLimit) {
  ------------------
  |  Branch (249:12): [True: 3.79M, False: 46]
  |  Branch (249:38): [True: 3.79M, False: 374]
  ------------------
  250|  3.79M|        ch = *(mySource++);
  251|       |
  252|  3.79M|        if (U_IS_SURROGATE(ch)) {
  ------------------
  |  |  193|  3.79M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (193:27): [True: 1.77k, False: 3.79M]
  |  |  ------------------
  ------------------
  253|  1.77k|            if (U_IS_LEAD(ch)) {
  ------------------
  |  |  177|  1.77k|#define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
  |  |  ------------------
  |  |  |  Branch (177:22): [True: 694, False: 1.07k]
  |  |  ------------------
  ------------------
  254|    694|lowsurogate:
  255|    694|                if (mySource < sourceLimit) {
  ------------------
  |  Branch (255:21): [True: 686, False: 8]
  ------------------
  256|    686|                    ch2 = *mySource;
  257|    686|                    if (U_IS_TRAIL(ch2)) {
  ------------------
  |  |  185|    686|#define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 195, False: 491]
  |  |  ------------------
  ------------------
  258|    195|                        ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE;
  ------------------
  |  |   34|    195|#define SURROGATE_HIGH_START    0xD800
  ------------------
                                      ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE;
  ------------------
  |  |   31|    195|#define HALF_SHIFT              10
  ------------------
                                      ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE;
  ------------------
  |  |   38|    195|#define SURROGATE_LOW_BASE      9216
  ------------------
  259|    195|                        mySource++;
  260|    195|                    }
  261|    491|                    else {
  262|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
  263|       |                        /* callback(illegal) */
  264|    491|                        args->converter->fromUChar32 = ch;
  265|    491|                        *err = U_ILLEGAL_CHAR_FOUND;
  266|    491|                        break;
  267|    491|                    }
  268|    686|                }
  269|      8|                else {
  270|       |                    /* ran out of source */
  271|      8|                    args->converter->fromUChar32 = ch;
  272|      8|                    if (args->flush) {
  ------------------
  |  Branch (272:25): [True: 8, False: 0]
  ------------------
  273|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
  274|       |                        /* callback(illegal) */
  275|      8|                        *err = U_ILLEGAL_CHAR_FOUND;
  276|      8|                    }
  277|      8|                    break;
  278|      8|                }
  279|    694|            }
  280|  1.07k|            else {
  281|       |                /* this is an unmatched trail code unit (2nd surrogate) */
  282|       |                /* callback(illegal) */
  283|  1.07k|                args->converter->fromUChar32 = ch;
  284|  1.07k|                *err = U_ILLEGAL_CHAR_FOUND;
  285|  1.07k|                break;
  286|  1.07k|            }
  287|  1.77k|        }
  288|       |
  289|       |        /* We cannot get any larger than 10FFFF because we are coming from UTF-16 */
  290|  3.79M|        temp[1] = (uint8_t) (ch >> 16 & 0x1F);
  291|  3.79M|        temp[2] = (uint8_t) (ch >> 8);  /* unsigned cast implicitly does (ch & FF) */
  292|  3.79M|        temp[3] = (uint8_t) (ch);       /* unsigned cast implicitly does (ch & FF) */
  293|       |
  294|  18.9M|        for (indexToWrite = 0; indexToWrite <= sizeof(uint32_t) - 1; indexToWrite++) {
  ------------------
  |  Branch (294:32): [True: 15.1M, False: 3.79M]
  ------------------
  295|  15.1M|            if (myTarget < targetLimit) {
  ------------------
  |  Branch (295:17): [True: 15.1M, False: 0]
  ------------------
  296|  15.1M|                *(myTarget++) = temp[indexToWrite];
  297|  15.1M|            }
  298|      0|            else {
  299|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = temp[indexToWrite];
  300|      0|                *err = U_BUFFER_OVERFLOW_ERROR;
  301|      0|            }
  302|  15.1M|        }
  303|  3.79M|    }
  304|       |
  305|  1.99k|    if (mySource < sourceLimit && myTarget >= targetLimit && U_SUCCESS(*err)) {
  ------------------
  |  Branch (305:9): [True: 1.93k, False: 65]
  |  Branch (305:35): [True: 374, False: 1.55k]
  |  Branch (305:62): [True: 374, False: 0]
  ------------------
  306|    374|        *err = U_BUFFER_OVERFLOW_ERROR;
  307|    374|    }
  308|       |
  309|  1.99k|    args->target = (char *) myTarget;
  310|  1.99k|    args->source = mySource;
  311|  1.99k|}
ucnv_u32.cpp:_ZL33T_UConverter_fromUnicode_UTF32_LEP25UConverterFromUnicodeArgsP10UErrorCode:
  693|  2.55k|{
  694|  2.55k|    const char16_t *mySource = args->source;
  695|  2.55k|    unsigned char *myTarget;
  696|  2.55k|    const char16_t *sourceLimit = args->sourceLimit;
  697|  2.55k|    const unsigned char *targetLimit = (unsigned char *) args->targetLimit;
  698|  2.55k|    UChar32 ch, ch2;
  699|  2.55k|    unsigned int indexToWrite;
  700|  2.55k|    unsigned char temp[sizeof(uint32_t)];
  701|       |
  702|  2.55k|    if(mySource >= sourceLimit) {
  ------------------
  |  Branch (702:8): [True: 23, False: 2.52k]
  ------------------
  703|       |        /* no input, nothing to do */
  704|     23|        return;
  705|     23|    }
  706|       |
  707|       |    /* write the BOM if necessary */
  708|  2.52k|    if(args->converter->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) {
  ------------------
  |  Branch (708:8): [True: 23, False: 2.50k]
  ------------------
  709|     23|        static const char bom[]={ (char)0xffu, (char)0xfeu, 0, 0 };
  710|     23|        ucnv_fromUWriteBytes(args->converter,
  ------------------
  |  |  664|     23|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|     23|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     23|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     23|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  711|     23|                             bom, 4,
  712|     23|                             &args->target, args->targetLimit,
  713|     23|                             &args->offsets, -1,
  714|     23|                             err);
  715|     23|        args->converter->fromUnicodeStatus=0;
  716|     23|    }
  717|       |
  718|  2.52k|    myTarget = (unsigned char *) args->target;
  719|  2.52k|    temp[3] = 0;
  720|       |
  721|  2.52k|    if (args->converter->fromUChar32)
  ------------------
  |  Branch (721:9): [True: 0, False: 2.52k]
  ------------------
  722|      0|    {
  723|      0|        ch = args->converter->fromUChar32;
  724|      0|        args->converter->fromUChar32 = 0;
  725|      0|        goto lowsurogate;
  726|      0|    }
  727|       |
  728|  3.79M|    while (mySource < sourceLimit && myTarget < targetLimit)
  ------------------
  |  Branch (728:12): [True: 3.79M, False: 47]
  |  Branch (728:38): [True: 3.79M, False: 374]
  ------------------
  729|  3.79M|    {
  730|  3.79M|        ch = *(mySource++);
  731|       |
  732|  3.79M|        if (U16_IS_SURROGATE(ch)) {
  ------------------
  |  |   75|  3.79M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  3.79M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 2.30k, False: 3.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  733|  2.30k|            if (U16_IS_LEAD(ch))
  ------------------
  |  |   59|  2.30k|#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
  |  |  ------------------
  |  |  |  Branch (59:24): [True: 1.13k, False: 1.16k]
  |  |  ------------------
  ------------------
  734|  1.13k|            {
  735|  1.13k|lowsurogate:
  736|  1.13k|                if (mySource < sourceLimit)
  ------------------
  |  Branch (736:21): [True: 1.12k, False: 14]
  ------------------
  737|  1.12k|                {
  738|  1.12k|                    ch2 = *mySource;
  739|  1.12k|                    if (U16_IS_TRAIL(ch2)) {
  ------------------
  |  |   67|  1.12k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 198, False: 926]
  |  |  ------------------
  ------------------
  740|    198|                        ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE;
  ------------------
  |  |   34|    198|#define SURROGATE_HIGH_START    0xD800
  ------------------
                                      ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE;
  ------------------
  |  |   31|    198|#define HALF_SHIFT              10
  ------------------
                                      ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE;
  ------------------
  |  |   38|    198|#define SURROGATE_LOW_BASE      9216
  ------------------
  741|    198|                        mySource++;
  742|    198|                    }
  743|    926|                    else {
  744|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
  745|       |                        /* callback(illegal) */
  746|    926|                        args->converter->fromUChar32 = ch;
  747|    926|                        *err = U_ILLEGAL_CHAR_FOUND;
  748|    926|                        break;
  749|    926|                    }
  750|  1.12k|                }
  751|     14|                else {
  752|       |                    /* ran out of source */
  753|     14|                    args->converter->fromUChar32 = ch;
  754|     14|                    if (args->flush) {
  ------------------
  |  Branch (754:25): [True: 14, False: 0]
  ------------------
  755|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
  756|       |                        /* callback(illegal) */
  757|     14|                        *err = U_ILLEGAL_CHAR_FOUND;
  758|     14|                    }
  759|     14|                    break;
  760|     14|                }
  761|  1.13k|            }
  762|  1.16k|            else {
  763|       |                /* this is an unmatched trail code unit (2nd surrogate) */
  764|       |                /* callback(illegal) */
  765|  1.16k|                args->converter->fromUChar32 = ch;
  766|  1.16k|                *err = U_ILLEGAL_CHAR_FOUND;
  767|  1.16k|                break;
  768|  1.16k|            }
  769|  2.30k|        }
  770|       |
  771|       |        /* We cannot get any larger than 10FFFF because we are coming from UTF-16 */
  772|  3.79M|        temp[2] = (uint8_t) (ch >> 16 & 0x1F);
  773|  3.79M|        temp[1] = (uint8_t) (ch >> 8);  /* unsigned cast implicitly does (ch & FF) */
  774|  3.79M|        temp[0] = (uint8_t) (ch);       /* unsigned cast implicitly does (ch & FF) */
  775|       |
  776|  18.9M|        for (indexToWrite = 0; indexToWrite <= sizeof(uint32_t) - 1; indexToWrite++)
  ------------------
  |  Branch (776:32): [True: 15.1M, False: 3.79M]
  ------------------
  777|  15.1M|        {
  778|  15.1M|            if (myTarget < targetLimit)
  ------------------
  |  Branch (778:17): [True: 15.1M, False: 0]
  ------------------
  779|  15.1M|            {
  780|  15.1M|                *(myTarget++) = temp[indexToWrite];
  781|  15.1M|            }
  782|      0|            else
  783|      0|            {
  784|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = temp[indexToWrite];
  785|      0|                *err = U_BUFFER_OVERFLOW_ERROR;
  786|      0|            }
  787|  15.1M|        }
  788|  3.79M|    }
  789|       |
  790|  2.52k|    if (mySource < sourceLimit && myTarget >= targetLimit && U_SUCCESS(*err))
  ------------------
  |  Branch (790:9): [True: 2.45k, False: 70]
  |  Branch (790:35): [True: 374, False: 2.08k]
  |  Branch (790:62): [True: 374, False: 0]
  ------------------
  791|    374|    {
  792|    374|        *err = U_BUFFER_OVERFLOW_ERROR;
  793|    374|    }
  794|       |
  795|  2.52k|    args->target = (char *) myTarget;
  796|  2.52k|    args->source = mySource;
  797|  2.52k|}
ucnv_u32.cpp:_ZL10_UTF32OpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
 1040|     25|           UErrorCode *pErrorCode) {
 1041|     25|    (void)pArgs;
 1042|     25|    (void)pErrorCode;
 1043|     25|    _UTF32Reset(cnv, UCNV_RESET_BOTH);
 1044|     25|}
ucnv_u32.cpp:_ZL11_UTF32ResetP10UConverter21UConverterResetChoice:
 1026|     71|_UTF32Reset(UConverter *cnv, UConverterResetChoice choice) {
 1027|     71|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (1027:8): [True: 25, False: 46]
  ------------------
 1028|       |        /* reset toUnicode: state=0 */
 1029|     25|        cnv->mode=0;
 1030|     25|    }
 1031|     71|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (1031:8): [True: 71, False: 0]
  ------------------
 1032|       |        /* reset fromUnicode: prepare to output the UTF-32PE BOM */
 1033|     71|        cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM;
 1034|     71|    }
 1035|     71|}

ucnv_u7.cpp:_ZL9_UTF7OpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
  199|    529|          UErrorCode *pErrorCode) {
  200|    529|    (void)pArgs;
  201|    529|    if(UCNV_GET_VERSION(cnv)<=1) {
  ------------------
  |  |   47|    529|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|    529|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  |  Branch (201:8): [True: 529, False: 0]
  ------------------
  202|       |        /* TODO(markus): Should just use cnv->options rather than copying the version number. */
  203|    529|        cnv->fromUnicodeStatus=UCNV_GET_VERSION(cnv)<<28;
  ------------------
  |  |   47|    529|#define UCNV_GET_VERSION(cnv) ((cnv)->options&UCNV_OPTION_VERSION)
  |  |  ------------------
  |  |  |  |   44|    529|#define UCNV_OPTION_VERSION     0xf
  |  |  ------------------
  ------------------
  204|    529|        _UTF7Reset(cnv, UCNV_RESET_BOTH);
  205|    529|    } else {
  206|      0|        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
  207|      0|    }
  208|    529|}
ucnv_u7.cpp:_ZL10_UTF7ResetP10UConverter21UConverterResetChoice:
  184|  1.58k|_UTF7Reset(UConverter *cnv, UConverterResetChoice choice) {
  185|  1.58k|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (185:8): [True: 529, False: 1.05k]
  ------------------
  186|       |        /* reset toUnicode */
  187|    529|        cnv->toUnicodeStatus=0x1000000; /* inDirectMode=true */
  188|    529|        cnv->toULength=0;
  189|    529|    }
  190|  1.58k|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (190:8): [True: 1.58k, False: 0]
  ------------------
  191|       |        /* reset fromUnicode */
  192|  1.58k|        cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */
  193|  1.58k|    }
  194|  1.58k|}
ucnv_u7.cpp:_ZL27_UTF7FromUnicodeWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
  462|  3.31k|                            UErrorCode *pErrorCode) {
  463|  3.31k|    UConverter *cnv;
  464|  3.31k|    const char16_t *source, *sourceLimit;
  465|  3.31k|    uint8_t *target, *targetLimit;
  466|  3.31k|    int32_t *offsets;
  467|       |
  468|  3.31k|    int32_t length, targetCapacity, sourceIndex;
  469|  3.31k|    char16_t c;
  470|       |
  471|       |    /* UTF-7 state */
  472|  3.31k|    const UBool *encodeDirectly;
  473|  3.31k|    uint8_t bits;
  474|  3.31k|    int8_t base64Counter;
  475|  3.31k|    UBool inDirectMode;
  476|       |
  477|       |    /* set up the local pointers */
  478|  3.31k|    cnv=pArgs->converter;
  479|       |
  480|       |    /* set up the local pointers */
  481|  3.31k|    source=pArgs->source;
  482|  3.31k|    sourceLimit=pArgs->sourceLimit;
  483|  3.31k|    target=(uint8_t *)pArgs->target;
  484|  3.31k|    targetLimit=(uint8_t *)pArgs->targetLimit;
  485|  3.31k|    offsets=pArgs->offsets;
  486|       |
  487|       |    /* get the state machine state */
  488|  3.31k|    {
  489|  3.31k|        uint32_t status=cnv->fromUnicodeStatus;
  490|  3.31k|        encodeDirectly= status<0x10000000 ? encodeDirectlyMaximum : encodeDirectlyRestricted;
  ------------------
  |  Branch (490:25): [True: 3.31k, False: 0]
  ------------------
  491|  3.31k|        inDirectMode=(UBool)((status>>24)&1);
  492|  3.31k|        base64Counter=(int8_t)(status>>16);
  493|  3.31k|        bits=(uint8_t)status;
  494|  3.31k|        U_ASSERT(bits<=UPRV_LENGTHOF(toBase64));
  ------------------
  |  |   35|  3.31k|#   define U_ASSERT(exp) (void)0
  ------------------
  495|  3.31k|    }
  496|       |
  497|       |    /* UTF-7 always encodes UTF-16 code units, therefore we need only a simple sourceIndex */
  498|  3.31k|    sourceIndex=0;
  499|       |
  500|  3.31k|    if(inDirectMode) {
  ------------------
  |  Branch (500:8): [True: 1.60k, False: 1.71k]
  ------------------
  501|  22.4M|directMode:
  502|  22.4M|        length=(int32_t)(sourceLimit-source);
  503|  22.4M|        targetCapacity=(int32_t)(targetLimit-target);
  504|  22.4M|        if(length>targetCapacity) {
  ------------------
  |  Branch (504:12): [True: 490k, False: 21.9M]
  ------------------
  505|   490k|            length=targetCapacity;
  506|   490k|        }
  507|  44.9M|        while(length>0) {
  ------------------
  |  Branch (507:15): [True: 44.9M, False: 1.04k]
  ------------------
  508|  44.9M|            c=*source++;
  509|       |            /* currently always encode CR LF SP TAB directly */
  510|  44.9M|            if(c<=127 && encodeDirectly[c]) {
  ------------------
  |  Branch (510:16): [True: 22.4M, False: 22.4M]
  |  Branch (510:26): [True: 22.4M, False: 31.5k]
  ------------------
  511|       |                /* encode directly */
  512|  22.4M|                *target++=(uint8_t)c;
  513|  22.4M|                if(offsets!=nullptr) {
  ------------------
  |  Branch (513:20): [True: 0, False: 22.4M]
  ------------------
  514|      0|                    *offsets++=sourceIndex++;
  515|      0|                }
  516|  22.4M|            } else if(c==PLUS) {
  ------------------
  |  |   92|  22.4M|#define PLUS  43
  ------------------
  |  Branch (516:23): [True: 28.1k, False: 22.4M]
  ------------------
  517|       |                /* output +- for + */
  518|  28.1k|                *target++=PLUS;
  ------------------
  |  |   92|  28.1k|#define PLUS  43
  ------------------
  519|  28.1k|                if(target<targetLimit) {
  ------------------
  |  Branch (519:20): [True: 28.0k, False: 37]
  ------------------
  520|  28.0k|                    *target++=MINUS;
  ------------------
  |  |   93|  28.0k|#define MINUS 45
  ------------------
  521|  28.0k|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (521:24): [True: 0, False: 28.0k]
  ------------------
  522|      0|                        *offsets++=sourceIndex;
  523|      0|                        *offsets++=sourceIndex++;
  524|      0|                    }
  525|       |                    /* realign length and targetCapacity */
  526|  28.0k|                    goto directMode;
  527|  28.0k|                } else {
  528|     37|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (528:24): [True: 0, False: 37]
  ------------------
  529|      0|                        *offsets++=sourceIndex++;
  530|      0|                    }
  531|     37|                    cnv->charErrorBuffer[0]=MINUS;
  ------------------
  |  |   93|     37|#define MINUS 45
  ------------------
  532|     37|                    cnv->charErrorBufferLength=1;
  533|     37|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  534|     37|                    break;
  535|     37|                }
  536|  22.4M|            } else {
  537|       |                /* un-read this character and switch to Unicode Mode */
  538|  22.4M|                --source;
  539|  22.4M|                *target++=PLUS;
  ------------------
  |  |   92|  22.4M|#define PLUS  43
  ------------------
  540|  22.4M|                if(offsets!=nullptr) {
  ------------------
  |  Branch (540:20): [True: 0, False: 22.4M]
  ------------------
  541|      0|                    *offsets++=sourceIndex;
  542|      0|                }
  543|  22.4M|                inDirectMode=false;
  544|  22.4M|                base64Counter=0;
  545|  22.4M|                goto unicodeMode;
  546|  22.4M|            }
  547|  22.4M|            --length;
  548|  22.4M|        }
  549|  1.08k|        if(source<sourceLimit && target>=targetLimit) {
  ------------------
  |  Branch (549:12): [True: 1.00k, False: 73]
  |  Branch (549:34): [True: 1.00k, False: 0]
  ------------------
  550|       |            /* target is full */
  551|  1.00k|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  552|  1.00k|        }
  553|  1.71k|    } else {
  554|  22.4M|unicodeMode:
  555|  46.9M|        while(source<sourceLimit) {
  ------------------
  |  Branch (555:15): [True: 46.9M, False: 155]
  ------------------
  556|  46.9M|            if(target<targetLimit) {
  ------------------
  |  Branch (556:16): [True: 46.9M, False: 1.71k]
  ------------------
  557|  46.9M|                c=*source++;
  558|  46.9M|                if(c<=127 && encodeDirectly[c]) {
  ------------------
  |  Branch (558:20): [True: 22.5M, False: 24.3M]
  |  Branch (558:30): [True: 22.4M, False: 146k]
  ------------------
  559|       |                    /* encode directly */
  560|  22.4M|                    inDirectMode=true;
  561|       |
  562|       |                    /* trick: back out this character to make this easier */
  563|  22.4M|                    --source;
  564|       |
  565|       |                    /* terminate the base64 sequence */
  566|  22.4M|                    if(base64Counter!=0) {
  ------------------
  |  Branch (566:24): [True: 22.3M, False: 84.9k]
  ------------------
  567|       |                        /* write remaining bits for the previous character */
  568|  22.3M|                        *target++=toBase64[bits];
  569|  22.3M|                        if(offsets!=nullptr) {
  ------------------
  |  Branch (569:28): [True: 0, False: 22.3M]
  ------------------
  570|      0|                            *offsets++=sourceIndex-1;
  571|      0|                        }
  572|  22.3M|                    }
  573|  22.4M|                    if(fromBase64[c]!=-1) {
  ------------------
  |  Branch (573:24): [True: 22.4M, False: 5.52k]
  ------------------
  574|       |                        /* need to terminate with a minus */
  575|  22.4M|                        if(target<targetLimit) {
  ------------------
  |  Branch (575:28): [True: 22.4M, False: 367]
  ------------------
  576|  22.4M|                            *target++=MINUS;
  ------------------
  |  |   93|  22.4M|#define MINUS 45
  ------------------
  577|  22.4M|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (577:32): [True: 0, False: 22.4M]
  ------------------
  578|      0|                                *offsets++=sourceIndex-1;
  579|      0|                            }
  580|  22.4M|                        } else {
  581|    367|                            cnv->charErrorBuffer[0]=MINUS;
  ------------------
  |  |   93|    367|#define MINUS 45
  ------------------
  582|    367|                            cnv->charErrorBufferLength=1;
  583|    367|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  584|    367|                            break;
  585|    367|                        }
  586|  22.4M|                    }
  587|  22.4M|                    goto directMode;
  588|  24.4M|                } else {
  589|       |                    /*
  590|       |                     * base64 this character:
  591|       |                     * Output 2 or 3 base64 bytes for the remaining bits of the previous character
  592|       |                     * and the bits of this character, each implicitly in UTF-16BE.
  593|       |                     *
  594|       |                     * Here, bits is an 8-bit variable because only 6 bits need to be kept from one
  595|       |                     * character to the next. The actual 2 or 4 bits are shifted to the left edge
  596|       |                     * of the 6-bits field 5..0 to make the termination of the base64 sequence easier.
  597|       |                     */
  598|  24.4M|                    switch(base64Counter) {
  599|  23.0M|                    case 0:
  ------------------
  |  Branch (599:21): [True: 23.0M, False: 1.45M]
  ------------------
  600|  23.0M|                        *target++=toBase64[c>>10];
  601|  23.0M|                        if(target<targetLimit) {
  ------------------
  |  Branch (601:28): [True: 23.0M, False: 422]
  ------------------
  602|  23.0M|                            *target++=toBase64[(c>>4)&0x3f];
  603|  23.0M|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (603:32): [True: 0, False: 23.0M]
  ------------------
  604|      0|                                *offsets++=sourceIndex;
  605|      0|                                *offsets++=sourceIndex++;
  606|      0|                            }
  607|  23.0M|                        } else {
  608|    422|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (608:32): [True: 0, False: 422]
  ------------------
  609|      0|                                *offsets++=sourceIndex++;
  610|      0|                            }
  611|    422|                            cnv->charErrorBuffer[0]=toBase64[(c>>4)&0x3f];
  612|    422|                            cnv->charErrorBufferLength=1;
  613|    422|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  614|    422|                        }
  615|  23.0M|                        bits=(uint8_t)((c&15)<<2);
  616|  23.0M|                        base64Counter=1;
  617|  23.0M|                        break;
  618|   793k|                    case 1:
  ------------------
  |  Branch (618:21): [True: 793k, False: 23.6M]
  ------------------
  619|   793k|                        *target++=toBase64[bits|(c>>14)];
  620|   793k|                        if(target<targetLimit) {
  ------------------
  |  Branch (620:28): [True: 793k, False: 227]
  ------------------
  621|   793k|                            *target++=toBase64[(c>>8)&0x3f];
  622|   793k|                            if(target<targetLimit) {
  ------------------
  |  Branch (622:32): [True: 793k, False: 201]
  ------------------
  623|   793k|                                *target++=toBase64[(c>>2)&0x3f];
  624|   793k|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (624:36): [True: 0, False: 793k]
  ------------------
  625|      0|                                    *offsets++=sourceIndex;
  626|      0|                                    *offsets++=sourceIndex;
  627|      0|                                    *offsets++=sourceIndex++;
  628|      0|                                }
  629|   793k|                            } else {
  630|    201|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (630:36): [True: 0, False: 201]
  ------------------
  631|      0|                                    *offsets++=sourceIndex;
  632|      0|                                    *offsets++=sourceIndex++;
  633|      0|                                }
  634|    201|                                cnv->charErrorBuffer[0]=toBase64[(c>>2)&0x3f];
  635|    201|                                cnv->charErrorBufferLength=1;
  636|    201|                                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  637|    201|                            }
  638|   793k|                        } else {
  639|    227|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (639:32): [True: 0, False: 227]
  ------------------
  640|      0|                                *offsets++=sourceIndex++;
  641|      0|                            }
  642|    227|                            cnv->charErrorBuffer[0]=toBase64[(c>>8)&0x3f];
  643|    227|                            cnv->charErrorBuffer[1]=toBase64[(c>>2)&0x3f];
  644|    227|                            cnv->charErrorBufferLength=2;
  645|    227|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  646|    227|                        }
  647|   793k|                        bits=(uint8_t)((c&3)<<4);
  648|   793k|                        base64Counter=2;
  649|   793k|                        break;
  650|   661k|                    case 2:
  ------------------
  |  Branch (650:21): [True: 661k, False: 23.8M]
  ------------------
  651|   661k|                        *target++=toBase64[bits|(c>>12)];
  652|   661k|                        if(target<targetLimit) {
  ------------------
  |  Branch (652:28): [True: 661k, False: 210]
  ------------------
  653|   661k|                            *target++=toBase64[(c>>6)&0x3f];
  654|   661k|                            if(target<targetLimit) {
  ------------------
  |  Branch (654:32): [True: 660k, False: 228]
  ------------------
  655|   660k|                                *target++=toBase64[c&0x3f];
  656|   660k|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (656:36): [True: 0, False: 660k]
  ------------------
  657|      0|                                    *offsets++=sourceIndex;
  658|      0|                                    *offsets++=sourceIndex;
  659|      0|                                    *offsets++=sourceIndex++;
  660|      0|                                }
  661|   660k|                            } else {
  662|    228|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (662:36): [True: 0, False: 228]
  ------------------
  663|      0|                                    *offsets++=sourceIndex;
  664|      0|                                    *offsets++=sourceIndex++;
  665|      0|                                }
  666|    228|                                cnv->charErrorBuffer[0]=toBase64[c&0x3f];
  667|    228|                                cnv->charErrorBufferLength=1;
  668|    228|                                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  669|    228|                            }
  670|   661k|                        } else {
  671|    210|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (671:32): [True: 0, False: 210]
  ------------------
  672|      0|                                *offsets++=sourceIndex++;
  673|      0|                            }
  674|    210|                            cnv->charErrorBuffer[0]=toBase64[(c>>6)&0x3f];
  675|    210|                            cnv->charErrorBuffer[1]=toBase64[c&0x3f];
  676|    210|                            cnv->charErrorBufferLength=2;
  677|    210|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  678|    210|                        }
  679|   661k|                        bits=0;
  680|   661k|                        base64Counter=0;
  681|   661k|                        break;
  682|      0|                    default:
  ------------------
  |  Branch (682:21): [True: 0, False: 24.4M]
  ------------------
  683|       |                        /* will never occur */
  684|      0|                        break;
  685|  24.4M|                    }
  686|  24.4M|                }
  687|  46.9M|            } else {
  688|       |                /* target is full */
  689|  1.71k|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  690|  1.71k|                break;
  691|  1.71k|            }
  692|  46.9M|        }
  693|  22.4M|    }
  694|       |
  695|  3.31k|    if(pArgs->flush && source>=sourceLimit) {
  ------------------
  |  Branch (695:8): [True: 3.31k, False: 0]
  |  Branch (695:24): [True: 228, False: 3.08k]
  ------------------
  696|       |        /* flush remaining bits to the target */
  697|    228|        if(!inDirectMode) {
  ------------------
  |  Branch (697:12): [True: 155, False: 73]
  ------------------
  698|    155|            if (base64Counter!=0) {
  ------------------
  |  Branch (698:17): [True: 127, False: 28]
  ------------------
  699|    127|                if(target<targetLimit) {
  ------------------
  |  Branch (699:20): [True: 123, False: 4]
  ------------------
  700|    123|                    *target++=toBase64[bits];
  701|    123|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (701:24): [True: 0, False: 123]
  ------------------
  702|      0|                        *offsets++=sourceIndex-1;
  703|      0|                    }
  704|    123|                } else {
  705|      4|                    cnv->charErrorBuffer[cnv->charErrorBufferLength++]=toBase64[bits];
  706|      4|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  707|      4|                }
  708|    127|            }
  709|       |            /* Add final MINUS to terminate unicodeMode */
  710|    155|            if(target<targetLimit) {
  ------------------
  |  Branch (710:16): [True: 149, False: 6]
  ------------------
  711|    149|                *target++=MINUS;
  ------------------
  |  |   93|    149|#define MINUS 45
  ------------------
  712|    149|                if(offsets!=nullptr) {
  ------------------
  |  Branch (712:20): [True: 0, False: 149]
  ------------------
  713|      0|                    *offsets++=sourceIndex-1;
  714|      0|                }
  715|    149|            } else {
  716|      6|                cnv->charErrorBuffer[cnv->charErrorBufferLength++]=MINUS;
  ------------------
  |  |   93|      6|#define MINUS 45
  ------------------
  717|      6|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  718|      6|            }
  719|    155|        }
  720|       |        /* reset the state for the next conversion */
  721|    228|        cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */
  722|  3.08k|    } else {
  723|       |        /* set the converter state back into UConverter */
  724|  3.08k|        cnv->fromUnicodeStatus=
  725|  3.08k|            (cnv->fromUnicodeStatus&0xf0000000)|    /* keep version*/
  726|  3.08k|            ((uint32_t)inDirectMode<<24)|((uint32_t)base64Counter<<16)|(uint32_t)bits;
  727|  3.08k|    }
  728|       |
  729|       |    /* write back the updated pointers */
  730|  3.31k|    pArgs->source=source;
  731|  3.31k|    pArgs->target=(char *)target;
  732|  3.31k|    pArgs->offsets=offsets;
  733|  3.31k|}
ucnv_u7.cpp:_ZL27_IMAPFromUnicodeWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
 1161|  5.27k|                            UErrorCode *pErrorCode) {
 1162|  5.27k|    UConverter *cnv;
 1163|  5.27k|    const char16_t *source, *sourceLimit;
 1164|  5.27k|    uint8_t *target, *targetLimit;
 1165|  5.27k|    int32_t *offsets;
 1166|       |
 1167|  5.27k|    int32_t length, targetCapacity, sourceIndex;
 1168|  5.27k|    char16_t c;
 1169|  5.27k|    uint8_t b;
 1170|       |
 1171|       |    /* UTF-7 state */
 1172|  5.27k|    uint8_t bits;
 1173|  5.27k|    int8_t base64Counter;
 1174|  5.27k|    UBool inDirectMode;
 1175|       |
 1176|       |    /* set up the local pointers */
 1177|  5.27k|    cnv=pArgs->converter;
 1178|       |
 1179|       |    /* set up the local pointers */
 1180|  5.27k|    source=pArgs->source;
 1181|  5.27k|    sourceLimit=pArgs->sourceLimit;
 1182|  5.27k|    target=(uint8_t *)pArgs->target;
 1183|  5.27k|    targetLimit=(uint8_t *)pArgs->targetLimit;
 1184|  5.27k|    offsets=pArgs->offsets;
 1185|       |
 1186|       |    /* get the state machine state */
 1187|  5.27k|    {
 1188|  5.27k|        uint32_t status=cnv->fromUnicodeStatus;
 1189|  5.27k|        inDirectMode=(UBool)((status>>24)&1);
 1190|  5.27k|        base64Counter=(int8_t)(status>>16);
 1191|  5.27k|        bits=(uint8_t)status;
 1192|  5.27k|    }
 1193|       |
 1194|       |    /* UTF-7 always encodes UTF-16 code units, therefore we need only a simple sourceIndex */
 1195|  5.27k|    sourceIndex=0;
 1196|       |
 1197|  5.27k|    if(inDirectMode) {
  ------------------
  |  Branch (1197:8): [True: 1.58k, False: 3.68k]
  ------------------
 1198|  33.9M|directMode:
 1199|  33.9M|        length=(int32_t)(sourceLimit-source);
 1200|  33.9M|        targetCapacity=(int32_t)(targetLimit-target);
 1201|  33.9M|        if(length>targetCapacity) {
  ------------------
  |  Branch (1201:12): [True: 840k, False: 33.1M]
  ------------------
 1202|   840k|            length=targetCapacity;
 1203|   840k|        }
 1204|  67.1M|        while(length>0) {
  ------------------
  |  Branch (1204:15): [True: 67.1M, False: 822]
  ------------------
 1205|  67.1M|            c=*source++;
 1206|       |            /* encode 0x20..0x7e except '&' directly */
 1207|  67.1M|            if(inSetDIMAP(c)) {
  ------------------
  |  |  870|  67.1M|#define inSetDIMAP(c) (isLegalIMAP(c) && c!=AMPERSAND)
  |  |  ------------------
  |  |  |  |  867|   134M|#define isLegalIMAP(c) (0x20<=(c) && (c)<=0x7e)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (867:25): [True: 67.0M, False: 14.4k]
  |  |  |  |  |  Branch (867:38): [True: 33.7M, False: 33.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define inSetDIMAP(c) (isLegalIMAP(c) && c!=AMPERSAND)
  |  |  ------------------
  |  |  |  |  862|   100M|#define AMPERSAND 0x26
  |  |  ------------------
  |  |  |  Branch (870:42): [True: 33.1M, False: 591k]
  |  |  ------------------
  ------------------
 1208|       |                /* encode directly */
 1209|  33.1M|                *target++=(uint8_t)c;
 1210|  33.1M|                if(offsets!=nullptr) {
  ------------------
  |  Branch (1210:20): [True: 0, False: 33.1M]
  ------------------
 1211|      0|                    *offsets++=sourceIndex++;
 1212|      0|                }
 1213|  33.9M|            } else if(c==AMPERSAND) {
  ------------------
  |  |  862|  33.9M|#define AMPERSAND 0x26
  ------------------
  |  Branch (1213:23): [True: 591k, False: 33.3M]
  ------------------
 1214|       |                /* output &- for & */
 1215|   591k|                *target++=AMPERSAND;
  ------------------
  |  |  862|   591k|#define AMPERSAND 0x26
  ------------------
 1216|   591k|                if(target<targetLimit) {
  ------------------
  |  Branch (1216:20): [True: 591k, False: 150]
  ------------------
 1217|   591k|                    *target++=MINUS;
  ------------------
  |  |   93|   591k|#define MINUS 45
  ------------------
 1218|   591k|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (1218:24): [True: 0, False: 591k]
  ------------------
 1219|      0|                        *offsets++=sourceIndex;
 1220|      0|                        *offsets++=sourceIndex++;
 1221|      0|                    }
 1222|       |                    /* realign length and targetCapacity */
 1223|   591k|                    goto directMode;
 1224|   591k|                } else {
 1225|    150|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (1225:24): [True: 0, False: 150]
  ------------------
 1226|      0|                        *offsets++=sourceIndex++;
 1227|      0|                    }
 1228|    150|                    cnv->charErrorBuffer[0]=MINUS;
  ------------------
  |  |   93|    150|#define MINUS 45
  ------------------
 1229|    150|                    cnv->charErrorBufferLength=1;
 1230|    150|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1231|    150|                    break;
 1232|    150|                }
 1233|  33.3M|            } else {
 1234|       |                /* un-read this character and switch to Unicode Mode */
 1235|  33.3M|                --source;
 1236|  33.3M|                *target++=AMPERSAND;
  ------------------
  |  |  862|  33.3M|#define AMPERSAND 0x26
  ------------------
 1237|  33.3M|                if(offsets!=nullptr) {
  ------------------
  |  Branch (1237:20): [True: 0, False: 33.3M]
  ------------------
 1238|      0|                    *offsets++=sourceIndex;
 1239|      0|                }
 1240|  33.3M|                inDirectMode=false;
 1241|  33.3M|                base64Counter=0;
 1242|  33.3M|                goto unicodeMode;
 1243|  33.3M|            }
 1244|  33.1M|            --length;
 1245|  33.1M|        }
 1246|    972|        if(source<sourceLimit && target>=targetLimit) {
  ------------------
  |  Branch (1246:12): [True: 919, False: 53]
  |  Branch (1246:34): [True: 919, False: 0]
  ------------------
 1247|       |            /* target is full */
 1248|    919|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1249|    919|        }
 1250|  3.68k|    } else {
 1251|  33.3M|unicodeMode:
 1252|  70.3M|        while(source<sourceLimit) {
  ------------------
  |  Branch (1252:15): [True: 70.3M, False: 262]
  ------------------
 1253|  70.3M|            if(target<targetLimit) {
  ------------------
  |  Branch (1253:16): [True: 70.3M, False: 3.68k]
  ------------------
 1254|  70.3M|                c=*source++;
 1255|  70.3M|                if(isLegalIMAP(c)) {
  ------------------
  |  |  867|  70.3M|#define isLegalIMAP(c) (0x20<=(c) && (c)<=0x7e)
  |  |  ------------------
  |  |  |  Branch (867:25): [True: 69.6M, False: 712k]
  |  |  |  Branch (867:38): [True: 33.3M, False: 36.2M]
  |  |  ------------------
  ------------------
 1256|       |                    /* encode directly */
 1257|  33.3M|                    inDirectMode=true;
 1258|       |
 1259|       |                    /* trick: back out this character to make this easier */
 1260|  33.3M|                    --source;
 1261|       |
 1262|       |                    /* terminate the base64 sequence */
 1263|  33.3M|                    if(base64Counter!=0) {
  ------------------
  |  Branch (1263:24): [True: 33.2M, False: 152k]
  ------------------
 1264|       |                        /* write remaining bits for the previous character */
 1265|  33.2M|                        *target++=TO_BASE64_IMAP(bits);
  ------------------
  |  |  872|  33.2M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|      0|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 33.2M, False: 0]
  |  |  ------------------
  ------------------
 1266|  33.2M|                        if(offsets!=nullptr) {
  ------------------
  |  Branch (1266:28): [True: 0, False: 33.2M]
  ------------------
 1267|      0|                            *offsets++=sourceIndex-1;
 1268|      0|                        }
 1269|  33.2M|                    }
 1270|       |                    /* need to terminate with a minus */
 1271|  33.3M|                    if(target<targetLimit) {
  ------------------
  |  Branch (1271:24): [True: 33.3M, False: 350]
  ------------------
 1272|  33.3M|                        *target++=MINUS;
  ------------------
  |  |   93|  33.3M|#define MINUS 45
  ------------------
 1273|  33.3M|                        if(offsets!=nullptr) {
  ------------------
  |  Branch (1273:28): [True: 0, False: 33.3M]
  ------------------
 1274|      0|                            *offsets++=sourceIndex-1;
 1275|      0|                        }
 1276|  33.3M|                    } else {
 1277|    350|                        cnv->charErrorBuffer[0]=MINUS;
  ------------------
  |  |   93|    350|#define MINUS 45
  ------------------
 1278|    350|                        cnv->charErrorBufferLength=1;
 1279|    350|                        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1280|    350|                        break;
 1281|    350|                    }
 1282|  33.3M|                    goto directMode;
 1283|  36.9M|                } else {
 1284|       |                    /*
 1285|       |                     * base64 this character:
 1286|       |                     * Output 2 or 3 base64 bytes for the remaining bits of the previous character
 1287|       |                     * and the bits of this character, each implicitly in UTF-16BE.
 1288|       |                     *
 1289|       |                     * Here, bits is an 8-bit variable because only 6 bits need to be kept from one
 1290|       |                     * character to the next. The actual 2 or 4 bits are shifted to the left edge
 1291|       |                     * of the 6-bits field 5..0 to make the termination of the base64 sequence easier.
 1292|       |                     */
 1293|  36.9M|                    switch(base64Counter) {
 1294|  34.4M|                    case 0:
  ------------------
  |  Branch (1294:21): [True: 34.4M, False: 2.55M]
  ------------------
 1295|  34.4M|                        b=(uint8_t)(c>>10);
 1296|  34.4M|                        *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  34.4M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   168k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 34.2M, False: 168k]
  |  |  ------------------
  ------------------
 1297|  34.4M|                        if(target<targetLimit) {
  ------------------
  |  Branch (1297:28): [True: 34.4M, False: 936]
  ------------------
 1298|  34.4M|                            b=(uint8_t)((c>>4)&0x3f);
 1299|  34.4M|                            *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  34.4M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   152k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 34.2M, False: 152k]
  |  |  ------------------
  ------------------
 1300|  34.4M|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (1300:32): [True: 0, False: 34.4M]
  ------------------
 1301|      0|                                *offsets++=sourceIndex;
 1302|      0|                                *offsets++=sourceIndex++;
 1303|      0|                            }
 1304|  34.4M|                        } else {
 1305|    936|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (1305:32): [True: 0, False: 936]
  ------------------
 1306|      0|                                *offsets++=sourceIndex++;
 1307|      0|                            }
 1308|    936|                            b=(uint8_t)((c>>4)&0x3f);
 1309|    936|                            cnv->charErrorBuffer[0]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    936|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    200|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 736, False: 200]
  |  |  ------------------
  ------------------
 1310|    936|                            cnv->charErrorBufferLength=1;
 1311|    936|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1312|    936|                        }
 1313|  34.4M|                        bits=(uint8_t)((c&15)<<2);
 1314|  34.4M|                        base64Counter=1;
 1315|  34.4M|                        break;
 1316|  1.35M|                    case 1:
  ------------------
  |  Branch (1316:21): [True: 1.35M, False: 35.6M]
  ------------------
 1317|  1.35M|                        b=(uint8_t)(bits|(c>>14));
 1318|  1.35M|                        *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  1.35M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   150k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 1.20M, False: 150k]
  |  |  ------------------
  ------------------
 1319|  1.35M|                        if(target<targetLimit) {
  ------------------
  |  Branch (1319:28): [True: 1.35M, False: 679]
  ------------------
 1320|  1.35M|                            b=(uint8_t)((c>>8)&0x3f);
 1321|  1.35M|                            *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  1.35M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   202k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 1.15M, False: 202k]
  |  |  ------------------
  ------------------
 1322|  1.35M|                            if(target<targetLimit) {
  ------------------
  |  Branch (1322:32): [True: 1.35M, False: 552]
  ------------------
 1323|  1.35M|                                b=(uint8_t)((c>>2)&0x3f);
 1324|  1.35M|                                *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  1.35M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   162k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 1.19M, False: 162k]
  |  |  ------------------
  ------------------
 1325|  1.35M|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (1325:36): [True: 0, False: 1.35M]
  ------------------
 1326|      0|                                    *offsets++=sourceIndex;
 1327|      0|                                    *offsets++=sourceIndex;
 1328|      0|                                    *offsets++=sourceIndex++;
 1329|      0|                                }
 1330|  1.35M|                            } else {
 1331|    552|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (1331:36): [True: 0, False: 552]
  ------------------
 1332|      0|                                    *offsets++=sourceIndex;
 1333|      0|                                    *offsets++=sourceIndex++;
 1334|      0|                                }
 1335|    552|                                b=(uint8_t)((c>>2)&0x3f);
 1336|    552|                                cnv->charErrorBuffer[0]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    552|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    197|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 355, False: 197]
  |  |  ------------------
  ------------------
 1337|    552|                                cnv->charErrorBufferLength=1;
 1338|    552|                                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1339|    552|                            }
 1340|  1.35M|                        } else {
 1341|    679|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (1341:32): [True: 0, False: 679]
  ------------------
 1342|      0|                                *offsets++=sourceIndex++;
 1343|      0|                            }
 1344|    679|                            b=(uint8_t)((c>>8)&0x3f);
 1345|    679|                            cnv->charErrorBuffer[0]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    679|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    330|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 349, False: 330]
  |  |  ------------------
  ------------------
 1346|    679|                            b=(uint8_t)((c>>2)&0x3f);
 1347|    679|                            cnv->charErrorBuffer[1]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    679|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    332|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 347, False: 332]
  |  |  ------------------
  ------------------
 1348|    679|                            cnv->charErrorBufferLength=2;
 1349|    679|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1350|    679|                        }
 1351|  1.35M|                        bits=(uint8_t)((c&3)<<4);
 1352|  1.35M|                        base64Counter=2;
 1353|  1.35M|                        break;
 1354|  1.20M|                    case 2:
  ------------------
  |  Branch (1354:21): [True: 1.20M, False: 35.7M]
  ------------------
 1355|  1.20M|                        b=(uint8_t)(bits|(c>>12));
 1356|  1.20M|                        *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  1.20M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   149k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 1.05M, False: 149k]
  |  |  ------------------
  ------------------
 1357|  1.20M|                        if(target<targetLimit) {
  ------------------
  |  Branch (1357:28): [True: 1.19M, False: 499]
  ------------------
 1358|  1.19M|                            b=(uint8_t)((c>>6)&0x3f);
 1359|  1.19M|                            *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  1.19M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   151k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 1.04M, False: 151k]
  |  |  ------------------
  ------------------
 1360|  1.19M|                            if(target<targetLimit) {
  ------------------
  |  Branch (1360:32): [True: 1.19M, False: 408]
  ------------------
 1361|  1.19M|                                b=(uint8_t)(c&0x3f);
 1362|  1.19M|                                *target++=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|  1.19M|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|   166k|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 1.03M, False: 166k]
  |  |  ------------------
  ------------------
 1363|  1.19M|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (1363:36): [True: 0, False: 1.19M]
  ------------------
 1364|      0|                                    *offsets++=sourceIndex;
 1365|      0|                                    *offsets++=sourceIndex;
 1366|      0|                                    *offsets++=sourceIndex++;
 1367|      0|                                }
 1368|  1.19M|                            } else {
 1369|    408|                                if(offsets!=nullptr) {
  ------------------
  |  Branch (1369:36): [True: 0, False: 408]
  ------------------
 1370|      0|                                    *offsets++=sourceIndex;
 1371|      0|                                    *offsets++=sourceIndex++;
 1372|      0|                                }
 1373|    408|                                b=(uint8_t)(c&0x3f);
 1374|    408|                                cnv->charErrorBuffer[0]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    408|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    195|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 213, False: 195]
  |  |  ------------------
  ------------------
 1375|    408|                                cnv->charErrorBufferLength=1;
 1376|    408|                                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1377|    408|                            }
 1378|  1.19M|                        } else {
 1379|    499|                            if(offsets!=nullptr) {
  ------------------
  |  Branch (1379:32): [True: 0, False: 499]
  ------------------
 1380|      0|                                *offsets++=sourceIndex++;
 1381|      0|                            }
 1382|    499|                            b=(uint8_t)((c>>6)&0x3f);
 1383|    499|                            cnv->charErrorBuffer[0]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    499|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    229|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 270, False: 229]
  |  |  ------------------
  ------------------
 1384|    499|                            b=(uint8_t)(c&0x3f);
 1385|    499|                            cnv->charErrorBuffer[1]=TO_BASE64_IMAP(b);
  ------------------
  |  |  872|    499|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|    259|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 240, False: 259]
  |  |  ------------------
  ------------------
 1386|    499|                            cnv->charErrorBufferLength=2;
 1387|    499|                            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1388|    499|                        }
 1389|  1.20M|                        bits=0;
 1390|  1.20M|                        base64Counter=0;
 1391|  1.20M|                        break;
 1392|      0|                    default:
  ------------------
  |  Branch (1392:21): [True: 0, False: 36.9M]
  ------------------
 1393|       |                        /* will never occur */
 1394|      0|                        break;
 1395|  36.9M|                    }
 1396|  36.9M|                }
 1397|  70.3M|            } else {
 1398|       |                /* target is full */
 1399|  3.68k|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1400|  3.68k|                break;
 1401|  3.68k|            }
 1402|  70.3M|        }
 1403|  33.3M|    }
 1404|       |
 1405|  5.27k|    if(pArgs->flush && source>=sourceLimit) {
  ------------------
  |  Branch (1405:8): [True: 5.27k, False: 0]
  |  Branch (1405:24): [True: 315, False: 4.95k]
  ------------------
 1406|       |        /* flush remaining bits to the target */
 1407|    315|        if(!inDirectMode) {
  ------------------
  |  Branch (1407:12): [True: 262, False: 53]
  ------------------
 1408|    262|            if(base64Counter!=0) {
  ------------------
  |  Branch (1408:16): [True: 191, False: 71]
  ------------------
 1409|    191|                if(target<targetLimit) {
  ------------------
  |  Branch (1409:20): [True: 187, False: 4]
  ------------------
 1410|    187|                    *target++=TO_BASE64_IMAP(bits);
  ------------------
  |  |  872|    187|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|      0|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 187, False: 0]
  |  |  ------------------
  ------------------
 1411|    187|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (1411:24): [True: 0, False: 187]
  ------------------
 1412|      0|                        *offsets++=sourceIndex-1;
 1413|      0|                    }
 1414|    187|                } else {
 1415|      4|                    cnv->charErrorBuffer[cnv->charErrorBufferLength++]=TO_BASE64_IMAP(bits);
  ------------------
  |  |  872|      4|#define TO_BASE64_IMAP(n) ((n)<63 ? toBase64[n] : COMMA)
  |  |  ------------------
  |  |  |  |  863|      0|#define COMMA 0x2c
  |  |  ------------------
  |  |  |  Branch (872:28): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 1416|      4|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1417|      4|                }
 1418|    191|            }
 1419|       |            /* need to terminate with a minus */
 1420|    262|            if(target<targetLimit) {
  ------------------
  |  Branch (1420:16): [True: 254, False: 8]
  ------------------
 1421|    254|                *target++=MINUS;
  ------------------
  |  |   93|    254|#define MINUS 45
  ------------------
 1422|    254|                if(offsets!=nullptr) {
  ------------------
  |  Branch (1422:20): [True: 0, False: 254]
  ------------------
 1423|      0|                    *offsets++=sourceIndex-1;
 1424|      0|                }
 1425|    254|            } else {
 1426|      8|                cnv->charErrorBuffer[cnv->charErrorBufferLength++]=MINUS;
  ------------------
  |  |   93|      8|#define MINUS 45
  ------------------
 1427|      8|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1428|      8|            }
 1429|    262|        }
 1430|       |        /* reset the state for the next conversion */
 1431|    315|        cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */
 1432|  4.95k|    } else {
 1433|       |        /* set the converter state back into UConverter */
 1434|  4.95k|        cnv->fromUnicodeStatus=
 1435|  4.95k|            (cnv->fromUnicodeStatus&0xf0000000)|    /* keep version*/
 1436|  4.95k|            ((uint32_t)inDirectMode<<24)|((uint32_t)base64Counter<<16)|(uint32_t)bits;
 1437|  4.95k|    }
 1438|       |
 1439|       |    /* write back the updated pointers */
 1440|  5.27k|    pArgs->source=source;
 1441|  5.27k|    pArgs->target=(char *)target;
 1442|  5.27k|    pArgs->offsets=offsets;
 1443|  5.27k|}

ucnv_fromUnicode_UTF8_78:
  302|   507k|{
  303|   507k|    UConverter *cnv = args->converter;
  304|   507k|    const char16_t *mySource = args->source;
  305|   507k|    const char16_t *sourceLimit = args->sourceLimit;
  306|   507k|    uint8_t *myTarget = (uint8_t *) args->target;
  307|   507k|    const uint8_t *targetLimit = (uint8_t *) args->targetLimit;
  308|   507k|    uint8_t *tempPtr;
  309|   507k|    UChar32 ch;
  310|   507k|    uint8_t tempBuf[4];
  311|   507k|    int32_t indexToWrite;
  312|   507k|    UBool isNotCESU8 = !hasCESU8Data(cnv);
  313|       |
  314|   507k|    if (cnv->fromUChar32 && myTarget < targetLimit)
  ------------------
  |  Branch (314:9): [True: 0, False: 507k]
  |  Branch (314:29): [True: 0, False: 0]
  ------------------
  315|      0|    {
  316|      0|        ch = cnv->fromUChar32;
  317|      0|        cnv->fromUChar32 = 0;
  318|      0|        goto lowsurrogate;
  319|      0|    }
  320|       |
  321|  20.7M|    while (mySource < sourceLimit && myTarget < targetLimit)
  ------------------
  |  Branch (321:12): [True: 20.7M, False: 154]
  |  Branch (321:38): [True: 20.7M, False: 1.66k]
  ------------------
  322|  20.7M|    {
  323|  20.7M|        ch = *(mySource++);
  324|       |
  325|  20.7M|        if (ch < 0x80)        /* Single byte */
  ------------------
  |  Branch (325:13): [True: 836k, False: 19.9M]
  ------------------
  326|   836k|        {
  327|   836k|            *(myTarget++) = (uint8_t) ch;
  328|   836k|        }
  329|  19.9M|        else if (ch < 0x800)  /* Double byte */
  ------------------
  |  Branch (329:18): [True: 183k, False: 19.7M]
  ------------------
  330|   183k|        {
  331|   183k|            *(myTarget++) = (uint8_t) ((ch >> 6) | 0xc0);
  332|   183k|            if (myTarget < targetLimit)
  ------------------
  |  Branch (332:17): [True: 183k, False: 71]
  ------------------
  333|   183k|            {
  334|   183k|                *(myTarget++) = (uint8_t) ((ch & 0x3f) | 0x80);
  335|   183k|            }
  336|     71|            else
  337|     71|            {
  338|     71|                cnv->charErrorBuffer[0] = (uint8_t) ((ch & 0x3f) | 0x80);
  339|     71|                cnv->charErrorBufferLength = 1;
  340|     71|                *err = U_BUFFER_OVERFLOW_ERROR;
  341|     71|            }
  342|   183k|        }
  343|  19.7M|        else {
  344|       |            /* Check for surrogates */
  345|  19.7M|            if(U16_IS_SURROGATE(ch) && isNotCESU8) {
  ------------------
  |  |   75|  19.7M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  39.4M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 507k, False: 19.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (345:40): [True: 506k, False: 865]
  ------------------
  346|   506k|lowsurrogate:
  347|   506k|                if (mySource < sourceLimit) {
  ------------------
  |  Branch (347:21): [True: 506k, False: 19]
  ------------------
  348|       |                    /* test both code units */
  349|   506k|                    if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(*mySource)) {
  ------------------
  |  |   84|  1.01M|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 16.2k, False: 490k]
  |  |  ------------------
  ------------------
                                  if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(*mySource)) {
  ------------------
  |  |   67|  16.2k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 754, False: 15.4k]
  |  |  ------------------
  ------------------
  350|       |                        /* convert and consume this supplementary code point */
  351|    754|                        ch=U16_GET_SUPPLEMENTARY(ch, *mySource);
  ------------------
  |  |  113|    754|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    754|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
  352|    754|                        ++mySource;
  353|       |                        /* exit this condition tree */
  354|    754|                    }
  355|   506k|                    else {
  356|       |                        /* this is an unpaired trail or lead code unit */
  357|       |                        /* callback(illegal) */
  358|   506k|                        cnv->fromUChar32 = ch;
  359|   506k|                        *err = U_ILLEGAL_CHAR_FOUND;
  360|   506k|                        break;
  361|   506k|                    }
  362|   506k|                }
  363|     19|                else {
  364|       |                    /* no more input */
  365|     19|                    cnv->fromUChar32 = ch;
  366|     19|                    break;
  367|     19|                }
  368|   506k|            }
  369|       |
  370|       |            /* Do we write the buffer directly for speed,
  371|       |            or do we have to be careful about target buffer space? */
  372|  19.2M|            tempPtr = (((targetLimit - myTarget) >= 4) ? myTarget : tempBuf);
  ------------------
  |  Branch (372:24): [True: 19.2M, False: 1.57k]
  ------------------
  373|       |
  374|  19.2M|            if (ch <= MAXIMUM_UCS2) {
  ------------------
  |  |   49|  19.2M|#define MAXIMUM_UCS2            0x0000FFFF
  ------------------
  |  Branch (374:17): [True: 19.2M, False: 754]
  ------------------
  375|  19.2M|                indexToWrite = 2;
  376|  19.2M|                tempPtr[0] = (uint8_t) ((ch >> 12) | 0xe0);
  377|  19.2M|            }
  378|    754|            else {
  379|    754|                indexToWrite = 3;
  380|    754|                tempPtr[0] = (uint8_t) ((ch >> 18) | 0xf0);
  381|    754|                tempPtr[1] = (uint8_t) (((ch >> 12) & 0x3f) | 0x80);
  382|    754|            }
  383|  19.2M|            tempPtr[indexToWrite-1] = (uint8_t) (((ch >> 6) & 0x3f) | 0x80);
  384|  19.2M|            tempPtr[indexToWrite] = (uint8_t) ((ch & 0x3f) | 0x80);
  385|       |
  386|  19.2M|            if (tempPtr == myTarget) {
  ------------------
  |  Branch (386:17): [True: 19.2M, False: 1.57k]
  ------------------
  387|       |                /* There was enough space to write the codepoint directly. */
  388|  19.2M|                myTarget += (indexToWrite + 1);
  389|  19.2M|            }
  390|  1.57k|            else {
  391|       |                /* We might run out of room soon. Write it slowly. */
  392|  6.31k|                for (; tempPtr <= (tempBuf + indexToWrite); tempPtr++) {
  ------------------
  |  Branch (392:24): [True: 4.73k, False: 1.57k]
  ------------------
  393|  4.73k|                    if (myTarget < targetLimit) {
  ------------------
  |  Branch (393:25): [True: 3.20k, False: 1.52k]
  ------------------
  394|  3.20k|                        *(myTarget++) = *tempPtr;
  395|  3.20k|                    }
  396|  1.52k|                    else {
  397|  1.52k|                        cnv->charErrorBuffer[cnv->charErrorBufferLength++] = *tempPtr;
  398|  1.52k|                        *err = U_BUFFER_OVERFLOW_ERROR;
  399|  1.52k|                    }
  400|  4.73k|                }
  401|  1.57k|            }
  402|  19.2M|        }
  403|  20.7M|    }
  404|       |
  405|   507k|    if (mySource < sourceLimit && myTarget >= targetLimit && U_SUCCESS(*err))
  ------------------
  |  Branch (405:9): [True: 507k, False: 173]
  |  Branch (405:35): [True: 1.66k, False: 506k]
  |  Branch (405:62): [True: 619, False: 1.04k]
  ------------------
  406|    619|    {
  407|    619|        *err = U_BUFFER_OVERFLOW_ERROR;
  408|    619|    }
  409|       |
  410|   507k|    args->target = (char *) myTarget;
  411|   507k|    args->source = mySource;
  412|   507k|}
ucnv_u8.cpp:_ZL12hasCESU8DataPK10UConverter:
   57|   507k|{
   58|       |#if UCONFIG_ONLY_HTML_CONVERSION
   59|       |    return false;
   60|       |#else
   61|   507k|    return cnv->sharedData == &_CESU8Data;
  ------------------
  |  |   87|   507k|#define _CESU8Data U_ICU_ENTRY_POINT_RENAME(_CESU8Data)
  |  |  ------------------
  |  |  |  |  123|   507k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|   507k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|   507k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   62|   507k|#endif
   63|   507k|}

ucnvbocu.cpp:_ZL9bocu1Previ:
  237|  42.6M|bocu1Prev(int32_t c) {
  238|       |    /* compute new prev */
  239|  42.6M|    if(/* 0x3040<=c && */ c<=0x309f) {
  ------------------
  |  Branch (239:27): [True: 897, False: 42.6M]
  ------------------
  240|       |        /* Hiragana is not 128-aligned */
  241|    897|        return 0x3070;
  242|  42.6M|    } else if(0x4e00<=c && c<=0x9fa5) {
  ------------------
  |  Branch (242:15): [True: 29.3M, False: 13.3M]
  |  Branch (242:28): [True: 28.2M, False: 1.11M]
  ------------------
  243|       |        /* CJK Unihan */
  244|  28.2M|        return 0x4e00-BOCU1_REACH_NEG_2;
  ------------------
  |  |   92|  28.2M|#define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   88|  28.2M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  28.2M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   82|  28.2M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  28.2M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  28.2M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  28.2M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  28.2M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|  28.2M|    } else if(0xac00<=c /* && c<=0xd7a3 */) {
  ------------------
  |  Branch (245:15): [True: 585k, False: 13.8M]
  ------------------
  246|       |        /* Korean Hangul */
  247|   585k|        return (0xd7a3+0xac00)/2;
  248|  13.8M|    } else {
  249|       |        /* mostly small scripts */
  250|  13.8M|        return BOCU1_SIMPLE_PREV(c);
  ------------------
  |  |  227|  13.8M|#define BOCU1_SIMPLE_PREV(c) (((c)&~0x7f)+BOCU1_ASCII_PREV)
  |  |  ------------------
  |  |  |  |   56|  13.8M|#define BOCU1_ASCII_PREV        0x40
  |  |  ------------------
  ------------------
  251|  13.8M|    }
  252|  42.6M|}
ucnvbocu.cpp:_ZL17_Bocu1FromUnicodeP25UConverterFromUnicodeArgsP10UErrorCode:
  654|  3.51k|                  UErrorCode *pErrorCode) {
  655|  3.51k|    UConverter *cnv;
  656|  3.51k|    const char16_t *source, *sourceLimit;
  657|  3.51k|    uint8_t *target;
  658|  3.51k|    int32_t targetCapacity;
  659|       |
  660|  3.51k|    int32_t prev, c, diff;
  661|       |
  662|       |    /* set up the local pointers */
  663|  3.51k|    cnv=pArgs->converter;
  664|  3.51k|    source=pArgs->source;
  665|  3.51k|    sourceLimit=pArgs->sourceLimit;
  666|  3.51k|    target = reinterpret_cast<uint8_t*>(pArgs->target);
  667|  3.51k|    targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target);
  668|       |
  669|       |    /* get the converter state from UConverter */
  670|  3.51k|    c=cnv->fromUChar32;
  671|  3.51k|    prev = static_cast<int32_t>(cnv->fromUnicodeStatus);
  672|  3.51k|    if(prev==0) {
  ------------------
  |  Branch (672:8): [True: 614, False: 2.90k]
  ------------------
  673|    614|        prev=BOCU1_ASCII_PREV;
  ------------------
  |  |   56|    614|#define BOCU1_ASCII_PREV        0x40
  ------------------
  674|    614|    }
  675|       |
  676|       |    /* conversion loop */
  677|  3.51k|    if(c!=0 && targetCapacity>0) {
  ------------------
  |  Branch (677:8): [True: 0, False: 3.51k]
  |  Branch (677:16): [True: 0, False: 0]
  ------------------
  678|      0|        goto getTrail;
  679|      0|    }
  680|       |
  681|  28.3k|fastSingle:
  682|       |    /* fast loop for single-byte differences */
  683|       |    /* use only one loop counter variable, targetCapacity, not also source */
  684|  28.3k|    diff = static_cast<int32_t>(sourceLimit - source);
  685|  28.3k|    if(targetCapacity>diff) {
  ------------------
  |  Branch (685:8): [True: 10.3k, False: 17.9k]
  ------------------
  686|  10.3k|        targetCapacity=diff;
  687|  10.3k|    }
  688|   120k|    while(targetCapacity>0 && (c=*source)<0x3000) {
  ------------------
  |  Branch (688:11): [True: 120k, False: 204]
  |  Branch (688:31): [True: 114k, False: 5.90k]
  ------------------
  689|   114k|        if(c<=0x20) {
  ------------------
  |  Branch (689:12): [True: 70.8k, False: 43.3k]
  ------------------
  690|  70.8k|            if(c!=0x20) {
  ------------------
  |  Branch (690:16): [True: 70.6k, False: 199]
  ------------------
  691|  70.6k|                prev=BOCU1_ASCII_PREV;
  ------------------
  |  |   56|  70.6k|#define BOCU1_ASCII_PREV        0x40
  ------------------
  692|  70.6k|            }
  693|  70.8k|            *target++ = static_cast<uint8_t>(c);
  694|  70.8k|        } else {
  695|  43.3k|            diff=c-prev;
  696|  43.3k|            if(DIFF_IS_SINGLE(diff)) {
  ------------------
  |  |  217|  43.3k|#define DIFF_IS_SINGLE(diff) (BOCU1_REACH_NEG_1<=(diff) && (diff)<=BOCU1_REACH_POS_1)
  |  |  ------------------
  |  |  |  |   88|  43.3k|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  43.3k|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DIFF_IS_SINGLE(diff) (BOCU1_REACH_NEG_1<=(diff) && (diff)<=BOCU1_REACH_POS_1)
  |  |  ------------------
  |  |  |  |   87|  25.5k|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  25.5k|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (217:31): [True: 25.5k, False: 17.8k]
  |  |  |  Branch (217:60): [True: 21.1k, False: 4.36k]
  |  |  ------------------
  ------------------
  697|  21.1k|                prev=BOCU1_SIMPLE_PREV(c);
  ------------------
  |  |  227|  21.1k|#define BOCU1_SIMPLE_PREV(c) (((c)&~0x7f)+BOCU1_ASCII_PREV)
  |  |  ------------------
  |  |  |  |   56|  21.1k|#define BOCU1_ASCII_PREV        0x40
  |  |  ------------------
  ------------------
  698|  21.1k|                *target++ = static_cast<uint8_t>(PACK_SINGLE_DIFF(diff));
  ------------------
  |  |  220|  21.1k|#define PACK_SINGLE_DIFF(diff) (BOCU1_MIDDLE+(diff))
  |  |  ------------------
  |  |  |  |   60|  21.1k|#define BOCU1_MIDDLE            0x90
  |  |  ------------------
  ------------------
  699|  22.2k|            } else {
  700|  22.2k|                break;
  701|  22.2k|            }
  702|  43.3k|        }
  703|  91.9k|        ++source;
  704|  91.9k|        --targetCapacity;
  705|  91.9k|    }
  706|       |    /* restore real values */
  707|  28.3k|    targetCapacity = static_cast<int32_t>(reinterpret_cast<const uint8_t*>(pArgs->targetLimit) - target);
  708|       |
  709|       |    /* regular loop for all cases */
  710|  70.8M|    while(source<sourceLimit) {
  ------------------
  |  Branch (710:11): [True: 70.8M, False: 614]
  ------------------
  711|  70.8M|        if(targetCapacity>0) {
  ------------------
  |  Branch (711:12): [True: 70.8M, False: 772]
  ------------------
  712|  70.8M|            c=*source++;
  713|       |
  714|  70.8M|            if(c<=0x20) {
  ------------------
  |  Branch (714:16): [True: 114k, False: 70.7M]
  ------------------
  715|       |                /*
  716|       |                 * ISO C0 control & space:
  717|       |                 * Encode directly for MIME compatibility,
  718|       |                 * and reset state except for space, to not disrupt compression.
  719|       |                 */
  720|   114k|                if(c!=0x20) {
  ------------------
  |  Branch (720:20): [True: 114k, False: 242]
  ------------------
  721|   114k|                    prev=BOCU1_ASCII_PREV;
  ------------------
  |  |   56|   114k|#define BOCU1_ASCII_PREV        0x40
  ------------------
  722|   114k|                }
  723|   114k|                *target++ = static_cast<uint8_t>(c);
  724|   114k|                --targetCapacity;
  725|   114k|                continue;
  726|   114k|            }
  727|       |
  728|  70.7M|            if(U16_IS_LEAD(c)) {
  ------------------
  |  |   59|  70.7M|#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
  |  |  ------------------
  |  |  |  Branch (59:24): [True: 211k, False: 70.4M]
  |  |  ------------------
  ------------------
  729|   211k|getTrail:
  730|   211k|                if(source<sourceLimit) {
  ------------------
  |  Branch (730:20): [True: 211k, False: 65]
  ------------------
  731|       |                    /* test the following code unit */
  732|   211k|                    char16_t trail=*source;
  733|   211k|                    if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|   211k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 107k, False: 103k]
  |  |  ------------------
  ------------------
  734|   107k|                        ++source;
  735|   107k|                        c=U16_GET_SUPPLEMENTARY(c, trail);
  ------------------
  |  |  113|   107k|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|   107k|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
  736|   107k|                    }
  737|   211k|                } else {
  738|       |                    /* no more input */
  739|     65|                    c=-c; /* negative lead surrogate as "incomplete" indicator to avoid c=0 everywhere else */
  740|     65|                    break;
  741|     65|                }
  742|   211k|            }
  743|       |
  744|       |            /*
  745|       |             * all other Unicode code points c==U+0021..U+10ffff
  746|       |             * are encoded with the difference c-prev
  747|       |             *
  748|       |             * a new prev is computed from c,
  749|       |             * placed in the middle of a 0x80-block (for most small scripts) or
  750|       |             * in the middle of the Unihan and Hangul blocks
  751|       |             * to statistically minimize the following difference
  752|       |             */
  753|  70.7M|            diff=c-prev;
  754|  70.7M|            prev=BOCU1_PREV(c);
  ------------------
  |  |  255|  70.7M|#define BOCU1_PREV(c) ((c)<0x3040 || (c)>0xd7a3 ? BOCU1_SIMPLE_PREV(c) : bocu1Prev(c))
  |  |  ------------------
  |  |  |  |  227|  28.0M|#define BOCU1_SIMPLE_PREV(c) (((c)&~0x7f)+BOCU1_ASCII_PREV)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  28.0M|#define BOCU1_ASCII_PREV        0x40
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (255:24): [True: 14.4M, False: 56.2M]
  |  |  |  Branch (255:38): [True: 13.5M, False: 42.6M]
  |  |  ------------------
  ------------------
  755|  70.7M|            if(DIFF_IS_SINGLE(diff)) {
  ------------------
  |  |  217|  70.7M|#define DIFF_IS_SINGLE(diff) (BOCU1_REACH_NEG_1<=(diff) && (diff)<=BOCU1_REACH_POS_1)
  |  |  ------------------
  |  |  |  |   88|  70.7M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  70.7M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DIFF_IS_SINGLE(diff) (BOCU1_REACH_NEG_1<=(diff) && (diff)<=BOCU1_REACH_POS_1)
  |  |  ------------------
  |  |  |  |   87|  30.5M|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  30.5M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (217:31): [True: 30.5M, False: 40.1M]
  |  |  |  Branch (217:60): [True: 75.1k, False: 30.4M]
  |  |  ------------------
  ------------------
  756|  75.1k|                *target++ = static_cast<uint8_t>(PACK_SINGLE_DIFF(diff));
  ------------------
  |  |  220|  75.1k|#define PACK_SINGLE_DIFF(diff) (BOCU1_MIDDLE+(diff))
  |  |  ------------------
  |  |  |  |   60|  75.1k|#define BOCU1_MIDDLE            0x90
  |  |  ------------------
  ------------------
  757|  75.1k|                --targetCapacity;
  758|  75.1k|                if(c<0x3000) {
  ------------------
  |  Branch (758:20): [True: 24.7k, False: 50.3k]
  ------------------
  759|  24.7k|                    goto fastSingle;
  760|  24.7k|                }
  761|  70.6M|            } else if(DIFF_IS_DOUBLE(diff) && 2<=targetCapacity) {
  ------------------
  |  |  223|   141M|#define DIFF_IS_DOUBLE(diff) (BOCU1_REACH_NEG_2<=(diff) && (diff)<=BOCU1_REACH_POS_2)
  |  |  ------------------
  |  |  |  |   92|  70.6M|#define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   88|  70.6M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  70.6M|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  70.6M|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  70.6M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  70.6M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|  70.6M|#define BOCU1_MIN               0x21
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  70.6M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DIFF_IS_DOUBLE(diff) (BOCU1_REACH_NEG_2<=(diff) && (diff)<=BOCU1_REACH_POS_2)
  |  |  ------------------
  |  |  |  |   91|  31.0M|#define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|  31.0M|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  31.0M|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  31.0M|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  31.0M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  31.0M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|  31.0M|#define BOCU1_MIN               0x21
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  31.0M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (223:31): [True: 31.0M, False: 39.6M]
  |  |  |  Branch (223:60): [True: 1.07M, False: 29.9M]
  |  |  ------------------
  ------------------
  |  Branch (761:47): [True: 1.07M, False: 828]
  ------------------
  762|       |                /* optimize 2-byte case */
  763|  1.07M|                int32_t m;
  764|       |
  765|  1.07M|                if(diff>=0) {
  ------------------
  |  Branch (765:20): [True: 507k, False: 564k]
  ------------------
  766|   507k|                    diff-=BOCU1_REACH_POS_1+1;
  ------------------
  |  |   87|   507k|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  ------------------
  |  |  |  |   79|   507k|#define BOCU1_SINGLE            64
  |  |  ------------------
  ------------------
  767|   507k|                    m=diff%BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   507k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   507k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   507k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   507k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  768|   507k|                    diff/=BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   507k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   507k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   507k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   507k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  769|   507k|                    diff+=BOCU1_START_POS_2;
  ------------------
  |  |  101|   507k|#define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  ------------------
  |  |  |  |   60|   507k|#define BOCU1_MIDDLE            0x90
  |  |  ------------------
  |  |               #define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  ------------------
  |  |  |  |   87|   507k|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|   507k|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|   564k|                } else {
  771|   564k|                    diff-=BOCU1_REACH_NEG_1;
  ------------------
  |  |   88|   564k|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  ------------------
  |  |  |  |   79|   564k|#define BOCU1_SINGLE            64
  |  |  ------------------
  ------------------
  772|   564k|                    NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
  ------------------
  |  |  205|   564k|#define NEGDIVMOD(n, d, m) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|   564k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  206|   564k|    (m)=(n)%(d); \
  |  |  207|   564k|    (n)/=(d); \
  |  |  208|   564k|    if((m)<0) { \
  |  |  ------------------
  |  |  |  Branch (208:8): [True: 549k, False: 15.5k]
  |  |  ------------------
  |  |  209|   549k|        --(n); \
  |  |  210|   549k|        (m)+=(d); \
  |  |  211|   549k|    } \
  |  |  212|   564k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|   564k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  773|   564k|                    diff+=BOCU1_START_NEG_2;
  ------------------
  |  |  106|   564k|#define BOCU1_START_NEG_2   (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
  |  |  ------------------
  |  |  |  |   60|   564k|#define BOCU1_MIDDLE            0x90
  |  |  ------------------
  |  |               #define BOCU1_START_NEG_2   (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
  |  |  ------------------
  |  |  |  |   88|   564k|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|   564k|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  774|   564k|                }
  775|  1.07M|                *target++ = static_cast<uint8_t>(diff);
  776|  1.07M|                *target++ = static_cast<uint8_t>(BOCU1_TRAIL_TO_BYTE(m));
  ------------------
  |  |  149|  1.07M|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|  1.07M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|   844k|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   844k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   844k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 844k, False: 226k]
  |  |  ------------------
  ------------------
  777|  1.07M|                targetCapacity-=2;
  778|  69.5M|            } else {
  779|  69.5M|                int32_t length; /* will be 2..4 */
  780|       |
  781|  69.5M|                diff=packDiff(diff);
  782|  69.5M|                length=BOCU1_LENGTH_FROM_PACKED(diff);
  ------------------
  |  |  119|  69.5M|    ((uint32_t)(packed)<0x04000000 ? (packed)>>24 : 4)
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 69.3M, False: 208k]
  |  |  ------------------
  ------------------
  783|       |
  784|       |                /* write the output character bytes from diff and length */
  785|       |                /* from the first if in the loop we know that targetCapacity>0 */
  786|  69.5M|                if(length<=targetCapacity) {
  ------------------
  |  Branch (786:20): [True: 69.5M, False: 2.06k]
  ------------------
  787|  69.5M|                    switch(length) {
  788|       |                        /* each branch falls through to the next one */
  789|   208k|                    case 4:
  ------------------
  |  Branch (789:21): [True: 208k, False: 69.3M]
  ------------------
  790|   208k|                        *target++ = static_cast<uint8_t>(diff >> 24);
  791|   208k|                        U_FALLTHROUGH;
  ------------------
  |  |  511|   208k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  792|  69.5M|                    case 3:
  ------------------
  |  Branch (792:21): [True: 69.3M, False: 208k]
  ------------------
  793|  69.5M|                        *target++ = static_cast<uint8_t>(diff >> 16);
  794|       |                    /* case 2: handled above */
  795|  69.5M|                        *target++ = static_cast<uint8_t>(diff >> 8);
  796|       |                    /* case 1: handled above */
  797|  69.5M|                        *target++ = static_cast<uint8_t>(diff);
  798|  69.5M|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  69.5M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  799|  69.5M|                    default:
  ------------------
  |  Branch (799:21): [True: 0, False: 69.5M]
  ------------------
  800|       |                        /* will never occur */
  801|  69.5M|                        break;
  802|  69.5M|                    }
  803|  69.5M|                    targetCapacity-=length;
  804|  69.5M|                } else {
  805|  2.06k|                    uint8_t *charErrorBuffer;
  806|       |
  807|       |                    /*
  808|       |                     * We actually do this backwards here:
  809|       |                     * In order to save an intermediate variable, we output
  810|       |                     * first to the overflow buffer what does not fit into the
  811|       |                     * regular target.
  812|       |                     */
  813|       |                    /* we know that 1<=targetCapacity<length<=4 */
  814|  2.06k|                    length-=targetCapacity;
  815|  2.06k|                    charErrorBuffer=(uint8_t *)cnv->charErrorBuffer;
  816|  2.06k|                    switch(length) {
  817|       |                        /* each branch falls through to the next one */
  818|    195|                    case 3:
  ------------------
  |  Branch (818:21): [True: 195, False: 1.87k]
  ------------------
  819|    195|                        *charErrorBuffer++ = static_cast<uint8_t>(diff >> 16);
  820|    195|                        U_FALLTHROUGH;
  ------------------
  |  |  511|    195|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  821|    712|                    case 2:
  ------------------
  |  Branch (821:21): [True: 517, False: 1.55k]
  ------------------
  822|    712|                        *charErrorBuffer++ = static_cast<uint8_t>(diff >> 8);
  823|    712|                        U_FALLTHROUGH;
  ------------------
  |  |  511|    712|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  824|  2.06k|                    case 1:
  ------------------
  |  Branch (824:21): [True: 1.35k, False: 712]
  ------------------
  825|  2.06k|                        *charErrorBuffer = static_cast<uint8_t>(diff);
  826|  2.06k|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  2.06k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  827|  2.06k|                    default:
  ------------------
  |  Branch (827:21): [True: 0, False: 2.06k]
  ------------------
  828|       |                        /* will never occur */
  829|  2.06k|                        break;
  830|  2.06k|                    }
  831|  2.06k|                    cnv->charErrorBufferLength = static_cast<int8_t>(length);
  832|       |
  833|       |                    /* now output what fits into the regular target */
  834|  2.06k|                    diff>>=8*length; /* length was reduced by targetCapacity */
  835|  2.06k|                    switch(targetCapacity) {
  836|       |                        /* each branch falls through to the next one */
  837|    196|                    case 3:
  ------------------
  |  Branch (837:21): [True: 196, False: 1.87k]
  ------------------
  838|    196|                        *target++ = static_cast<uint8_t>(diff >> 16);
  839|    196|                        U_FALLTHROUGH;
  ------------------
  |  |  511|    196|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  840|    704|                    case 2:
  ------------------
  |  Branch (840:21): [True: 508, False: 1.56k]
  ------------------
  841|    704|                        *target++ = static_cast<uint8_t>(diff >> 8);
  842|    704|                        U_FALLTHROUGH;
  ------------------
  |  |  511|    704|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  843|  2.06k|                    case 1:
  ------------------
  |  Branch (843:21): [True: 1.36k, False: 704]
  ------------------
  844|  2.06k|                        *target++ = static_cast<uint8_t>(diff);
  845|  2.06k|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  2.06k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  846|  2.06k|                    default:
  ------------------
  |  Branch (846:21): [True: 0, False: 2.06k]
  ------------------
  847|       |                        /* will never occur */
  848|  2.06k|                        break;
  849|  2.06k|                    }
  850|       |
  851|       |                    /* target overflow */
  852|  2.06k|                    targetCapacity=0;
  853|  2.06k|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  854|  2.06k|                    break;
  855|  2.06k|                }
  856|  69.5M|            }
  857|  70.7M|        } else {
  858|       |            /* target is full */
  859|    772|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  860|    772|            break;
  861|    772|        }
  862|  70.8M|    }
  863|       |
  864|       |    /* set the converter state back into UConverter */
  865|  3.51k|    cnv->fromUChar32= c<0 ? -c : 0;
  ------------------
  |  Branch (865:23): [True: 65, False: 3.45k]
  ------------------
  866|  3.51k|    cnv->fromUnicodeStatus = static_cast<uint32_t>(prev);
  867|       |
  868|       |    /* write back the updated pointers */
  869|  3.51k|    pArgs->source=source;
  870|  3.51k|    pArgs->target = reinterpret_cast<char*>(target);
  871|  3.51k|}
ucnvbocu.cpp:_ZL8packDiffi:
  287|  69.5M|packDiff(int32_t diff) {
  288|  69.5M|    int32_t result, m;
  289|       |
  290|  69.5M|    U_ASSERT(!DIFF_IS_SINGLE(diff)); /* assume we won't be called where diff==BOCU1_REACH_NEG_1=-64 */
  ------------------
  |  |   35|  69.5M|#   define U_ASSERT(exp) (void)0
  ------------------
  291|  69.5M|    if(diff>=BOCU1_REACH_NEG_1) {
  ------------------
  |  |   88|  69.5M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  ------------------
  |  |  |  |   79|  69.5M|#define BOCU1_SINGLE            64
  |  |  ------------------
  ------------------
  |  Branch (291:8): [True: 29.9M, False: 39.6M]
  ------------------
  292|       |        /* mostly positive differences, and single-byte negative ones */
  293|       |#if 0   /* single-byte case handled in macros, see below */
  294|       |        if(diff<=BOCU1_REACH_POS_1) {
  295|       |            /* single byte */
  296|       |            return 0x01000000|(BOCU1_MIDDLE+diff);
  297|       |        } else
  298|       |#endif
  299|  29.9M|        if(diff<=BOCU1_REACH_POS_2) {
  ------------------
  |  |   91|  29.9M|#define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   87|  29.9M|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  29.9M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   82|  29.9M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  29.9M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  29.9M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  29.9M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  29.9M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (299:12): [True: 326, False: 29.9M]
  ------------------
  300|       |            /* two bytes */
  301|    326|            diff-=BOCU1_REACH_POS_1+1;
  ------------------
  |  |   87|    326|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  ------------------
  |  |  |  |   79|    326|#define BOCU1_SINGLE            64
  |  |  ------------------
  ------------------
  302|    326|            result=0x02000000;
  303|       |
  304|    326|            m=diff%BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|    326|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|    326|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|    326|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|    326|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  305|    326|            diff/=BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|    326|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|    326|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|    326|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|    326|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  306|    326|            result|=BOCU1_TRAIL_TO_BYTE(m);
  ------------------
  |  |  149|    326|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|    326|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|    252|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|    252|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|    252|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 252, False: 74]
  |  |  ------------------
  ------------------
  307|       |
  308|    326|            result|=(BOCU1_START_POS_2+diff)<<8;
  ------------------
  |  |  101|    326|#define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  ------------------
  |  |  |  |   60|    326|#define BOCU1_MIDDLE            0x90
  |  |  ------------------
  |  |               #define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  ------------------
  |  |  |  |   87|    326|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    326|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  309|  29.9M|        } else if(diff<=BOCU1_REACH_POS_3) {
  ------------------
  |  |   96|  29.9M|    (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   91|  29.9M|#define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|  29.9M|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  29.9M|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  29.9M|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  29.9M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  29.9M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|  29.9M|#define BOCU1_MIN               0x21
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  29.9M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   83|  29.9M|#define BOCU1_LEAD_3            3
  |  |  ------------------
  |  |                   (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  29.9M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  29.9M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  29.9M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  29.9M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  29.9M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  29.9M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  29.9M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  29.9M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (309:19): [True: 29.8M, False: 104k]
  ------------------
  310|       |            /* three bytes */
  311|  29.8M|            diff-=BOCU1_REACH_POS_2+1;
  ------------------
  |  |   91|  29.8M|#define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   87|  29.8M|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  29.8M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   82|  29.8M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  29.8M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  29.8M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  29.8M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  312|  29.8M|            result=0x03000000;
  313|       |
  314|  29.8M|            m=diff%BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|  29.8M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|  29.8M|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|  29.8M|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  315|  29.8M|            diff/=BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|  29.8M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|  29.8M|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|  29.8M|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  316|  29.8M|            result|=BOCU1_TRAIL_TO_BYTE(m);
  ------------------
  |  |  149|  29.8M|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|  29.8M|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  29.8M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 29.8M, False: 18.5k]
  |  |  ------------------
  ------------------
  317|       |
  318|  29.8M|            m=diff%BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|  29.8M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|  29.8M|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|  29.8M|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  319|  29.8M|            diff/=BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|  29.8M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|  29.8M|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|  29.8M|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  320|  29.8M|            result|=BOCU1_TRAIL_TO_BYTE(m)<<8;
  ------------------
  |  |  149|  29.8M|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|  29.8M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|  28.7M|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  28.7M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  28.7M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 28.7M, False: 1.06M]
  |  |  ------------------
  ------------------
  321|       |
  322|  29.8M|            result|=(BOCU1_START_POS_3+diff)<<16;
  ------------------
  |  |  102|  29.8M|#define BOCU1_START_POS_3   (BOCU1_START_POS_2+BOCU1_LEAD_2)
  |  |  ------------------
  |  |  |  |  101|  29.8M|#define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  29.8M|#define BOCU1_MIDDLE            0x90
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|  29.8M|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  29.8M|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_START_POS_3   (BOCU1_START_POS_2+BOCU1_LEAD_2)
  |  |  ------------------
  |  |  |  |   82|  29.8M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  ------------------
  323|  29.8M|        } else {
  324|       |            /* four bytes */
  325|   104k|            diff-=BOCU1_REACH_POS_3+1;
  ------------------
  |  |   96|   104k|    (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   91|   104k|#define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|   104k|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   104k|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   104k|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_POS_2   (BOCU1_REACH_POS_1+BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   83|   104k|#define BOCU1_LEAD_3            3
  |  |  ------------------
  |  |                   (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (BOCU1_REACH_POS_2+BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  326|       |
  327|   104k|            m=diff%BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  328|   104k|            diff/=BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  329|   104k|            result=BOCU1_TRAIL_TO_BYTE(m);
  ------------------
  |  |  149|   104k|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|   103k|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   103k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   103k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 103k, False: 568]
  |  |  ------------------
  ------------------
  330|       |
  331|   104k|            m=diff%BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  332|   104k|            diff/=BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  333|   104k|            result|=BOCU1_TRAIL_TO_BYTE(m)<<8;
  ------------------
  |  |  149|   104k|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|   103k|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   103k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   103k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 103k, False: 832]
  |  |  ------------------
  ------------------
  334|       |
  335|       |            /*
  336|       |             * We know that / and % would deliver quotient 0 and rest=diff.
  337|       |             * Avoid division and modulo for performance.
  338|       |             */
  339|   104k|            result|=BOCU1_TRAIL_TO_BYTE(diff)<<16;
  ------------------
  |  |  149|   104k|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|      0|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 0, False: 104k]
  |  |  ------------------
  ------------------
  340|       |
  341|   104k|            result |= static_cast<uint32_t>(BOCU1_START_POS_4) << 24;
  ------------------
  |  |  103|   104k|#define BOCU1_START_POS_4   (BOCU1_START_POS_3+BOCU1_LEAD_3)
  |  |  ------------------
  |  |  |  |  102|   104k|#define BOCU1_START_POS_3   (BOCU1_START_POS_2+BOCU1_LEAD_2)
  |  |  |  |  ------------------
  |  |  |  |  |  |  101|   104k|#define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   104k|#define BOCU1_MIDDLE            0x90
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_START_POS_2   (BOCU1_MIDDLE+BOCU1_REACH_POS_1+1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   87|   104k|#define BOCU1_REACH_POS_1   (BOCU1_SINGLE-1)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   79|   104k|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_START_POS_3   (BOCU1_START_POS_2+BOCU1_LEAD_2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   104k|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_START_POS_4   (BOCU1_START_POS_3+BOCU1_LEAD_3)
  |  |  ------------------
  |  |  |  |   83|   104k|#define BOCU1_LEAD_3            3
  |  |  ------------------
  ------------------
  342|   104k|        }
  343|  39.6M|    } else {
  344|       |        /* two- to four-byte negative differences */
  345|  39.6M|        if(diff>=BOCU1_REACH_NEG_2) {
  ------------------
  |  |   92|  39.6M|#define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   88|  39.6M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  39.6M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   82|  39.6M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  39.6M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  39.6M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  39.6M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  39.6M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (345:12): [True: 502, False: 39.6M]
  ------------------
  346|       |            /* two bytes */
  347|    502|            diff-=BOCU1_REACH_NEG_1;
  ------------------
  |  |   88|    502|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  ------------------
  |  |  |  |   79|    502|#define BOCU1_SINGLE            64
  |  |  ------------------
  ------------------
  348|    502|            result=0x02000000;
  349|       |
  350|    502|            NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
  ------------------
  |  |  205|    502|#define NEGDIVMOD(n, d, m) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    502|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  206|    502|    (m)=(n)%(d); \
  |  |  207|    502|    (n)/=(d); \
  |  |  208|    502|    if((m)<0) { \
  |  |  ------------------
  |  |  |  Branch (208:8): [True: 465, False: 37]
  |  |  ------------------
  |  |  209|    465|        --(n); \
  |  |  210|    465|        (m)+=(d); \
  |  |  211|    465|    } \
  |  |  212|    502|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    502|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  351|    502|            result|=BOCU1_TRAIL_TO_BYTE(m);
  ------------------
  |  |  149|    502|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|    502|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|    251|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|    251|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|    251|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 251, False: 251]
  |  |  ------------------
  ------------------
  352|       |
  353|    502|            result|=(BOCU1_START_NEG_2+diff)<<8;
  ------------------
  |  |  106|    502|#define BOCU1_START_NEG_2   (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
  |  |  ------------------
  |  |  |  |   60|    502|#define BOCU1_MIDDLE            0x90
  |  |  ------------------
  |  |               #define BOCU1_START_NEG_2   (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
  |  |  ------------------
  |  |  |  |   88|    502|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    502|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  354|  39.6M|        } else if(diff>=BOCU1_REACH_NEG_3) {
  ------------------
  |  |   98|  39.6M|#define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   92|  39.6M|#define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   88|  39.6M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  39.6M|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  39.6M|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  39.6M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  39.6M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|  39.6M|#define BOCU1_MIN               0x21
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  39.6M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   83|  39.6M|#define BOCU1_LEAD_3            3
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  39.6M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  39.6M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  39.6M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  39.6M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  39.6M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  39.6M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  39.6M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  39.6M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (354:19): [True: 39.5M, False: 104k]
  ------------------
  355|       |            /* three bytes */
  356|  39.5M|            diff-=BOCU1_REACH_NEG_2;
  ------------------
  |  |   92|  39.5M|#define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   88|  39.5M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  39.5M|#define BOCU1_SINGLE            64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   82|  39.5M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|  39.5M|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|  39.5M|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  39.5M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  39.5M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  357|  39.5M|            result=0x03000000;
  358|       |
  359|  39.5M|            NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
  ------------------
  |  |  205|  39.5M|#define NEGDIVMOD(n, d, m) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  39.5M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  206|  39.5M|    (m)=(n)%(d); \
  |  |  207|  39.5M|    (n)/=(d); \
  |  |  208|  39.5M|    if((m)<0) { \
  |  |  ------------------
  |  |  |  Branch (208:8): [True: 39.5M, False: 890]
  |  |  ------------------
  |  |  209|  39.5M|        --(n); \
  |  |  210|  39.5M|        (m)+=(d); \
  |  |  211|  39.5M|    } \
  |  |  212|  39.5M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  39.5M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  360|  39.5M|            result|=BOCU1_TRAIL_TO_BYTE(m);
  ------------------
  |  |  149|  39.5M|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|  39.5M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|  39.4M|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  39.4M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  39.4M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 39.4M, False: 20.2k]
  |  |  ------------------
  ------------------
  361|       |
  362|  39.5M|            NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
  ------------------
  |  |  205|  39.5M|#define NEGDIVMOD(n, d, m) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  39.5M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  206|  39.5M|    (m)=(n)%(d); \
  |  |  207|  39.5M|    (n)/=(d); \
  |  |  208|  39.5M|    if((m)<0) { \
  |  |  ------------------
  |  |  |  Branch (208:8): [True: 39.5M, False: 199]
  |  |  ------------------
  |  |  209|  39.5M|        --(n); \
  |  |  210|  39.5M|        (m)+=(d); \
  |  |  211|  39.5M|    } \
  |  |  212|  39.5M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  39.5M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  363|  39.5M|            result|=BOCU1_TRAIL_TO_BYTE(m)<<8;
  ------------------
  |  |  149|  39.5M|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|  39.5M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|  39.4M|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  39.4M|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|  39.4M|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 39.4M, False: 3.13k]
  |  |  ------------------
  ------------------
  364|       |
  365|  39.5M|            result|=(BOCU1_START_NEG_3+diff)<<16;
  ------------------
  |  |  107|  39.5M|#define BOCU1_START_NEG_3   (BOCU1_START_NEG_2-BOCU1_LEAD_2)
  |  |  ------------------
  |  |  |  |  106|  39.5M|#define BOCU1_START_NEG_2   (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  39.5M|#define BOCU1_MIDDLE            0x90
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_START_NEG_2   (BOCU1_MIDDLE+BOCU1_REACH_NEG_1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   88|  39.5M|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  39.5M|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_START_NEG_3   (BOCU1_START_NEG_2-BOCU1_LEAD_2)
  |  |  ------------------
  |  |  |  |   82|  39.5M|#define BOCU1_LEAD_2            43
  |  |  ------------------
  ------------------
  366|  39.5M|        } else {
  367|       |            /* four bytes */
  368|   104k|            diff-=BOCU1_REACH_NEG_3;
  ------------------
  |  |   98|   104k|#define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   92|   104k|#define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   88|   104k|#define BOCU1_REACH_NEG_1   (-BOCU1_SINGLE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   104k|#define BOCU1_SINGLE            64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   104k|#define BOCU1_LEAD_2            43
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_REACH_NEG_2   (BOCU1_REACH_NEG_1-BOCU1_LEAD_2*BOCU1_TRAIL_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   83|   104k|#define BOCU1_LEAD_3            3
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BOCU1_REACH_NEG_3   (BOCU1_REACH_NEG_2-BOCU1_LEAD_3*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT)
  |  |  ------------------
  |  |  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|       |
  370|   104k|            NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
  ------------------
  |  |  205|   104k|#define NEGDIVMOD(n, d, m) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|   104k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  206|   104k|    (m)=(n)%(d); \
  |  |  207|   104k|    (n)/=(d); \
  |  |  208|   104k|    if((m)<0) { \
  |  |  ------------------
  |  |  |  Branch (208:8): [True: 103k, False: 319]
  |  |  ------------------
  |  |  209|   103k|        --(n); \
  |  |  210|   103k|        (m)+=(d); \
  |  |  211|   103k|    } \
  |  |  212|   104k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|   104k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  371|   104k|            result=BOCU1_TRAIL_TO_BYTE(m);
  ------------------
  |  |  149|   104k|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|   103k|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   103k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   103k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 103k, False: 441]
  |  |  ------------------
  ------------------
  372|       |
  373|   104k|            NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m);
  ------------------
  |  |  205|   104k|#define NEGDIVMOD(n, d, m) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|   104k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  206|   104k|    (m)=(n)%(d); \
  |  |  207|   104k|    (n)/=(d); \
  |  |  208|   104k|    if((m)<0) { \
  |  |  ------------------
  |  |  |  Branch (208:8): [True: 104k, False: 196]
  |  |  ------------------
  |  |  209|   104k|        --(n); \
  |  |  210|   104k|        (m)+=(d); \
  |  |  211|   104k|    } \
  |  |  212|   104k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|   104k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  374|   104k|            result|=BOCU1_TRAIL_TO_BYTE(m)<<8;
  ------------------
  |  |  149|   104k|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|   100k|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   100k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   100k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 100k, False: 3.32k]
  |  |  ------------------
  ------------------
  375|       |
  376|       |            /*
  377|       |             * We know that NEGDIVMOD would deliver
  378|       |             * quotient -1 and rest=diff+BOCU1_TRAIL_COUNT.
  379|       |             * Avoid division and modulo for performance.
  380|       |             */
  381|   104k|            m=diff+BOCU1_TRAIL_COUNT;
  ------------------
  |  |   73|   104k|#define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   62|   104k|#define BOCU1_MAX_TRAIL         0xff
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_COUNT       ((BOCU1_MAX_TRAIL-BOCU1_MIN+1)+BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  ------------------
  382|   104k|            result|=BOCU1_TRAIL_TO_BYTE(m)<<16;
  ------------------
  |  |  149|   104k|#define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  ------------------
  |  |               #define BOCU1_TRAIL_TO_BYTE(t) ((t)>=BOCU1_TRAIL_CONTROLS_COUNT ? (t)+BOCU1_TRAIL_BYTE_OFFSET : bocu1TrailToByte[t])
  |  |  ------------------
  |  |  |  |   70|   104k|#define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   104k|#define BOCU1_MIN               0x21
  |  |  |  |  ------------------
  |  |  |  |               #define BOCU1_TRAIL_BYTE_OFFSET     (BOCU1_MIN-BOCU1_TRAIL_CONTROLS_COUNT)
  |  |  |  |  ------------------
  |  |  |  |  |  |   69|   104k|#define BOCU1_TRAIL_CONTROLS_COUNT  20
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (149:33): [True: 104k, False: 0]
  |  |  ------------------
  ------------------
  383|       |
  384|   104k|            result|=BOCU1_MIN<<24;
  ------------------
  |  |   59|   104k|#define BOCU1_MIN               0x21
  ------------------
  385|   104k|        }
  386|  39.6M|    }
  387|  69.5M|    return result;
  388|  69.5M|}

ucnvhz.cpp:_ZL7_HZOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
   72|    239|_HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
   73|    239|    UConverter *gbConverter;
   74|    239|    if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (74:8): [True: 1, False: 238]
  ------------------
   75|      1|        ucnv_canCreateConverter("GBK", errorCode);  /* errorCode carries result */
  ------------------
  |  |  632|      1|#define ucnv_canCreateConverter U_ICU_ENTRY_POINT_RENAME(ucnv_canCreateConverter)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   76|      1|        return;
   77|      1|    }
   78|    238|    gbConverter = ucnv_open("GBK", errorCode);
  ------------------
  |  |  701|    238|#define ucnv_open U_ICU_ENTRY_POINT_RENAME(ucnv_open)
  |  |  ------------------
  |  |  |  |  123|    238|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    238|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    238|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|    238|    if(U_FAILURE(*errorCode)) {
  ------------------
  |  Branch (79:8): [True: 0, False: 238]
  ------------------
   80|      0|        return;
   81|      0|    }
   82|    238|    cnv->toUnicodeStatus = 0;
   83|    238|    cnv->fromUnicodeStatus= 0;
   84|    238|    cnv->mode=0;
   85|    238|    cnv->fromUChar32=0x0000;
   86|    238|    cnv->extraInfo = uprv_calloc(1, sizeof(UConverterDataHZ));
  ------------------
  |  | 1398|    238|#define uprv_calloc U_ICU_ENTRY_POINT_RENAME(uprv_calloc)
  |  |  ------------------
  |  |  |  |  123|    238|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    238|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    238|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   87|    238|    if(cnv->extraInfo != nullptr){
  ------------------
  |  Branch (87:8): [True: 238, False: 0]
  ------------------
   88|    238|        ((UConverterDataHZ*)cnv->extraInfo)->gbConverter = gbConverter;
   89|    238|    }
   90|      0|    else {
   91|      0|        ucnv_close(gbConverter);
  ------------------
  |  |  639|      0|#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   92|      0|        *errorCode = U_MEMORY_ALLOCATION_ERROR;
   93|      0|        return;
   94|      0|    }
   95|    238|}
ucnvhz.cpp:_ZL8_HZCloseP10UConverter:
   98|    238|_HZClose(UConverter *cnv){
   99|    238|    if(cnv->extraInfo != nullptr) {
  ------------------
  |  Branch (99:8): [True: 238, False: 0]
  ------------------
  100|    238|        ucnv_close (((UConverterDataHZ *) (cnv->extraInfo))->gbConverter);
  ------------------
  |  |  639|    238|#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
  |  |  ------------------
  |  |  |  |  123|    238|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    238|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    238|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  101|    238|        if(!cnv->isExtraLocal) {
  ------------------
  |  Branch (101:12): [True: 238, False: 0]
  ------------------
  102|    238|            uprv_free(cnv->extraInfo);
  ------------------
  |  | 1503|    238|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|    238|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    238|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    238|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|    238|        }
  104|    238|        cnv->extraInfo = nullptr;
  105|    238|    }
  106|    238|}
ucnvhz.cpp:_ZL8_HZResetP10UConverter21UConverterResetChoice:
  109|    474|_HZReset(UConverter *cnv, UConverterResetChoice choice){
  110|    474|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (110:8): [True: 0, False: 474]
  ------------------
  111|      0|        cnv->toUnicodeStatus = 0;
  112|      0|        cnv->mode=0;
  113|      0|        if(cnv->extraInfo != nullptr){
  ------------------
  |  Branch (113:12): [True: 0, False: 0]
  ------------------
  114|      0|            ((UConverterDataHZ*)cnv->extraInfo)->isStateDBCS = false;
  115|      0|            ((UConverterDataHZ*)cnv->extraInfo)->isEmptySegment = false;
  116|      0|        }
  117|      0|    }
  118|    474|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (118:8): [True: 474, False: 0]
  ------------------
  119|    474|        cnv->fromUnicodeStatus= 0;
  120|    474|        cnv->fromUChar32=0x0000; 
  121|    474|        if(cnv->extraInfo != nullptr){
  ------------------
  |  Branch (121:12): [True: 474, False: 0]
  ------------------
  122|    474|            ((UConverterDataHZ*)cnv->extraInfo)->isEscapeAppended = false;
  123|    474|            ((UConverterDataHZ*)cnv->extraInfo)->targetIndex = 0;
  124|    474|            ((UConverterDataHZ*)cnv->extraInfo)->sourceIndex = 0;
  125|    474|            ((UConverterDataHZ*)cnv->extraInfo)->isTargetUCharDBCS = false;
  126|    474|        }
  127|    474|    }
  128|    474|}
ucnvhz.cpp:_ZL39UConverter_fromUnicode_HZ_OFFSETS_LOGICP25UConverterFromUnicodeArgsP10UErrorCode:
  337|  8.41M|                                                      UErrorCode * err){
  338|  8.41M|    const char16_t *mySource = args->source;
  339|  8.41M|    char *myTarget = args->target;
  340|  8.41M|    int32_t* offsets = args->offsets;
  341|  8.41M|    int32_t mySourceIndex = 0;
  342|  8.41M|    int32_t myTargetIndex = 0;
  343|  8.41M|    int32_t targetLength = (int32_t)(args->targetLimit - myTarget);
  344|  8.41M|    int32_t mySourceLength = (int32_t)(args->sourceLimit - args->source);
  345|  8.41M|    uint32_t targetUniChar = 0x0000;
  346|  8.41M|    UChar32 mySourceChar = 0x0000;
  347|  8.41M|    UConverterDataHZ *myConverterData=(UConverterDataHZ*)args->converter->extraInfo;
  348|  8.41M|    UBool isTargetUCharDBCS = myConverterData->isTargetUCharDBCS;
  349|  8.41M|    UBool oldIsTargetUCharDBCS;
  350|  8.41M|    int len =0;
  351|  8.41M|    const char* escSeq=nullptr;
  352|       |    
  353|       |    /* Calling code already handles this situation. */
  354|       |    /*if ((args->converter == nullptr) || (args->targetLimit < myTarget) || (args->sourceLimit < args->source)){
  355|       |        *err = U_ILLEGAL_ARGUMENT_ERROR;
  356|       |        return;
  357|       |    }*/
  358|  8.41M|    if(args->converter->fromUChar32!=0 && myTargetIndex < targetLength) {
  ------------------
  |  Branch (358:8): [True: 0, False: 8.41M]
  |  Branch (358:43): [True: 0, False: 0]
  ------------------
  359|      0|        goto getTrail;
  360|      0|    }
  361|       |    /*writing the char to the output stream */
  362|  21.6M|    while (mySourceIndex < mySourceLength){
  ------------------
  |  Branch (362:12): [True: 21.6M, False: 237]
  ------------------
  363|  21.6M|        targetUniChar = missingCharMarker;
  ------------------
  |  |   34|  21.6M|#define missingCharMarker 0xFFFF
  ------------------
  364|  21.6M|        if (myTargetIndex < targetLength){
  ------------------
  |  Branch (364:13): [True: 21.6M, False: 2.18k]
  ------------------
  365|       |            
  366|  21.6M|            mySourceChar = mySource[mySourceIndex++];
  367|       |            
  368|       |
  369|  21.6M|            oldIsTargetUCharDBCS = isTargetUCharDBCS;
  370|  21.6M|            if(mySourceChar ==UCNV_TILDE){
  ------------------
  |  |   32|  21.6M|#define UCNV_TILDE 0x7E          /* ~ */
  ------------------
  |  Branch (370:16): [True: 25.2k, False: 21.6M]
  ------------------
  371|       |                /*concatEscape(args, &myTargetIndex, &targetLength,"\x7E\x7E",err,2,&mySourceIndex);*/
  372|  25.2k|                len = ESC_LEN;
  ------------------
  |  |   38|  25.2k|#define ESC_LEN       2
  ------------------
  373|  25.2k|                escSeq = TILDE_ESCAPE;
  ------------------
  |  |   37|  25.2k|#define TILDE_ESCAPE "\x7E\x7E"
  ------------------
  374|  25.2k|                CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex);
  ------------------
  |  |   41|  25.2k|#define CONCAT_ESCAPE_MACRO(args, targetIndex,targetLength,strToAppend, err, len,sourceIndex) UPRV_BLOCK_MACRO_BEGIN {      \
  |  |  ------------------
  |  |  |  |  169|  25.2k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   42|  75.7k|    while(len-->0){                                                                                                         \
  |  |  ------------------
  |  |  |  Branch (42:11): [True: 50.5k, False: 25.2k]
  |  |  ------------------
  |  |   43|  50.5k|        if(targetIndex < targetLength){                                                                                     \
  |  |  ------------------
  |  |  |  Branch (43:12): [True: 50.4k, False: 36]
  |  |  ------------------
  |  |   44|  50.4k|            args->target[targetIndex] = (unsigned char) *strToAppend;                                                       \
  |  |   45|  50.4k|            if(args->offsets!=nullptr){                                                                                        \
  |  |  ------------------
  |  |  |  Branch (45:16): [True: 0, False: 50.4k]
  |  |  ------------------
  |  |   46|      0|                *(offsets++) = sourceIndex-1;                                                                               \
  |  |   47|      0|            }                                                                                                               \
  |  |   48|  50.4k|            targetIndex++;                                                                                                  \
  |  |   49|  50.4k|        }                                                                                                                   \
  |  |   50|  50.5k|        else{                                                                                                               \
  |  |   51|     36|            args->converter->charErrorBuffer[(int)args->converter->charErrorBufferLength++] = (unsigned char) *strToAppend; \
  |  |   52|     36|            *err =U_BUFFER_OVERFLOW_ERROR;                                                                                  \
  |  |   53|     36|        }                                                                                                                   \
  |  |   54|  50.5k|        strToAppend++;                                                                                                      \
  |  |   55|  50.5k|    }                                                                                                                       \
  |  |   56|  25.2k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  25.2k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  375|  25.2k|                continue;
  376|  21.6M|            } else if(mySourceChar <= 0x7f) {
  ------------------
  |  Branch (376:23): [True: 3.05M, False: 18.6M]
  ------------------
  377|  3.05M|                targetUniChar = mySourceChar;
  378|  18.6M|            } else {
  379|  18.6M|                int32_t length= ucnv_MBCSFromUChar32(myConverterData->gbConverter->sharedData,
  ------------------
  |  |  622|  18.6M|#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
  |  |  ------------------
  |  |  |  |  123|  18.6M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  18.6M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  18.6M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  380|  18.6M|                    mySourceChar,&targetUniChar,args->converter->useFallback);
  381|       |                /* we can only use lead bytes 21..7D and trail bytes 21..7E */
  382|  18.6M|                if( length == 2 &&
  ------------------
  |  Branch (382:21): [True: 18.5M, False: 91.7k]
  ------------------
  383|  18.6M|                    (uint16_t)(targetUniChar - 0xa1a1) <= (0xfdfe - 0xa1a1) &&
  ------------------
  |  Branch (383:21): [True: 10.3M, False: 8.18M]
  ------------------
  384|  18.6M|                    (uint8_t)(targetUniChar - 0xa1) <= (0xfe - 0xa1)
  ------------------
  |  Branch (384:21): [True: 10.1M, False: 138k]
  ------------------
  385|  18.6M|                ) {
  386|  10.1M|                    targetUniChar -= 0x8080;
  387|  10.1M|                } else {
  388|  8.41M|                    targetUniChar = missingCharMarker;
  ------------------
  |  |   34|  8.41M|#define missingCharMarker 0xFFFF
  ------------------
  389|  8.41M|                }
  390|  18.6M|            }
  391|  21.6M|            if (targetUniChar != missingCharMarker){
  ------------------
  |  |   34|  21.6M|#define missingCharMarker 0xFFFF
  ------------------
  |  Branch (391:17): [True: 13.2M, False: 8.41M]
  ------------------
  392|  13.2M|               myConverterData->isTargetUCharDBCS = isTargetUCharDBCS = targetUniChar > 0x00FF;
  393|  13.2M|                 if(oldIsTargetUCharDBCS != isTargetUCharDBCS || !myConverterData->isEscapeAppended ){
  ------------------
  |  Branch (393:21): [True: 12.1M, False: 1.14M]
  |  Branch (393:66): [True: 105, False: 1.14M]
  ------------------
  394|       |                    /*Shifting from a double byte to single byte mode*/
  395|  12.1M|                    if(!isTargetUCharDBCS){
  ------------------
  |  Branch (395:24): [True: 1.92M, False: 10.1M]
  ------------------
  396|  1.92M|                        len =ESC_LEN;
  ------------------
  |  |   38|  1.92M|#define ESC_LEN       2
  ------------------
  397|  1.92M|                        escSeq = SB_ESCAPE;
  ------------------
  |  |   35|  1.92M|#define SB_ESCAPE    "\x7E\x7D"
  ------------------
  398|  1.92M|                        CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex);
  ------------------
  |  |   41|  1.92M|#define CONCAT_ESCAPE_MACRO(args, targetIndex,targetLength,strToAppend, err, len,sourceIndex) UPRV_BLOCK_MACRO_BEGIN {      \
  |  |  ------------------
  |  |  |  |  169|  1.92M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   42|  5.77M|    while(len-->0){                                                                                                         \
  |  |  ------------------
  |  |  |  Branch (42:11): [True: 3.85M, False: 1.92M]
  |  |  ------------------
  |  |   43|  3.85M|        if(targetIndex < targetLength){                                                                                     \
  |  |  ------------------
  |  |  |  Branch (43:12): [True: 3.85M, False: 259]
  |  |  ------------------
  |  |   44|  3.85M|            args->target[targetIndex] = (unsigned char) *strToAppend;                                                       \
  |  |   45|  3.85M|            if(args->offsets!=nullptr){                                                                                        \
  |  |  ------------------
  |  |  |  Branch (45:16): [True: 0, False: 3.85M]
  |  |  ------------------
  |  |   46|      0|                *(offsets++) = sourceIndex-1;                                                                               \
  |  |   47|      0|            }                                                                                                               \
  |  |   48|  3.85M|            targetIndex++;                                                                                                  \
  |  |   49|  3.85M|        }                                                                                                                   \
  |  |   50|  3.85M|        else{                                                                                                               \
  |  |   51|    259|            args->converter->charErrorBuffer[(int)args->converter->charErrorBufferLength++] = (unsigned char) *strToAppend; \
  |  |   52|    259|            *err =U_BUFFER_OVERFLOW_ERROR;                                                                                  \
  |  |   53|    259|        }                                                                                                                   \
  |  |   54|  3.85M|        strToAppend++;                                                                                                      \
  |  |   55|  3.85M|    }                                                                                                                       \
  |  |   56|  1.92M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  1.92M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|  1.92M|                        myConverterData->isEscapeAppended = true;
  400|  1.92M|                    }
  401|  10.1M|                    else{ /* Shifting from a single byte to double byte mode*/
  402|  10.1M|                        len =ESC_LEN;
  ------------------
  |  |   38|  10.1M|#define ESC_LEN       2
  ------------------
  403|  10.1M|                        escSeq = DB_ESCAPE;
  ------------------
  |  |   36|  10.1M|#define DB_ESCAPE    "\x7E\x7B"
  ------------------
  404|  10.1M|                        CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex);
  ------------------
  |  |   41|  10.1M|#define CONCAT_ESCAPE_MACRO(args, targetIndex,targetLength,strToAppend, err, len,sourceIndex) UPRV_BLOCK_MACRO_BEGIN {      \
  |  |  ------------------
  |  |  |  |  169|  10.1M|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   42|  30.5M|    while(len-->0){                                                                                                         \
  |  |  ------------------
  |  |  |  Branch (42:11): [True: 20.3M, False: 10.1M]
  |  |  ------------------
  |  |   43|  20.3M|        if(targetIndex < targetLength){                                                                                     \
  |  |  ------------------
  |  |  |  Branch (43:12): [True: 20.3M, False: 368]
  |  |  ------------------
  |  |   44|  20.3M|            args->target[targetIndex] = (unsigned char) *strToAppend;                                                       \
  |  |   45|  20.3M|            if(args->offsets!=nullptr){                                                                                        \
  |  |  ------------------
  |  |  |  Branch (45:16): [True: 0, False: 20.3M]
  |  |  ------------------
  |  |   46|      0|                *(offsets++) = sourceIndex-1;                                                                               \
  |  |   47|      0|            }                                                                                                               \
  |  |   48|  20.3M|            targetIndex++;                                                                                                  \
  |  |   49|  20.3M|        }                                                                                                                   \
  |  |   50|  20.3M|        else{                                                                                                               \
  |  |   51|    368|            args->converter->charErrorBuffer[(int)args->converter->charErrorBufferLength++] = (unsigned char) *strToAppend; \
  |  |   52|    368|            *err =U_BUFFER_OVERFLOW_ERROR;                                                                                  \
  |  |   53|    368|        }                                                                                                                   \
  |  |   54|  20.3M|        strToAppend++;                                                                                                      \
  |  |   55|  20.3M|    }                                                                                                                       \
  |  |   56|  10.1M|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  10.1M|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  405|  10.1M|                        myConverterData->isEscapeAppended = true;
  406|       |                        
  407|  10.1M|                    }
  408|  12.1M|                }
  409|       |            
  410|  13.2M|                if(isTargetUCharDBCS){
  ------------------
  |  Branch (410:20): [True: 10.1M, False: 3.05M]
  ------------------
  411|  10.1M|                    if( myTargetIndex <targetLength){
  ------------------
  |  Branch (411:25): [True: 10.1M, False: 703]
  ------------------
  412|  10.1M|                        myTarget[myTargetIndex++] =(char) (targetUniChar >> 8);
  413|  10.1M|                        if(offsets){
  ------------------
  |  Branch (413:28): [True: 0, False: 10.1M]
  ------------------
  414|      0|                            *(offsets++) = mySourceIndex-1;
  415|      0|                        }
  416|  10.1M|                        if(myTargetIndex < targetLength){
  ------------------
  |  Branch (416:28): [True: 10.1M, False: 340]
  ------------------
  417|  10.1M|                            myTarget[myTargetIndex++] =(char) targetUniChar;
  418|  10.1M|                            if(offsets){
  ------------------
  |  Branch (418:32): [True: 0, False: 10.1M]
  ------------------
  419|      0|                                *(offsets++) = mySourceIndex-1;
  420|      0|                            }
  421|  10.1M|                        }else{
  422|    340|                            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (char) targetUniChar;
  423|    340|                            *err = U_BUFFER_OVERFLOW_ERROR;
  424|    340|                        } 
  425|  10.1M|                    }else{
  426|    703|                        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =(char) (targetUniChar >> 8);
  427|    703|                        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (char) targetUniChar;
  428|    703|                        *err = U_BUFFER_OVERFLOW_ERROR;
  429|    703|                    }
  430|       |
  431|  10.1M|                }else{
  432|  3.05M|                    if( myTargetIndex <targetLength){
  ------------------
  |  Branch (432:25): [True: 3.05M, False: 500]
  ------------------
  433|  3.05M|                        myTarget[myTargetIndex++] = (char) (targetUniChar );
  434|  3.05M|                        if(offsets){
  ------------------
  |  Branch (434:28): [True: 0, False: 3.05M]
  ------------------
  435|      0|                            *(offsets++) = mySourceIndex-1;
  436|      0|                        }
  437|       |                        
  438|  3.05M|                    }else{
  439|    500|                        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (char) targetUniChar;
  440|    500|                        *err = U_BUFFER_OVERFLOW_ERROR;
  441|    500|                    }
  442|  3.05M|                }
  443|       |
  444|  13.2M|            }
  445|  8.41M|            else{
  446|       |                /* oops.. the code point is unassigned */
  447|       |                /*Handle surrogates */
  448|       |                /*check if the char is a First surrogate*/
  449|  8.41M|                if(U16_IS_SURROGATE(mySourceChar)) {
  ------------------
  |  |   75|  8.41M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  8.41M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 1.76k, False: 8.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  450|  1.76k|                    if(U16_IS_SURROGATE_LEAD(mySourceChar)) {
  ------------------
  |  |   84|  1.76k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 1.05k, False: 711]
  |  |  ------------------
  ------------------
  451|  1.05k|                        args->converter->fromUChar32=mySourceChar;
  452|  1.05k|getTrail:
  453|       |                        /*look ahead to find the trail surrogate*/
  454|  1.05k|                        if(mySourceIndex <  mySourceLength) {
  ------------------
  |  Branch (454:28): [True: 1.04k, False: 10]
  ------------------
  455|       |                            /* test the following code unit */
  456|  1.04k|                            char16_t trail=(char16_t) args->source[mySourceIndex];
  457|  1.04k|                            if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  1.04k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 514, False: 526]
  |  |  ------------------
  ------------------
  458|    514|                                ++mySourceIndex;
  459|    514|                                mySourceChar=U16_GET_SUPPLEMENTARY(args->converter->fromUChar32, trail);
  ------------------
  |  |  113|    514|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    514|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
  460|    514|                                args->converter->fromUChar32=0x00;
  461|       |                                /* there are no surrogates in GB2312*/
  462|    514|                                *err = U_INVALID_CHAR_FOUND;
  463|       |                                /* exit this condition tree */
  464|    526|                            } else {
  465|       |                                /* this is an unmatched lead code unit (1st surrogate) */
  466|       |                                /* callback(illegal) */
  467|    526|                                *err=U_ILLEGAL_CHAR_FOUND;
  468|    526|                            }
  469|  1.04k|                        } else {
  470|       |                            /* no more input */
  471|     10|                            *err = U_ZERO_ERROR;
  472|     10|                        }
  473|  1.05k|                    } else {
  474|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
  475|       |                        /* callback(illegal) */
  476|    711|                        *err=U_ILLEGAL_CHAR_FOUND;
  477|    711|                    }
  478|  8.41M|                } else {
  479|       |                    /* callback(unassigned) for a BMP code point */
  480|  8.41M|                    *err = U_INVALID_CHAR_FOUND;
  481|  8.41M|                }
  482|       |
  483|  8.41M|                args->converter->fromUChar32=mySourceChar;
  484|  8.41M|                break;
  485|  8.41M|            }
  486|  21.6M|        }
  487|  2.18k|        else{
  488|  2.18k|            *err = U_BUFFER_OVERFLOW_ERROR;
  489|  2.18k|            break;
  490|  2.18k|        }
  491|  13.2M|        targetUniChar=missingCharMarker;
  ------------------
  |  |   34|  13.2M|#define missingCharMarker 0xFFFF
  ------------------
  492|  13.2M|    }
  493|       |
  494|  8.41M|    args->target += myTargetIndex;
  495|  8.41M|    args->source += mySourceIndex;
  496|  8.41M|    myConverterData->isTargetUCharDBCS = isTargetUCharDBCS;
  497|  8.41M|}
ucnvhz.cpp:_ZL12_HZ_WriteSubP25UConverterFromUnicodeArgsiP10UErrorCode:
  500|  8.41M|_HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err) {
  501|  8.41M|    UConverter *cnv = args->converter;
  502|  8.41M|    UConverterDataHZ *convData=(UConverterDataHZ *) cnv->extraInfo;
  503|  8.41M|    char *p;
  504|  8.41M|    char buffer[4];
  505|  8.41M|    p = buffer;
  506|       |    
  507|  8.41M|    if( convData->isTargetUCharDBCS){
  ------------------
  |  Branch (507:9): [True: 8.25M, False: 158k]
  ------------------
  508|  8.25M|        *p++= UCNV_TILDE;
  ------------------
  |  |   32|  8.25M|#define UCNV_TILDE 0x7E          /* ~ */
  ------------------
  509|  8.25M|        *p++= UCNV_CLOSE_BRACE;
  ------------------
  |  |   34|  8.25M|#define UCNV_CLOSE_BRACE 0x7D   /* } */
  ------------------
  510|  8.25M|        convData->isTargetUCharDBCS=false;
  511|  8.25M|    }
  512|  8.41M|    *p++= (char)cnv->subChars[0];
  513|       |
  514|  8.41M|    ucnv_cbFromUWriteBytes(args,
  ------------------
  |  |  633|  8.41M|#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  8.41M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  8.41M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  8.41M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|  8.41M|                           buffer, (int32_t)(p - buffer),
  516|  8.41M|                           offsetIndex, err);
  517|  8.41M|}

ucnvisci.cpp:_ZL10_ISCIIOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
  191|    256|_ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
  192|    256|    if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (192:8): [True: 9, False: 247]
  ------------------
  193|      9|        return;
  194|      9|    }
  195|       |
  196|    247|    cnv->extraInfo = uprv_malloc(sizeof(UConverterDataISCII));
  ------------------
  |  | 1524|    247|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|    247|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    247|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    247|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|       |
  198|    247|    if (cnv->extraInfo != nullptr) {
  ------------------
  |  Branch (198:9): [True: 247, False: 0]
  ------------------
  199|    247|        int32_t len=0;
  200|    247|        UConverterDataISCII *converterData=
  201|    247|                (UConverterDataISCII *) cnv->extraInfo;
  202|    247|        converterData->contextCharToUnicode=NO_CHAR_MARKER;
  ------------------
  |  |   54|    247|#define NO_CHAR_MARKER      0xFFFE
  ------------------
  203|    247|        cnv->toUnicodeStatus = missingCharMarker;
  ------------------
  |  |   34|    247|#define missingCharMarker 0xFFFF
  ------------------
  204|    247|        converterData->contextCharFromUnicode=0x0000;
  205|    247|        converterData->resetToDefaultToUnicode=false;
  206|       |        /* check if the version requested is supported */
  207|    247|        if ((pArgs->options & UCNV_OPTIONS_VERSION_MASK) < 9) {
  ------------------
  |  |   33|    247|#define UCNV_OPTIONS_VERSION_MASK 0xf
  ------------------
  |  Branch (207:13): [True: 247, False: 0]
  ------------------
  208|       |            /* initialize state variables */
  209|    247|            converterData->currentDeltaFromUnicode
  210|    247|                    = converterData->currentDeltaToUnicode
  211|    247|                            = converterData->defDeltaToUnicode = (uint16_t)(lookupInitialData[pArgs->options & UCNV_OPTIONS_VERSION_MASK].uniLang * DELTA);
  ------------------
  |  |   33|    247|#define UCNV_OPTIONS_VERSION_MASK 0xf
  ------------------
  212|       |
  213|    247|            converterData->currentMaskFromUnicode
  214|    247|                    = converterData->currentMaskToUnicode
  215|    247|                            = converterData->defMaskToUnicode = lookupInitialData[pArgs->options & UCNV_OPTIONS_VERSION_MASK].maskEnum;
  ------------------
  |  |   33|    247|#define UCNV_OPTIONS_VERSION_MASK 0xf
  ------------------
  216|       |            
  217|    247|            converterData->isFirstBuffer=true;
  218|    247|            (void)uprv_strcpy(converterData->name, ISCII_CNV_PREFIX);
  ------------------
  |  |   36|    247|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|    247|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  219|    247|            len = (int32_t)uprv_strlen(converterData->name);
  ------------------
  |  |   37|    247|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|    247|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  220|    247|            converterData->name[len]= (char)((pArgs->options & UCNV_OPTIONS_VERSION_MASK) + '0');
  ------------------
  |  |   33|    247|#define UCNV_OPTIONS_VERSION_MASK 0xf
  ------------------
  221|    247|            converterData->name[len+1]=0;
  222|       |            
  223|    247|            converterData->prevToUnicodeStatus = 0x0000;
  224|    247|        } else {
  225|      0|            uprv_free(cnv->extraInfo);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  226|      0|            cnv->extraInfo = nullptr;
  227|      0|            *errorCode = U_ILLEGAL_ARGUMENT_ERROR;
  228|      0|        }
  229|       |
  230|    247|    } else {
  231|      0|        *errorCode =U_MEMORY_ALLOCATION_ERROR;
  232|      0|    }
  233|    247|}
ucnvisci.cpp:_ZL11_ISCIICloseP10UConverter:
  236|    247|_ISCIIClose(UConverter *cnv) {
  237|    247|    if (cnv->extraInfo!=nullptr) {
  ------------------
  |  Branch (237:9): [True: 247, False: 0]
  ------------------
  238|    247|        if (!cnv->isExtraLocal) {
  ------------------
  |  Branch (238:13): [True: 247, False: 0]
  ------------------
  239|    247|            uprv_free(cnv->extraInfo);
  ------------------
  |  | 1503|    247|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|    247|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    247|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    247|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  240|    247|        }
  241|    247|        cnv->extraInfo=nullptr;
  242|    247|    }
  243|    247|}
ucnvisci.cpp:_ZL11_ISCIIResetP10UConverter21UConverterResetChoice:
  255|    486|_ISCIIReset(UConverter *cnv, UConverterResetChoice choice) {
  256|    486|    UConverterDataISCII* data =(UConverterDataISCII *) (cnv->extraInfo);
  257|    486|    if (choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (257:9): [True: 0, False: 486]
  ------------------
  258|      0|        cnv->toUnicodeStatus = missingCharMarker;
  ------------------
  |  |   34|      0|#define missingCharMarker 0xFFFF
  ------------------
  259|      0|        cnv->mode=0;
  260|      0|        data->currentDeltaToUnicode=data->defDeltaToUnicode;
  261|      0|        data->currentMaskToUnicode = data->defMaskToUnicode;
  262|      0|        data->contextCharToUnicode=NO_CHAR_MARKER;
  ------------------
  |  |   54|      0|#define NO_CHAR_MARKER      0xFFFE
  ------------------
  263|      0|        data->prevToUnicodeStatus = 0x0000;
  264|      0|    }
  265|    486|    if (choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (265:9): [True: 486, False: 0]
  ------------------
  266|    486|        cnv->fromUChar32=0x0000;
  267|    486|        data->contextCharFromUnicode=0x00;
  268|    486|        data->currentMaskFromUnicode=data->defMaskToUnicode;
  269|    486|        data->currentDeltaFromUnicode=data->defDeltaToUnicode;
  270|    486|        data->isFirstBuffer=true;
  271|    486|        data->resetToDefaultToUnicode=false;
  272|    486|    }
  273|    486|}
ucnvisci.cpp:_ZL14isPNJConsonanti:
  173|    660|isPNJConsonant(UChar32 c) {
  174|    660|    if (c < 0xa00 || 0xa50 <= c) {
  ------------------
  |  Branch (174:9): [True: 200, False: 460]
  |  Branch (174:22): [True: 263, False: 197]
  ------------------
  175|    463|        return false;
  176|    463|    } else {
  177|    197|        return pnjMap[c - 0xa00] & 1;
  178|    197|    }
  179|    660|}
ucnvisci.cpp:_ZL42UConverter_fromUnicode_ISCII_OFFSETS_LOGICP25UConverterFromUnicodeArgsP10UErrorCode:
  897|  5.40M|        UConverterFromUnicodeArgs * args, UErrorCode * err) {
  898|  5.40M|    const char16_t *source = args->source;
  899|  5.40M|    const char16_t *sourceLimit = args->sourceLimit;
  900|  5.40M|    unsigned char *target = (unsigned char *) args->target;
  901|  5.40M|    unsigned char *targetLimit = (unsigned char *) args->targetLimit;
  902|  5.40M|    int32_t* offsets = args->offsets;
  903|  5.40M|    uint32_t targetByteUnit = 0x0000;
  904|  5.40M|    UChar32 sourceChar = 0x0000;
  905|  5.40M|    UChar32 tempContextFromUnicode = 0x0000;    /* For special handling of the Gurmukhi script. */
  906|  5.40M|    UConverterDataISCII *converterData;
  907|  5.40M|    uint16_t newDelta=0;
  908|  5.40M|    uint16_t range = 0;
  909|  5.40M|    UBool deltaChanged = false;
  910|       |
  911|  5.40M|    if ((args->converter == nullptr) || (args->targetLimit < args->target) || (args->sourceLimit < args->source)) {
  ------------------
  |  Branch (911:9): [True: 0, False: 5.40M]
  |  Branch (911:41): [True: 0, False: 5.40M]
  |  Branch (911:79): [True: 0, False: 5.40M]
  ------------------
  912|      0|        *err = U_ILLEGAL_ARGUMENT_ERROR;
  913|      0|        return;
  914|      0|    }
  915|       |    /* initialize data */
  916|  5.40M|    converterData=(UConverterDataISCII*)args->converter->extraInfo;
  917|  5.40M|    newDelta=converterData->currentDeltaFromUnicode;
  918|  5.40M|    range = (uint16_t)(newDelta/DELTA);
  919|       |
  920|  5.40M|    if ((sourceChar = args->converter->fromUChar32)!=0) {
  ------------------
  |  Branch (920:9): [True: 0, False: 5.40M]
  ------------------
  921|      0|        goto getTrail;
  922|      0|    }
  923|       |
  924|       |    /*writing the char to the output stream */
  925|  6.31M|    while (source < sourceLimit) {
  ------------------
  |  Branch (925:12): [True: 6.31M, False: 243]
  ------------------
  926|       |        /* Write the language code following LF only if LF is not the last character. */
  927|  6.31M|        if (args->converter->fromUnicodeStatus == LF) {
  ------------------
  |  |   52|  6.31M|#define LF                  0x0A
  ------------------
  |  Branch (927:13): [True: 276, False: 6.31M]
  ------------------
  928|    276|            targetByteUnit = ATR<<8;
  ------------------
  |  |   39|    276|#define ATR                 0xEF   /* Attribute code */
  ------------------
  929|    276|            targetByteUnit += (uint8_t) lookupInitialData[range].isciiLang;
  930|    276|            args->converter->fromUnicodeStatus = 0x0000;
  931|       |            /* now append ATR and language code */
  932|    276|            WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err);
  ------------------
  |  |  834|    276|#define WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    276|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  835|    276|    int32_t offset = (int32_t)(source - args->source-1);                                        \
  |  |  836|    276|      /* write the targetUniChar  to target */                                                  \
  |  |  837|    276|    if(target < targetLimit){                                                                   \
  |  |  ------------------
  |  |  |  Branch (837:8): [True: 276, False: 0]
  |  |  ------------------
  |  |  838|    276|        if(targetByteUnit <= 0xFF){                                                             \
  |  |  ------------------
  |  |  |  Branch (838:12): [True: 0, False: 276]
  |  |  ------------------
  |  |  839|      0|            *(target)++ = (uint8_t)(targetByteUnit);                                            \
  |  |  840|      0|            if(offsets){                                                                        \
  |  |  ------------------
  |  |  |  Branch (840:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  841|      0|                *(offsets++) = offset;                                                          \
  |  |  842|      0|            }                                                                                   \
  |  |  843|    276|        }else{                                                                                  \
  |  |  844|    276|            if (targetByteUnit > 0xFFFF) {                                                      \
  |  |  ------------------
  |  |  |  Branch (844:17): [True: 0, False: 276]
  |  |  ------------------
  |  |  845|      0|                *(target)++ = (uint8_t)(targetByteUnit>>16);                                    \
  |  |  846|      0|                if (offsets) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (846:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  847|      0|                    --offset;                                                                   \
  |  |  848|      0|                    *(offsets++) = offset;                                                      \
  |  |  849|      0|                }                                                                               \
  |  |  850|      0|            }                                                                                   \
  |  |  851|    276|            if (!(target < targetLimit)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (851:17): [True: 0, False: 276]
  |  |  ------------------
  |  |  852|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  853|      0|                                (uint8_t)(targetByteUnit >> 8);                                 \
  |  |  854|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  855|      0|                                (uint8_t)targetByteUnit;                                        \
  |  |  856|      0|                *err = U_BUFFER_OVERFLOW_ERROR;                                                 \
  |  |  857|    276|            } else {                                                                            \
  |  |  858|    276|                *(target)++ = (uint8_t)(targetByteUnit>>8);                                     \
  |  |  859|    276|                if(offsets){                                                                    \
  |  |  ------------------
  |  |  |  Branch (859:20): [True: 0, False: 276]
  |  |  ------------------
  |  |  860|      0|                    *(offsets++) = offset;                                                      \
  |  |  861|      0|                }                                                                               \
  |  |  862|    276|                if(target < targetLimit){                                                       \
  |  |  ------------------
  |  |  |  Branch (862:20): [True: 276, False: 0]
  |  |  ------------------
  |  |  863|    276|                    *(target)++ = (uint8_t)  targetByteUnit;                                    \
  |  |  864|    276|                    if(offsets){                                                                \
  |  |  ------------------
  |  |  |  Branch (864:24): [True: 0, False: 276]
  |  |  ------------------
  |  |  865|      0|                        *(offsets++) = offset                            ;                      \
  |  |  866|      0|                    }                                                                           \
  |  |  867|    276|                }else{                                                                          \
  |  |  868|      0|                    args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =\
  |  |  869|      0|                                (uint8_t) (targetByteUnit);                                     \
  |  |  870|      0|                    *err = U_BUFFER_OVERFLOW_ERROR;                                             \
  |  |  871|      0|                }                                                                               \
  |  |  872|    276|            }                                                                                   \
  |  |  873|    276|        }                                                                                       \
  |  |  874|    276|    }else{                                                                                      \
  |  |  875|      0|        if (targetByteUnit & 0xFF0000) {                                                        \
  |  |  ------------------
  |  |  |  Branch (875:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  876|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  877|      0|                        (uint8_t) (targetByteUnit >>16);                                        \
  |  |  878|      0|        }                                                                                       \
  |  |  879|      0|        if(targetByteUnit & 0xFF00){                                                            \
  |  |  ------------------
  |  |  |  Branch (879:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  880|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  881|      0|                        (uint8_t) (targetByteUnit >>8);                                         \
  |  |  882|      0|        }                                                                                       \
  |  |  883|      0|        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =            \
  |  |  884|      0|                        (uint8_t) (targetByteUnit);                                             \
  |  |  885|      0|        *err = U_BUFFER_OVERFLOW_ERROR;                                                         \
  |  |  886|      0|    }                                                                                           \
  |  |  887|    276|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    276|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  933|    276|            if (U_FAILURE(*err)) {
  ------------------
  |  Branch (933:17): [True: 0, False: 276]
  ------------------
  934|      0|                break;
  935|      0|            }
  936|    276|        }
  937|       |        
  938|  6.31M|        sourceChar = *source++;
  939|  6.31M|        tempContextFromUnicode = converterData->contextCharFromUnicode;
  940|       |        
  941|  6.31M|        targetByteUnit = missingCharMarker;
  ------------------
  |  |   34|  6.31M|#define missingCharMarker 0xFFFF
  ------------------
  942|       |        
  943|       |        /*check if input is in ASCII and C0 control codes range*/
  944|  6.31M|        if (sourceChar <= ASCII_END) {
  ------------------
  |  |   53|  6.31M|#define ASCII_END           0xA0
  ------------------
  |  Branch (944:13): [True: 854k, False: 5.45M]
  ------------------
  945|   854k|            args->converter->fromUnicodeStatus = sourceChar;
  946|   854k|            WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,sourceChar,err);
  ------------------
  |  |  834|   854k|#define WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|   854k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  835|   854k|    int32_t offset = (int32_t)(source - args->source-1);                                        \
  |  |  836|   854k|      /* write the targetUniChar  to target */                                                  \
  |  |  837|   854k|    if(target < targetLimit){                                                                   \
  |  |  ------------------
  |  |  |  Branch (837:8): [True: 854k, False: 0]
  |  |  ------------------
  |  |  838|   854k|        if(targetByteUnit <= 0xFF){                                                             \
  |  |  ------------------
  |  |  |  Branch (838:12): [True: 854k, False: 0]
  |  |  ------------------
  |  |  839|   854k|            *(target)++ = (uint8_t)(targetByteUnit);                                            \
  |  |  840|   854k|            if(offsets){                                                                        \
  |  |  ------------------
  |  |  |  Branch (840:16): [True: 0, False: 854k]
  |  |  ------------------
  |  |  841|      0|                *(offsets++) = offset;                                                          \
  |  |  842|      0|            }                                                                                   \
  |  |  843|   854k|        }else{                                                                                  \
  |  |  844|      0|            if (targetByteUnit > 0xFFFF) {                                                      \
  |  |  ------------------
  |  |  |  Branch (844:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  845|      0|                *(target)++ = (uint8_t)(targetByteUnit>>16);                                    \
  |  |  846|      0|                if (offsets) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (846:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  847|      0|                    --offset;                                                                   \
  |  |  848|      0|                    *(offsets++) = offset;                                                      \
  |  |  849|      0|                }                                                                               \
  |  |  850|      0|            }                                                                                   \
  |  |  851|      0|            if (!(target < targetLimit)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (851:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  852|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  853|      0|                                (uint8_t)(targetByteUnit >> 8);                                 \
  |  |  854|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  855|      0|                                (uint8_t)targetByteUnit;                                        \
  |  |  856|      0|                *err = U_BUFFER_OVERFLOW_ERROR;                                                 \
  |  |  857|      0|            } else {                                                                            \
  |  |  858|      0|                *(target)++ = (uint8_t)(targetByteUnit>>8);                                     \
  |  |  859|      0|                if(offsets){                                                                    \
  |  |  ------------------
  |  |  |  Branch (859:20): [True: 0, False: 0]
  |  |  ------------------
  |  |  860|      0|                    *(offsets++) = offset;                                                      \
  |  |  861|      0|                }                                                                               \
  |  |  862|      0|                if(target < targetLimit){                                                       \
  |  |  ------------------
  |  |  |  Branch (862:20): [True: 0, False: 0]
  |  |  ------------------
  |  |  863|      0|                    *(target)++ = (uint8_t)  targetByteUnit;                                    \
  |  |  864|      0|                    if(offsets){                                                                \
  |  |  ------------------
  |  |  |  Branch (864:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  865|      0|                        *(offsets++) = offset                            ;                      \
  |  |  866|      0|                    }                                                                           \
  |  |  867|      0|                }else{                                                                          \
  |  |  868|      0|                    args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =\
  |  |  869|      0|                                (uint8_t) (targetByteUnit);                                     \
  |  |  870|      0|                    *err = U_BUFFER_OVERFLOW_ERROR;                                             \
  |  |  871|      0|                }                                                                               \
  |  |  872|      0|            }                                                                                   \
  |  |  873|      0|        }                                                                                       \
  |  |  874|   854k|    }else{                                                                                      \
  |  |  875|      0|        if (targetByteUnit & 0xFF0000) {                                                        \
  |  |  ------------------
  |  |  |  Branch (875:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  876|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  877|      0|                        (uint8_t) (targetByteUnit >>16);                                        \
  |  |  878|      0|        }                                                                                       \
  |  |  879|      0|        if(targetByteUnit & 0xFF00){                                                            \
  |  |  ------------------
  |  |  |  Branch (879:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  880|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  881|      0|                        (uint8_t) (targetByteUnit >>8);                                         \
  |  |  882|      0|        }                                                                                       \
  |  |  883|      0|        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =            \
  |  |  884|      0|                        (uint8_t) (targetByteUnit);                                             \
  |  |  885|      0|        *err = U_BUFFER_OVERFLOW_ERROR;                                                         \
  |  |  886|      0|    }                                                                                           \
  |  |  887|   854k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|   854k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  947|   854k|            if (U_FAILURE(*err)) {
  ------------------
  |  Branch (947:17): [True: 0, False: 854k]
  ------------------
  948|      0|                break;
  949|      0|            }
  950|   854k|            continue;
  951|   854k|        }
  952|  5.45M|        switch (sourceChar) {
  953|    579|        case ZWNJ:
  ------------------
  |  |   36|    579|#define ZWNJ                0x200c /* Zero Width Non Joiner */
  ------------------
  |  Branch (953:9): [True: 579, False: 5.45M]
  ------------------
  954|       |            /* contextChar has HALANT */
  955|    579|            if (converterData->contextCharFromUnicode) {
  ------------------
  |  Branch (955:17): [True: 317, False: 262]
  ------------------
  956|    317|                converterData->contextCharFromUnicode = 0x00;
  957|    317|                targetByteUnit = ISCII_HALANT;
  ------------------
  |  |   44|    317|#define ISCII_HALANT        0xE8
  ------------------
  958|    317|            } else {
  959|       |                /* consume ZWNJ and continue */
  960|    262|                converterData->contextCharFromUnicode = 0x00;
  961|    262|                continue;
  962|    262|            }
  963|    317|            break;
  964|    474|        case ZWJ:
  ------------------
  |  |   37|    474|#define ZWJ                 0x200d /* Zero width Joiner */
  ------------------
  |  Branch (964:9): [True: 474, False: 5.45M]
  ------------------
  965|       |            /* contextChar has HALANT */
  966|    474|            if (converterData->contextCharFromUnicode) {
  ------------------
  |  Branch (966:17): [True: 194, False: 280]
  ------------------
  967|    194|                targetByteUnit = ISCII_NUKTA;
  ------------------
  |  |   43|    194|#define ISCII_NUKTA         0xE9
  ------------------
  968|    280|            } else {
  969|    280|                targetByteUnit =ISCII_INV;
  ------------------
  |  |   46|    280|#define ISCII_INV           0xD9
  ------------------
  970|    280|            }
  971|    474|            converterData->contextCharFromUnicode = 0x00;
  972|    474|            break;
  973|  5.45M|        default:
  ------------------
  |  Branch (973:9): [True: 5.45M, False: 1.05k]
  ------------------
  974|       |            /* is the sourceChar in the INDIC_RANGE? */
  975|  5.45M|            if ((uint16_t)(INDIC_BLOCK_END-sourceChar) <= INDIC_RANGE) {
  ------------------
  |  |   49|  5.45M|#define INDIC_BLOCK_END     0x0D7F
  ------------------
                          if ((uint16_t)(INDIC_BLOCK_END-sourceChar) <= INDIC_RANGE) {
  ------------------
  |  |   50|  5.45M|#define INDIC_RANGE         (INDIC_BLOCK_END - INDIC_BLOCK_BEGIN)
  |  |  ------------------
  |  |  |  |   49|  5.45M|#define INDIC_BLOCK_END     0x0D7F
  |  |  ------------------
  |  |               #define INDIC_RANGE         (INDIC_BLOCK_END - INDIC_BLOCK_BEGIN)
  |  |  ------------------
  |  |  |  |   48|  5.45M|#define INDIC_BLOCK_BEGIN   0x0900
  |  |  ------------------
  ------------------
  |  Branch (975:17): [True: 89.8k, False: 5.36M]
  ------------------
  976|       |                /* Danda and Double Danda are valid in Northern scripts.. since Unicode
  977|       |                 * does not include these codepoints in all Northern scrips we need to
  978|       |                 * filter them out
  979|       |                 */
  980|  89.8k|                if (sourceChar!= DANDA && sourceChar != DOUBLE_DANDA) {
  ------------------
  |  |   41|   179k|#define DANDA               0x0964
  ------------------
                              if (sourceChar!= DANDA && sourceChar != DOUBLE_DANDA) {
  ------------------
  |  |   42|  89.4k|#define DOUBLE_DANDA        0x0965
  ------------------
  |  Branch (980:21): [True: 89.4k, False: 391]
  |  Branch (980:43): [True: 89.2k, False: 261]
  ------------------
  981|       |                    /* find out to which block the souceChar belongs*/
  982|  89.2k|                    range =(uint16_t)((sourceChar-INDIC_BLOCK_BEGIN)/DELTA);
  ------------------
  |  |   48|  89.2k|#define INDIC_BLOCK_BEGIN   0x0900
  ------------------
  983|  89.2k|                    newDelta =(uint16_t)(range*DELTA);
  984|       |
  985|       |                    /* Now are we in the same block as the previous? */
  986|  89.2k|                    if (newDelta!= converterData->currentDeltaFromUnicode || converterData->isFirstBuffer) {
  ------------------
  |  Branch (986:25): [True: 72.9k, False: 16.2k]
  |  Branch (986:78): [True: 20, False: 16.2k]
  ------------------
  987|  73.0k|                        converterData->currentDeltaFromUnicode = newDelta;
  988|  73.0k|                        converterData->currentMaskFromUnicode = lookupInitialData[range].maskEnum;
  989|  73.0k|                        deltaChanged =true;
  990|  73.0k|                        converterData->isFirstBuffer=false;
  991|  73.0k|                    }
  992|       |                    
  993|  89.2k|                    if (converterData->currentDeltaFromUnicode == PNJ_DELTA) { 
  ------------------
  |  |   61|  89.2k|#define PNJ_DELTA           0x0100
  ------------------
  |  Branch (993:25): [True: 11.2k, False: 77.9k]
  ------------------
  994|  11.2k|                        if (sourceChar == PNJ_TIPPI) {
  ------------------
  |  |   63|  11.2k|#define PNJ_TIPPI           0x0A70
  ------------------
  |  Branch (994:29): [True: 265, False: 11.0k]
  ------------------
  995|       |                            /* Make sure Tippi is converted to Bindi. */
  996|    265|                            sourceChar = PNJ_BINDI;
  ------------------
  |  |   62|    265|#define PNJ_BINDI           0x0A02
  ------------------
  997|  11.0k|                        } else if (sourceChar == PNJ_ADHAK) {
  ------------------
  |  |   65|  11.0k|#define PNJ_ADHAK           0x0A71
  ------------------
  |  Branch (997:36): [True: 855, False: 10.1k]
  ------------------
  998|       |                            /* This is for consonant cluster handling. */
  999|    855|                            converterData->contextCharFromUnicode = PNJ_ADHAK;
  ------------------
  |  |   65|    855|#define PNJ_ADHAK           0x0A71
  ------------------
 1000|    855|                        }
 1001|       |                        
 1002|  11.2k|                    }
 1003|       |                    /* Normalize all Indic codepoints to Devanagari and map them to ISCII */
 1004|       |                    /* now subtract the new delta from sourceChar*/
 1005|  89.2k|                    sourceChar -= converterData->currentDeltaFromUnicode;
 1006|  89.2k|                }
 1007|       |
 1008|       |                /* get the target byte unit */
 1009|  89.8k|                targetByteUnit=fromUnicodeTable[(uint8_t)sourceChar];
 1010|       |
 1011|       |                /* is the code point valid in current script? */
 1012|  89.8k|                if ((validityTable[(uint8_t)sourceChar] & converterData->currentMaskFromUnicode)==0) {
  ------------------
  |  Branch (1012:21): [True: 35.4k, False: 54.4k]
  ------------------
 1013|       |                    /* Vocallic RR is assigned in ISCII Telugu and Unicode */
 1014|  35.4k|                    if (converterData->currentDeltaFromUnicode!=(TELUGU_DELTA) || sourceChar!=VOCALLIC_RR) {
  ------------------
  |  |   55|  35.4k|#define TELUGU_DELTA        DELTA * TELUGU
  ------------------
                                  if (converterData->currentDeltaFromUnicode!=(TELUGU_DELTA) || sourceChar!=VOCALLIC_RR) {
  ------------------
  |  |   51|  4.10k|#define VOCALLIC_RR         0x0931
  ------------------
  |  Branch (1014:25): [True: 31.3k, False: 4.10k]
  |  Branch (1014:83): [True: 3.85k, False: 255]
  ------------------
 1015|  35.1k|                        targetByteUnit=missingCharMarker;
  ------------------
  |  |   34|  35.1k|#define missingCharMarker 0xFFFF
  ------------------
 1016|  35.1k|                    }
 1017|  35.4k|                }
 1018|       |
 1019|  89.8k|                if (deltaChanged) {
  ------------------
  |  Branch (1019:21): [True: 73.0k, False: 16.8k]
  ------------------
 1020|       |                    /* we are in a script block which is different than
 1021|       |                     * previous sourceChar's script block write ATR and language codes
 1022|       |                     */
 1023|  73.0k|                    uint32_t temp=0;
 1024|  73.0k|                    temp =(uint16_t)(ATR<<8);
  ------------------
  |  |   39|  73.0k|#define ATR                 0xEF   /* Attribute code */
  ------------------
 1025|  73.0k|                    temp += (uint16_t)((uint8_t) lookupInitialData[range].isciiLang);
 1026|       |                    /* reset */
 1027|  73.0k|                    deltaChanged=false;
 1028|       |                    /* now append ATR and language code */
 1029|  73.0k|                    WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,temp,err);
  ------------------
  |  |  834|  73.0k|#define WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  73.0k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  835|  73.0k|    int32_t offset = (int32_t)(source - args->source-1);                                        \
  |  |  836|  73.0k|      /* write the targetUniChar  to target */                                                  \
  |  |  837|  73.0k|    if(target < targetLimit){                                                                   \
  |  |  ------------------
  |  |  |  Branch (837:8): [True: 73.0k, False: 0]
  |  |  ------------------
  |  |  838|  73.0k|        if(targetByteUnit <= 0xFF){                                                             \
  |  |  ------------------
  |  |  |  Branch (838:12): [True: 0, False: 73.0k]
  |  |  ------------------
  |  |  839|      0|            *(target)++ = (uint8_t)(targetByteUnit);                                            \
  |  |  840|      0|            if(offsets){                                                                        \
  |  |  ------------------
  |  |  |  Branch (840:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  841|      0|                *(offsets++) = offset;                                                          \
  |  |  842|      0|            }                                                                                   \
  |  |  843|  73.0k|        }else{                                                                                  \
  |  |  844|  73.0k|            if (targetByteUnit > 0xFFFF) {                                                      \
  |  |  ------------------
  |  |  |  Branch (844:17): [True: 0, False: 73.0k]
  |  |  ------------------
  |  |  845|      0|                *(target)++ = (uint8_t)(targetByteUnit>>16);                                    \
  |  |  846|      0|                if (offsets) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (846:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  847|      0|                    --offset;                                                                   \
  |  |  848|      0|                    *(offsets++) = offset;                                                      \
  |  |  849|      0|                }                                                                               \
  |  |  850|      0|            }                                                                                   \
  |  |  851|  73.0k|            if (!(target < targetLimit)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (851:17): [True: 0, False: 73.0k]
  |  |  ------------------
  |  |  852|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  853|      0|                                (uint8_t)(targetByteUnit >> 8);                                 \
  |  |  854|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  855|      0|                                (uint8_t)targetByteUnit;                                        \
  |  |  856|      0|                *err = U_BUFFER_OVERFLOW_ERROR;                                                 \
  |  |  857|  73.0k|            } else {                                                                            \
  |  |  858|  73.0k|                *(target)++ = (uint8_t)(targetByteUnit>>8);                                     \
  |  |  859|  73.0k|                if(offsets){                                                                    \
  |  |  ------------------
  |  |  |  Branch (859:20): [True: 0, False: 73.0k]
  |  |  ------------------
  |  |  860|      0|                    *(offsets++) = offset;                                                      \
  |  |  861|      0|                }                                                                               \
  |  |  862|  73.0k|                if(target < targetLimit){                                                       \
  |  |  ------------------
  |  |  |  Branch (862:20): [True: 73.0k, False: 0]
  |  |  ------------------
  |  |  863|  73.0k|                    *(target)++ = (uint8_t)  targetByteUnit;                                    \
  |  |  864|  73.0k|                    if(offsets){                                                                \
  |  |  ------------------
  |  |  |  Branch (864:24): [True: 0, False: 73.0k]
  |  |  ------------------
  |  |  865|      0|                        *(offsets++) = offset                            ;                      \
  |  |  866|      0|                    }                                                                           \
  |  |  867|  73.0k|                }else{                                                                          \
  |  |  868|      0|                    args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =\
  |  |  869|      0|                                (uint8_t) (targetByteUnit);                                     \
  |  |  870|      0|                    *err = U_BUFFER_OVERFLOW_ERROR;                                             \
  |  |  871|      0|                }                                                                               \
  |  |  872|  73.0k|            }                                                                                   \
  |  |  873|  73.0k|        }                                                                                       \
  |  |  874|  73.0k|    }else{                                                                                      \
  |  |  875|      0|        if (targetByteUnit & 0xFF0000) {                                                        \
  |  |  ------------------
  |  |  |  Branch (875:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  876|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  877|      0|                        (uint8_t) (targetByteUnit >>16);                                        \
  |  |  878|      0|        }                                                                                       \
  |  |  879|      0|        if(targetByteUnit & 0xFF00){                                                            \
  |  |  ------------------
  |  |  |  Branch (879:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  880|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  881|      0|                        (uint8_t) (targetByteUnit >>8);                                         \
  |  |  882|      0|        }                                                                                       \
  |  |  883|      0|        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =            \
  |  |  884|      0|                        (uint8_t) (targetByteUnit);                                             \
  |  |  885|      0|        *err = U_BUFFER_OVERFLOW_ERROR;                                                         \
  |  |  886|      0|    }                                                                                           \
  |  |  887|  73.0k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  73.0k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1030|  73.0k|                    if (U_FAILURE(*err)) {
  ------------------
  |  Branch (1030:25): [True: 0, False: 73.0k]
  ------------------
 1031|      0|                        break;
 1032|      0|                    }
 1033|  73.0k|                }
 1034|       |                
 1035|  89.8k|                if (converterData->currentDeltaFromUnicode == PNJ_DELTA && (sourceChar + PNJ_DELTA) == PNJ_ADHAK) {
  ------------------
  |  |   61|   179k|#define PNJ_DELTA           0x0100
  ------------------
                              if (converterData->currentDeltaFromUnicode == PNJ_DELTA && (sourceChar + PNJ_DELTA) == PNJ_ADHAK) {
  ------------------
  |  |   61|  11.2k|#define PNJ_DELTA           0x0100
  ------------------
                              if (converterData->currentDeltaFromUnicode == PNJ_DELTA && (sourceChar + PNJ_DELTA) == PNJ_ADHAK) {
  ------------------
  |  |   65|  11.2k|#define PNJ_ADHAK           0x0A71
  ------------------
  |  Branch (1035:21): [True: 11.2k, False: 78.5k]
  |  Branch (1035:76): [True: 855, False: 10.4k]
  ------------------
 1036|    855|                    continue;
 1037|    855|                }
 1038|  89.8k|            }
 1039|       |            /* reset context char */
 1040|  5.45M|            converterData->contextCharFromUnicode = 0x00;
 1041|  5.45M|            break;
 1042|  5.45M|        }
 1043|  5.45M|        if (converterData->currentDeltaFromUnicode == PNJ_DELTA && tempContextFromUnicode == PNJ_ADHAK && isPNJConsonant((sourceChar + PNJ_DELTA))) {
  ------------------
  |  |   61|  10.9M|#define PNJ_DELTA           0x0100
  ------------------
                      if (converterData->currentDeltaFromUnicode == PNJ_DELTA && tempContextFromUnicode == PNJ_ADHAK && isPNJConsonant((sourceChar + PNJ_DELTA))) {
  ------------------
  |  |   65|  5.98M|#define PNJ_ADHAK           0x0A71
  ------------------
                      if (converterData->currentDeltaFromUnicode == PNJ_DELTA && tempContextFromUnicode == PNJ_ADHAK && isPNJConsonant((sourceChar + PNJ_DELTA))) {
  ------------------
  |  |   61|    660|#define PNJ_DELTA           0x0100
  ------------------
  |  Branch (1043:13): [True: 524k, False: 4.93M]
  |  Branch (1043:68): [True: 660, False: 524k]
  |  Branch (1043:107): [True: 197, False: 463]
  ------------------
 1044|       |            /* If the previous codepoint is Adhak and the current codepoint is a consonant, the targetByteUnit should be C + Halant + C. */
 1045|       |            /* reset context char */
 1046|    197|            converterData->contextCharFromUnicode = 0x0000;
 1047|    197|            targetByteUnit = targetByteUnit << 16 | ISCII_HALANT << 8 | targetByteUnit;
  ------------------
  |  |   44|    197|#define ISCII_HALANT        0xE8
  ------------------
 1048|       |            /* write targetByteUnit to target */
 1049|    197|            WRITE_TO_TARGET_FROM_U(args, offsets, source, target, targetLimit, targetByteUnit,err);
  ------------------
  |  |  834|    197|#define WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    197|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  835|    197|    int32_t offset = (int32_t)(source - args->source-1);                                        \
  |  |  836|    197|      /* write the targetUniChar  to target */                                                  \
  |  |  837|    197|    if(target < targetLimit){                                                                   \
  |  |  ------------------
  |  |  |  Branch (837:8): [True: 197, False: 0]
  |  |  ------------------
  |  |  838|    197|        if(targetByteUnit <= 0xFF){                                                             \
  |  |  ------------------
  |  |  |  Branch (838:12): [True: 0, False: 197]
  |  |  ------------------
  |  |  839|      0|            *(target)++ = (uint8_t)(targetByteUnit);                                            \
  |  |  840|      0|            if(offsets){                                                                        \
  |  |  ------------------
  |  |  |  Branch (840:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  841|      0|                *(offsets++) = offset;                                                          \
  |  |  842|      0|            }                                                                                   \
  |  |  843|    197|        }else{                                                                                  \
  |  |  844|    197|            if (targetByteUnit > 0xFFFF) {                                                      \
  |  |  ------------------
  |  |  |  Branch (844:17): [True: 197, False: 0]
  |  |  ------------------
  |  |  845|    197|                *(target)++ = (uint8_t)(targetByteUnit>>16);                                    \
  |  |  846|    197|                if (offsets) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (846:21): [True: 0, False: 197]
  |  |  ------------------
  |  |  847|      0|                    --offset;                                                                   \
  |  |  848|      0|                    *(offsets++) = offset;                                                      \
  |  |  849|      0|                }                                                                               \
  |  |  850|    197|            }                                                                                   \
  |  |  851|    197|            if (!(target < targetLimit)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (851:17): [True: 0, False: 197]
  |  |  ------------------
  |  |  852|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  853|      0|                                (uint8_t)(targetByteUnit >> 8);                                 \
  |  |  854|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  855|      0|                                (uint8_t)targetByteUnit;                                        \
  |  |  856|      0|                *err = U_BUFFER_OVERFLOW_ERROR;                                                 \
  |  |  857|    197|            } else {                                                                            \
  |  |  858|    197|                *(target)++ = (uint8_t)(targetByteUnit>>8);                                     \
  |  |  859|    197|                if(offsets){                                                                    \
  |  |  ------------------
  |  |  |  Branch (859:20): [True: 0, False: 197]
  |  |  ------------------
  |  |  860|      0|                    *(offsets++) = offset;                                                      \
  |  |  861|      0|                }                                                                               \
  |  |  862|    197|                if(target < targetLimit){                                                       \
  |  |  ------------------
  |  |  |  Branch (862:20): [True: 197, False: 0]
  |  |  ------------------
  |  |  863|    197|                    *(target)++ = (uint8_t)  targetByteUnit;                                    \
  |  |  864|    197|                    if(offsets){                                                                \
  |  |  ------------------
  |  |  |  Branch (864:24): [True: 0, False: 197]
  |  |  ------------------
  |  |  865|      0|                        *(offsets++) = offset                            ;                      \
  |  |  866|      0|                    }                                                                           \
  |  |  867|    197|                }else{                                                                          \
  |  |  868|      0|                    args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =\
  |  |  869|      0|                                (uint8_t) (targetByteUnit);                                     \
  |  |  870|      0|                    *err = U_BUFFER_OVERFLOW_ERROR;                                             \
  |  |  871|      0|                }                                                                               \
  |  |  872|    197|            }                                                                                   \
  |  |  873|    197|        }                                                                                       \
  |  |  874|    197|    }else{                                                                                      \
  |  |  875|      0|        if (targetByteUnit & 0xFF0000) {                                                        \
  |  |  ------------------
  |  |  |  Branch (875:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  876|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  877|      0|                        (uint8_t) (targetByteUnit >>16);                                        \
  |  |  878|      0|        }                                                                                       \
  |  |  879|      0|        if(targetByteUnit & 0xFF00){                                                            \
  |  |  ------------------
  |  |  |  Branch (879:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  880|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  881|      0|                        (uint8_t) (targetByteUnit >>8);                                         \
  |  |  882|      0|        }                                                                                       \
  |  |  883|      0|        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =            \
  |  |  884|      0|                        (uint8_t) (targetByteUnit);                                             \
  |  |  885|      0|        *err = U_BUFFER_OVERFLOW_ERROR;                                                         \
  |  |  886|      0|    }                                                                                           \
  |  |  887|    197|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    197|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1050|    197|            if (U_FAILURE(*err)) {
  ------------------
  |  Branch (1050:17): [True: 0, False: 197]
  ------------------
 1051|      0|                break;
 1052|      0|            }
 1053|  5.45M|        } else if (targetByteUnit != missingCharMarker) {
  ------------------
  |  |   34|  5.45M|#define missingCharMarker 0xFFFF
  ------------------
  |  Branch (1053:20): [True: 54.5k, False: 5.40M]
  ------------------
 1054|  54.5k|            if (targetByteUnit==ISCII_HALANT) {
  ------------------
  |  |   44|  54.5k|#define ISCII_HALANT        0xE8
  ------------------
  |  Branch (1054:17): [True: 1.22k, False: 53.3k]
  ------------------
 1055|  1.22k|                converterData->contextCharFromUnicode = (char16_t)targetByteUnit;
 1056|  1.22k|            }
 1057|       |            /* write targetByteUnit to target*/
 1058|  54.5k|            WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err);
  ------------------
  |  |  834|  54.5k|#define WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  54.5k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  835|  54.5k|    int32_t offset = (int32_t)(source - args->source-1);                                        \
  |  |  836|  54.5k|      /* write the targetUniChar  to target */                                                  \
  |  |  837|  54.5k|    if(target < targetLimit){                                                                   \
  |  |  ------------------
  |  |  |  Branch (837:8): [True: 54.5k, False: 0]
  |  |  ------------------
  |  |  838|  54.5k|        if(targetByteUnit <= 0xFF){                                                             \
  |  |  ------------------
  |  |  |  Branch (838:12): [True: 50.6k, False: 3.93k]
  |  |  ------------------
  |  |  839|  50.6k|            *(target)++ = (uint8_t)(targetByteUnit);                                            \
  |  |  840|  50.6k|            if(offsets){                                                                        \
  |  |  ------------------
  |  |  |  Branch (840:16): [True: 0, False: 50.6k]
  |  |  ------------------
  |  |  841|      0|                *(offsets++) = offset;                                                          \
  |  |  842|      0|            }                                                                                   \
  |  |  843|  50.6k|        }else{                                                                                  \
  |  |  844|  3.93k|            if (targetByteUnit > 0xFFFF) {                                                      \
  |  |  ------------------
  |  |  |  Branch (844:17): [True: 0, False: 3.93k]
  |  |  ------------------
  |  |  845|      0|                *(target)++ = (uint8_t)(targetByteUnit>>16);                                    \
  |  |  846|      0|                if (offsets) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (846:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  847|      0|                    --offset;                                                                   \
  |  |  848|      0|                    *(offsets++) = offset;                                                      \
  |  |  849|      0|                }                                                                               \
  |  |  850|      0|            }                                                                                   \
  |  |  851|  3.93k|            if (!(target < targetLimit)) {                                                      \
  |  |  ------------------
  |  |  |  Branch (851:17): [True: 0, False: 3.93k]
  |  |  ------------------
  |  |  852|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  853|      0|                                (uint8_t)(targetByteUnit >> 8);                                 \
  |  |  854|      0|                args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =    \
  |  |  855|      0|                                (uint8_t)targetByteUnit;                                        \
  |  |  856|      0|                *err = U_BUFFER_OVERFLOW_ERROR;                                                 \
  |  |  857|  3.93k|            } else {                                                                            \
  |  |  858|  3.93k|                *(target)++ = (uint8_t)(targetByteUnit>>8);                                     \
  |  |  859|  3.93k|                if(offsets){                                                                    \
  |  |  ------------------
  |  |  |  Branch (859:20): [True: 0, False: 3.93k]
  |  |  ------------------
  |  |  860|      0|                    *(offsets++) = offset;                                                      \
  |  |  861|      0|                }                                                                               \
  |  |  862|  3.93k|                if(target < targetLimit){                                                       \
  |  |  ------------------
  |  |  |  Branch (862:20): [True: 3.93k, False: 0]
  |  |  ------------------
  |  |  863|  3.93k|                    *(target)++ = (uint8_t)  targetByteUnit;                                    \
  |  |  864|  3.93k|                    if(offsets){                                                                \
  |  |  ------------------
  |  |  |  Branch (864:24): [True: 0, False: 3.93k]
  |  |  ------------------
  |  |  865|      0|                        *(offsets++) = offset                            ;                      \
  |  |  866|      0|                    }                                                                           \
  |  |  867|  3.93k|                }else{                                                                          \
  |  |  868|      0|                    args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =\
  |  |  869|      0|                                (uint8_t) (targetByteUnit);                                     \
  |  |  870|      0|                    *err = U_BUFFER_OVERFLOW_ERROR;                                             \
  |  |  871|      0|                }                                                                               \
  |  |  872|  3.93k|            }                                                                                   \
  |  |  873|  3.93k|        }                                                                                       \
  |  |  874|  54.5k|    }else{                                                                                      \
  |  |  875|      0|        if (targetByteUnit & 0xFF0000) {                                                        \
  |  |  ------------------
  |  |  |  Branch (875:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  876|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  877|      0|                        (uint8_t) (targetByteUnit >>16);                                        \
  |  |  878|      0|        }                                                                                       \
  |  |  879|      0|        if(targetByteUnit & 0xFF00){                                                            \
  |  |  ------------------
  |  |  |  Branch (879:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  880|      0|            args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =        \
  |  |  881|      0|                        (uint8_t) (targetByteUnit >>8);                                         \
  |  |  882|      0|        }                                                                                       \
  |  |  883|      0|        args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] =            \
  |  |  884|      0|                        (uint8_t) (targetByteUnit);                                             \
  |  |  885|      0|        *err = U_BUFFER_OVERFLOW_ERROR;                                                         \
  |  |  886|      0|    }                                                                                           \
  |  |  887|  54.5k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  54.5k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1059|  54.5k|            if (U_FAILURE(*err)) {
  ------------------
  |  Branch (1059:17): [True: 0, False: 54.5k]
  ------------------
 1060|      0|                break;
 1061|      0|            }
 1062|  5.40M|        } else {
 1063|       |            /* oops.. the code point is unassigned */
 1064|       |            /*check if the char is a First surrogate*/
 1065|  5.40M|            if (U16_IS_SURROGATE(sourceChar)) {
  ------------------
  |  |   75|  5.40M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  5.40M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 143k, False: 5.25M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1066|   143k|                if (U16_IS_SURROGATE_LEAD(sourceChar)) {
  ------------------
  |  |   84|   143k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 72.2k, False: 71.2k]
  |  |  ------------------
  ------------------
 1067|  72.2k|getTrail:
 1068|       |                    /*look ahead to find the trail surrogate*/
 1069|  72.2k|                    if (source < sourceLimit) {
  ------------------
  |  Branch (1069:25): [True: 72.2k, False: 11]
  ------------------
 1070|       |                        /* test the following code unit */
 1071|  72.2k|                        char16_t trail= (*source);
 1072|  72.2k|                        if (U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  72.2k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 1.34k, False: 70.8k]
  |  |  ------------------
  ------------------
 1073|  1.34k|                            source++;
 1074|  1.34k|                            sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
  ------------------
  |  |  113|  1.34k|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|  1.34k|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 1075|  1.34k|                            *err =U_INVALID_CHAR_FOUND;
 1076|       |                            /* convert this surrogate code point */
 1077|       |                            /* exit this condition tree */
 1078|  70.8k|                        } else {
 1079|       |                            /* this is an unmatched lead code unit (1st surrogate) */
 1080|       |                            /* callback(illegal) */
 1081|  70.8k|                            *err=U_ILLEGAL_CHAR_FOUND;
 1082|  70.8k|                        }
 1083|  72.2k|                    } else {
 1084|       |                        /* no more input */
 1085|     11|                        *err = U_ZERO_ERROR;
 1086|     11|                    }
 1087|  72.2k|                } else {
 1088|       |                    /* this is an unmatched trail code unit (2nd surrogate) */
 1089|       |                    /* callback(illegal) */
 1090|  71.2k|                    *err=U_ILLEGAL_CHAR_FOUND;
 1091|  71.2k|                }
 1092|  5.25M|            } else {
 1093|       |                /* callback(unassigned) for a BMP code point */
 1094|  5.25M|                *err = U_INVALID_CHAR_FOUND;
 1095|  5.25M|            }
 1096|       |
 1097|  5.40M|            args->converter->fromUChar32=sourceChar;
 1098|  5.40M|            break;
 1099|  5.40M|        }
 1100|  5.45M|    }/* end while(mySourceIndex<mySourceLength) */
 1101|       |
 1102|       |    /*save the state and return */
 1103|  5.40M|    args->source = source;
 1104|  5.40M|    args->target = (char*)target;
 1105|  5.40M|}

ucnvlat1.cpp:_ZL29_Latin1FromUnicodeWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
  138|  1.75M|                              UErrorCode *pErrorCode) {
  139|  1.75M|    UConverter *cnv;
  140|  1.75M|    const char16_t *source, *sourceLimit;
  141|  1.75M|    uint8_t *target, *oldTarget;
  142|  1.75M|    int32_t targetCapacity, length;
  143|  1.75M|    int32_t *offsets;
  144|       |
  145|  1.75M|    UChar32 cp;
  146|  1.75M|    char16_t c, max;
  147|       |
  148|  1.75M|    int32_t sourceIndex;
  149|       |
  150|       |    /* set up the local pointers */
  151|  1.75M|    cnv=pArgs->converter;
  152|  1.75M|    source=pArgs->source;
  153|  1.75M|    sourceLimit=pArgs->sourceLimit;
  154|  1.75M|    target=oldTarget=(uint8_t *)pArgs->target;
  155|  1.75M|    targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target);
  156|  1.75M|    offsets=pArgs->offsets;
  157|       |
  158|  1.75M|    if(cnv->sharedData==&_Latin1Data) {
  ------------------
  |  |  105|  1.75M|#define _Latin1Data U_ICU_ENTRY_POINT_RENAME(_Latin1Data)
  |  |  ------------------
  |  |  |  |  123|  1.75M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.75M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  1.75M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (158:8): [True: 1.75M, False: 954]
  ------------------
  159|  1.75M|        max=0xff; /* Latin-1 */
  160|  1.75M|    } else {
  161|    954|        max=0x7f; /* US-ASCII */
  162|    954|    }
  163|       |
  164|       |    /* get the converter state from UConverter */
  165|  1.75M|    cp=cnv->fromUChar32;
  166|       |
  167|       |    /* sourceIndex=-1 if the current character began in the previous buffer */
  168|  1.75M|    sourceIndex= cp==0 ? 0 : -1;
  ------------------
  |  Branch (168:18): [True: 1.75M, False: 0]
  ------------------
  169|       |
  170|       |    /*
  171|       |     * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
  172|       |     * for the minimum of the sourceLength and targetCapacity
  173|       |     */
  174|  1.75M|    length=(int32_t)(sourceLimit-source);
  175|  1.75M|    if(length<targetCapacity) {
  ------------------
  |  Branch (175:8): [True: 1.75M, False: 0]
  ------------------
  176|  1.75M|        targetCapacity=length;
  177|  1.75M|    }
  178|       |
  179|       |    /* conversion loop */
  180|  1.75M|    if(cp!=0 && targetCapacity>0) {
  ------------------
  |  Branch (180:8): [True: 0, False: 1.75M]
  |  Branch (180:17): [True: 0, False: 0]
  ------------------
  181|      0|        goto getTrail;
  182|      0|    }
  183|       |
  184|  1.75M|#if LATIN1_UNROLL_FROM_UNICODE
  185|       |    /* unroll the loop with the most common case */
  186|  1.75M|    if(targetCapacity>=16) {
  ------------------
  |  Branch (186:8): [True: 1.75M, False: 712]
  ------------------
  187|  1.75M|        int32_t count, loops;
  188|  1.75M|        char16_t u, oredChars;
  189|       |
  190|  1.75M|        loops=count=targetCapacity>>4;
  191|  1.75M|        do {
  192|  1.75M|            oredChars=u=*source++;
  193|  1.75M|            *target++=(uint8_t)u;
  194|  1.75M|            oredChars|=u=*source++;
  195|  1.75M|            *target++=(uint8_t)u;
  196|  1.75M|            oredChars|=u=*source++;
  197|  1.75M|            *target++=(uint8_t)u;
  198|  1.75M|            oredChars|=u=*source++;
  199|  1.75M|            *target++=(uint8_t)u;
  200|  1.75M|            oredChars|=u=*source++;
  201|  1.75M|            *target++=(uint8_t)u;
  202|  1.75M|            oredChars|=u=*source++;
  203|  1.75M|            *target++=(uint8_t)u;
  204|  1.75M|            oredChars|=u=*source++;
  205|  1.75M|            *target++=(uint8_t)u;
  206|  1.75M|            oredChars|=u=*source++;
  207|  1.75M|            *target++=(uint8_t)u;
  208|  1.75M|            oredChars|=u=*source++;
  209|  1.75M|            *target++=(uint8_t)u;
  210|  1.75M|            oredChars|=u=*source++;
  211|  1.75M|            *target++=(uint8_t)u;
  212|  1.75M|            oredChars|=u=*source++;
  213|  1.75M|            *target++=(uint8_t)u;
  214|  1.75M|            oredChars|=u=*source++;
  215|  1.75M|            *target++=(uint8_t)u;
  216|  1.75M|            oredChars|=u=*source++;
  217|  1.75M|            *target++=(uint8_t)u;
  218|  1.75M|            oredChars|=u=*source++;
  219|  1.75M|            *target++=(uint8_t)u;
  220|  1.75M|            oredChars|=u=*source++;
  221|  1.75M|            *target++=(uint8_t)u;
  222|  1.75M|            oredChars|=u=*source++;
  223|  1.75M|            *target++=(uint8_t)u;
  224|       |
  225|       |            /* were all 16 entries really valid? */
  226|  1.75M|            if(oredChars>max) {
  ------------------
  |  Branch (226:16): [True: 1.75M, False: 442]
  ------------------
  227|       |                /* no, return to the first of these 16 */
  228|  1.75M|                source-=16;
  229|  1.75M|                target-=16;
  230|  1.75M|                break;
  231|  1.75M|            }
  232|  1.75M|        } while(--count>0);
  ------------------
  |  Branch (232:17): [True: 435, False: 7]
  ------------------
  233|      0|        count=loops-count;
  234|  1.75M|        targetCapacity-=16*count;
  235|       |
  236|  1.75M|        if(offsets!=nullptr) {
  ------------------
  |  Branch (236:12): [True: 0, False: 1.75M]
  ------------------
  237|      0|            oldTarget+=16*count;
  238|      0|            while(count>0) {
  ------------------
  |  Branch (238:19): [True: 0, False: 0]
  ------------------
  239|      0|                *offsets++=sourceIndex++;
  240|      0|                *offsets++=sourceIndex++;
  241|      0|                *offsets++=sourceIndex++;
  242|      0|                *offsets++=sourceIndex++;
  243|      0|                *offsets++=sourceIndex++;
  244|      0|                *offsets++=sourceIndex++;
  245|      0|                *offsets++=sourceIndex++;
  246|      0|                *offsets++=sourceIndex++;
  247|      0|                *offsets++=sourceIndex++;
  248|      0|                *offsets++=sourceIndex++;
  249|      0|                *offsets++=sourceIndex++;
  250|      0|                *offsets++=sourceIndex++;
  251|      0|                *offsets++=sourceIndex++;
  252|      0|                *offsets++=sourceIndex++;
  253|      0|                *offsets++=sourceIndex++;
  254|      0|                *offsets++=sourceIndex++;
  255|      0|                --count;
  256|      0|            }
  257|      0|        }
  258|  1.75M|    }
  259|      0|#endif
  260|       |
  261|       |    /* conversion loop */
  262|      0|    c=0;
  263|  2.09M|    while(targetCapacity>0 && (c=*source++)<=max) {
  ------------------
  |  Branch (263:11): [True: 2.09M, False: 104]
  |  Branch (263:31): [True: 339k, False: 1.75M]
  ------------------
  264|       |        /* convert the Unicode code point */
  265|   339k|        *target++=(uint8_t)c;
  266|   339k|        --targetCapacity;
  267|   339k|    }
  268|       |
  269|  1.75M|    if(c>max) {
  ------------------
  |  Branch (269:8): [True: 1.75M, False: 104]
  ------------------
  270|  1.75M|        cp=c;
  271|  1.75M|        if(!U_IS_SURROGATE(cp)) {
  ------------------
  |  |  193|  1.75M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  ------------------
  |  Branch (271:12): [True: 1.71M, False: 45.0k]
  ------------------
  272|       |            /* callback(unassigned) */
  273|  1.71M|        } else if(U_IS_SURROGATE_LEAD(cp)) {
  ------------------
  |  |  202|  45.0k|#define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (202:32): [True: 19.4k, False: 25.6k]
  |  |  ------------------
  ------------------
  274|  19.4k|getTrail:
  275|  19.4k|            if(source<sourceLimit) {
  ------------------
  |  Branch (275:16): [True: 19.4k, False: 12]
  ------------------
  276|       |                /* test the following code unit */
  277|  19.4k|                char16_t trail=*source;
  278|  19.4k|                if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  19.4k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 396, False: 19.0k]
  |  |  ------------------
  ------------------
  279|    396|                    ++source;
  280|    396|                    cp=U16_GET_SUPPLEMENTARY(cp, trail);
  ------------------
  |  |  113|    396|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    396|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
  281|       |                    /* this codepage does not map supplementary code points */
  282|       |                    /* callback(unassigned) */
  283|  19.0k|                } else {
  284|       |                    /* this is an unmatched lead code unit (1st surrogate) */
  285|       |                    /* callback(illegal) */
  286|  19.0k|                }
  287|  19.4k|            } else {
  288|       |                /* no more input */
  289|     12|                cnv->fromUChar32=cp;
  290|     12|                goto noMoreInput;
  291|     12|            }
  292|  25.6k|        } else {
  293|       |            /* this is an unmatched trail code unit (2nd surrogate) */
  294|       |            /* callback(illegal) */
  295|  25.6k|        }
  296|       |
  297|  1.75M|        *pErrorCode= U_IS_SURROGATE(cp) ? U_ILLEGAL_CHAR_FOUND : U_INVALID_CHAR_FOUND;
  ------------------
  |  |  193|  1.75M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  |  |  |  Branch (193:27): [True: 44.6k, False: 1.71M]
  |  |  ------------------
  ------------------
  298|  1.75M|        cnv->fromUChar32=cp;
  299|  1.75M|    }
  300|  1.75M|noMoreInput:
  301|       |
  302|       |    /* set offsets since the start */
  303|  1.75M|    if(offsets!=nullptr) {
  ------------------
  |  Branch (303:8): [True: 0, False: 1.75M]
  ------------------
  304|      0|        size_t count=target-oldTarget;
  305|      0|        while(count>0) {
  ------------------
  |  Branch (305:15): [True: 0, False: 0]
  ------------------
  306|      0|            *offsets++=sourceIndex++;
  307|      0|            --count;
  308|      0|        }
  309|      0|    }
  310|       |
  311|  1.75M|    if(U_SUCCESS(*pErrorCode) && source<sourceLimit && target>=(uint8_t *)pArgs->targetLimit) {
  ------------------
  |  Branch (311:8): [True: 116, False: 1.75M]
  |  Branch (311:34): [True: 0, False: 116]
  |  Branch (311:56): [True: 0, False: 0]
  ------------------
  312|       |        /* target is full */
  313|      0|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
  314|      0|    }
  315|       |
  316|       |    /* write back the updated pointers */
  317|  1.75M|    pArgs->source=source;
  318|  1.75M|    pArgs->target=(char *)target;
  319|  1.75M|    pArgs->offsets=offsets;
  320|  1.75M|}

ucnv_MBCSFromUnicodeWithOffsets_78:
 4069|  16.2M|                            UErrorCode *pErrorCode) {
 4070|  16.2M|    UConverter *cnv;
 4071|  16.2M|    const char16_t *source, *sourceLimit;
 4072|  16.2M|    uint8_t *target;
 4073|  16.2M|    int32_t targetCapacity;
 4074|  16.2M|    int32_t *offsets;
 4075|       |
 4076|  16.2M|    const uint16_t *table;
 4077|  16.2M|    const uint16_t *mbcsIndex;
 4078|  16.2M|    const uint8_t *p, *bytes;
 4079|  16.2M|    uint8_t outputType;
 4080|       |
 4081|  16.2M|    UChar32 c;
 4082|       |
 4083|  16.2M|    int32_t prevSourceIndex, sourceIndex, nextSourceIndex;
 4084|       |
 4085|  16.2M|    uint32_t stage2Entry;
 4086|  16.2M|    uint32_t asciiRoundtrips;
 4087|  16.2M|    uint32_t value;
 4088|       |    /* Shift-In and Shift-Out byte sequences differ by encoding scheme. */
 4089|  16.2M|    uint8_t siBytes[2] = {0, 0};
 4090|  16.2M|    uint8_t soBytes[2] = {0, 0};
 4091|  16.2M|    uint8_t siLength, soLength;
 4092|  16.2M|    int32_t length = 0, prevLength;
 4093|  16.2M|    uint8_t unicodeMask;
 4094|       |
 4095|  16.2M|    cnv=pArgs->converter;
 4096|       |
 4097|  16.2M|    if(cnv->preFromUFirstCP>=0) {
  ------------------
  |  Branch (4097:8): [True: 0, False: 16.2M]
  ------------------
 4098|       |        /*
 4099|       |         * pass sourceIndex=-1 because we continue from an earlier buffer
 4100|       |         * in the future, this may change with continuous offsets
 4101|       |         */
 4102|      0|        ucnv_extContinueMatchFromU(cnv, pArgs, -1, pErrorCode);
  ------------------
  |  |  652|      0|#define ucnv_extContinueMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extContinueMatchFromU)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4103|       |
 4104|      0|        if(U_FAILURE(*pErrorCode) || cnv->preFromULength<0) {
  ------------------
  |  Branch (4104:12): [True: 0, False: 0]
  |  Branch (4104:38): [True: 0, False: 0]
  ------------------
 4105|      0|            return;
 4106|      0|        }
 4107|      0|    }
 4108|       |
 4109|       |    /* use optimized function if possible */
 4110|  16.2M|    outputType=cnv->sharedData->mbcs.outputType;
 4111|  16.2M|    unicodeMask=cnv->sharedData->mbcs.unicodeMask;
 4112|  16.2M|    if(outputType==MBCS_OUTPUT_1 && !(unicodeMask&UCNV_HAS_SURROGATES)) {
  ------------------
  |  |   65|  10.4M|#define UCNV_HAS_SURROGATES    2
  ------------------
  |  Branch (4112:8): [True: 10.4M, False: 5.76M]
  |  Branch (4112:37): [True: 10.4M, False: 0]
  ------------------
 4113|  10.4M|        if(!(unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
  ------------------
  |  |   64|  10.4M|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (4113:12): [True: 10.4M, False: 0]
  ------------------
 4114|  10.4M|            ucnv_MBCSSingleFromBMPWithOffsets(pArgs, pErrorCode);
 4115|  10.4M|        } else {
 4116|      0|            ucnv_MBCSSingleFromUnicodeWithOffsets(pArgs, pErrorCode);
 4117|      0|        }
 4118|  10.4M|        return;
 4119|  10.4M|    } else if(outputType==MBCS_OUTPUT_2 && cnv->sharedData->mbcs.utf8Friendly) {
  ------------------
  |  Branch (4119:15): [True: 4.75M, False: 1.01M]
  |  Branch (4119:44): [True: 4.75M, False: 0]
  ------------------
 4120|  4.75M|        ucnv_MBCSDoubleFromUnicodeWithOffsets(pArgs, pErrorCode);
 4121|  4.75M|        return;
 4122|  4.75M|    }
 4123|       |
 4124|       |    /* set up the local pointers */
 4125|  1.01M|    source=pArgs->source;
 4126|  1.01M|    sourceLimit=pArgs->sourceLimit;
 4127|  1.01M|    target=(uint8_t *)pArgs->target;
 4128|  1.01M|    targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target);
 4129|  1.01M|    offsets=pArgs->offsets;
 4130|       |
 4131|  1.01M|    table=cnv->sharedData->mbcs.fromUnicodeTable;
 4132|  1.01M|    if(cnv->sharedData->mbcs.utf8Friendly) {
  ------------------
  |  Branch (4132:8): [True: 1.01M, False: 0]
  ------------------
 4133|  1.01M|        mbcsIndex=cnv->sharedData->mbcs.mbcsIndex;
 4134|  1.01M|    } else {
 4135|      0|        mbcsIndex=nullptr;
 4136|      0|    }
 4137|  1.01M|    if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) {
  ------------------
  |  |   45|  1.01M|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
  |  Branch (4137:8): [True: 0, False: 1.01M]
  ------------------
 4138|      0|        bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
 4139|  1.01M|    } else {
 4140|  1.01M|        bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
 4141|  1.01M|    }
 4142|  1.01M|    asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
 4143|       |
 4144|       |    /* get the converter state from UConverter */
 4145|  1.01M|    c=cnv->fromUChar32;
 4146|       |
 4147|  1.01M|    if(outputType==MBCS_OUTPUT_2_SISO) {
  ------------------
  |  Branch (4147:8): [True: 997k, False: 13.2k]
  ------------------
 4148|   997k|        prevLength=cnv->fromUnicodeStatus;
 4149|   997k|        if(prevLength==0) {
  ------------------
  |  Branch (4149:12): [True: 184, False: 997k]
  ------------------
 4150|       |            /* set the real value */
 4151|    184|            prevLength=1;
 4152|    184|        }
 4153|   997k|    } else {
 4154|       |        /* prevent fromUnicodeStatus from being set to something non-0 */
 4155|  13.2k|        prevLength=0;
 4156|  13.2k|    }
 4157|       |
 4158|       |    /* sourceIndex=-1 if the current character began in the previous buffer */
 4159|  1.01M|    prevSourceIndex=-1;
 4160|  1.01M|    sourceIndex= c==0 ? 0 : -1;
  ------------------
  |  Branch (4160:18): [True: 1.01M, False: 0]
  ------------------
 4161|  1.01M|    nextSourceIndex=0;
 4162|       |
 4163|       |    /* Get the SI/SO character for the converter */
 4164|  1.01M|    siLength = static_cast<uint8_t>(getSISOBytes(SI, cnv->options, siBytes));
 4165|  1.01M|    soLength = static_cast<uint8_t>(getSISOBytes(SO, cnv->options, soBytes));
 4166|       |
 4167|       |    /* conversion loop */
 4168|       |    /*
 4169|       |     * This is another piece of ugly code:
 4170|       |     * A goto into the loop if the converter state contains a first surrogate
 4171|       |     * from the previous function call.
 4172|       |     * It saves me to check in each loop iteration a check of if(c==0)
 4173|       |     * and duplicating the trail-surrogate-handling code in the else
 4174|       |     * branch of that check.
 4175|       |     * I could not find any other way to get around this other than
 4176|       |     * using a function call for the conversion and callback, which would
 4177|       |     * be even more inefficient.
 4178|       |     *
 4179|       |     * Markus Scherer 2000-jul-19
 4180|       |     */
 4181|  1.01M|    if(c!=0 && targetCapacity>0) {
  ------------------
  |  Branch (4181:8): [True: 0, False: 1.01M]
  |  Branch (4181:16): [True: 0, False: 0]
  ------------------
 4182|      0|        goto getTrail;
 4183|      0|    }
 4184|       |
 4185|  23.9M|    while(source<sourceLimit) {
  ------------------
  |  Branch (4185:11): [True: 23.9M, False: 701]
  ------------------
 4186|       |        /*
 4187|       |         * This following test is to see if available input would overflow the output.
 4188|       |         * It does not catch output of more than one byte that
 4189|       |         * overflows as a result of a multi-byte character or callback output
 4190|       |         * from the last source character.
 4191|       |         * Therefore, those situations also test for overflows and will
 4192|       |         * then break the loop, too.
 4193|       |         */
 4194|  23.9M|        if(targetCapacity>0) {
  ------------------
  |  Branch (4194:12): [True: 23.9M, False: 480]
  ------------------
 4195|       |            /*
 4196|       |             * Get a correct Unicode code point:
 4197|       |             * a single char16_t for a BMP code point or
 4198|       |             * a matched surrogate pair for a "supplementary code point".
 4199|       |             */
 4200|  23.9M|            c=*source++;
 4201|  23.9M|            ++nextSourceIndex;
 4202|  23.9M|            if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) {
  ------------------
  |  |  296|  5.60M|#define IS_ASCII_ROUNDTRIP(b, asciiRoundtrips) (((asciiRoundtrips) & (1<<((b)>>2)))!=0)
  |  |  ------------------
  |  |  |  Branch (296:48): [True: 198k, False: 5.40M]
  |  |  ------------------
  ------------------
  |  Branch (4202:16): [True: 5.60M, False: 18.2M]
  ------------------
 4203|   198k|                *target++=(uint8_t)c;
 4204|   198k|                if(offsets!=nullptr) {
  ------------------
  |  Branch (4204:20): [True: 0, False: 198k]
  ------------------
 4205|      0|                    *offsets++=sourceIndex;
 4206|      0|                    prevSourceIndex=sourceIndex;
 4207|      0|                    sourceIndex=nextSourceIndex;
 4208|      0|                }
 4209|   198k|                --targetCapacity;
 4210|   198k|                c=0;
 4211|   198k|                continue;
 4212|   198k|            }
 4213|       |            /*
 4214|       |             * utf8Friendly table: Test for <=0xd7ff rather than <=MBCS_FAST_MAX
 4215|       |             * to avoid dealing with surrogates.
 4216|       |             * MBCS_FAST_MAX must be >=0xd7ff.
 4217|       |             */
 4218|  23.7M|            if(c<=0xd7ff && mbcsIndex!=nullptr) {
  ------------------
  |  Branch (4218:16): [True: 23.6M, False: 27.8k]
  |  Branch (4218:29): [True: 23.6M, False: 0]
  ------------------
 4219|  23.6M|                value=mbcsIndex[c>>6];
 4220|       |
 4221|       |                /* get the bytes and the length for the output (copied from below and adapted for utf8Friendly data) */
 4222|       |                /* There are only roundtrips (!=0) and no-mapping (==0) entries. */
 4223|  23.6M|                switch(outputType) {
 4224|      0|                case MBCS_OUTPUT_2:
  ------------------
  |  Branch (4224:17): [True: 0, False: 23.6M]
  ------------------
 4225|      0|                    value=((const uint16_t *)bytes)[value +(c&0x3f)];
 4226|      0|                    if(value<=0xff) {
  ------------------
  |  Branch (4226:24): [True: 0, False: 0]
  ------------------
 4227|      0|                        if(value==0) {
  ------------------
  |  Branch (4227:28): [True: 0, False: 0]
  ------------------
 4228|      0|                            goto unassigned;
 4229|      0|                        } else {
 4230|      0|                            length=1;
 4231|      0|                        }
 4232|      0|                    } else {
 4233|      0|                        length=2;
 4234|      0|                    }
 4235|      0|                    break;
 4236|  11.0M|                case MBCS_OUTPUT_2_SISO:
  ------------------
  |  Branch (4236:17): [True: 11.0M, False: 12.6M]
  ------------------
 4237|       |                    /* 1/2-byte stateful with Shift-In/Shift-Out */
 4238|       |                    /*
 4239|       |                     * Save the old state in the converter object
 4240|       |                     * right here, then change the local prevLength state variable if necessary.
 4241|       |                     * Then, if this character turns out to be unassigned or a fallback that
 4242|       |                     * is not taken, the callback code must not save the new state in the converter
 4243|       |                     * because the new state is for a character that is not output.
 4244|       |                     * However, the callback must still restore the state from the converter
 4245|       |                     * in case the callback function changed it for its output.
 4246|       |                     */
 4247|  11.0M|                    cnv->fromUnicodeStatus=prevLength; /* save the old state */
 4248|  11.0M|                    value=((const uint16_t *)bytes)[value +(c&0x3f)];
 4249|  11.0M|                    if(value<=0xff) {
  ------------------
  |  Branch (4249:24): [True: 6.39M, False: 4.62M]
  ------------------
 4250|  6.39M|                        if(value==0) {
  ------------------
  |  Branch (4250:28): [True: 1.02M, False: 5.37M]
  ------------------
 4251|  1.02M|                            goto unassigned;
 4252|  5.37M|                        } else if(prevLength<=1) {
  ------------------
  |  Branch (4252:35): [True: 1.82k, False: 5.36M]
  ------------------
 4253|  1.82k|                            length=1;
 4254|  5.36M|                        } else {
 4255|       |                            /* change from double-byte mode to single-byte */
 4256|  5.36M|                            if (siLength == 1) {
  ------------------
  |  Branch (4256:33): [True: 5.36M, False: 0]
  ------------------
 4257|  5.36M|                                value|=(uint32_t)siBytes[0]<<8;
 4258|  5.36M|                                length = 2;
 4259|  5.36M|                            } else if (siLength == 2) {
  ------------------
  |  Branch (4259:40): [True: 0, False: 0]
  ------------------
 4260|      0|                                value|=(uint32_t)siBytes[1]<<8;
 4261|      0|                                value|=(uint32_t)siBytes[0]<<16;
 4262|      0|                                length = 3;
 4263|      0|                            }
 4264|  5.36M|                            prevLength=1;
 4265|  5.36M|                        }
 4266|  6.39M|                    } else {
 4267|  4.62M|                        if(prevLength==2) {
  ------------------
  |  Branch (4267:28): [True: 34.0k, False: 4.59M]
  ------------------
 4268|  34.0k|                            length=2;
 4269|  4.59M|                        } else {
 4270|       |                            /* change from single-byte mode to double-byte */
 4271|  4.59M|                            if (soLength == 1) {
  ------------------
  |  Branch (4271:33): [True: 4.59M, False: 0]
  ------------------
 4272|  4.59M|                                value|=(uint32_t)soBytes[0]<<16;
 4273|  4.59M|                                length = 3;
 4274|  4.59M|                            } else if (soLength == 2) {
  ------------------
  |  Branch (4274:40): [True: 0, False: 0]
  ------------------
 4275|      0|                                value|=(uint32_t)soBytes[1]<<16;
 4276|      0|                                value|=(uint32_t)soBytes[0]<<24;
 4277|      0|                                length = 4;
 4278|      0|                            }
 4279|  4.59M|                            prevLength=2;
 4280|  4.59M|                        }
 4281|  4.62M|                    }
 4282|  9.99M|                    break;
 4283|  9.99M|                case MBCS_OUTPUT_DBCS_ONLY:
  ------------------
  |  Branch (4283:17): [True: 8.30k, False: 23.6M]
  ------------------
 4284|       |                    /* table with single-byte results, but only DBCS mappings used */
 4285|  8.30k|                    value=((const uint16_t *)bytes)[value +(c&0x3f)];
 4286|  8.30k|                    if(value<=0xff) {
  ------------------
  |  Branch (4286:24): [True: 5.70k, False: 2.59k]
  ------------------
 4287|       |                        /* no mapping or SBCS result, not taken for DBCS-only */
 4288|  5.70k|                        goto unassigned;
 4289|  5.70k|                    } else {
 4290|  2.59k|                        length=2;
 4291|  2.59k|                    }
 4292|  2.59k|                    break;
 4293|  2.59k|                case MBCS_OUTPUT_3:
  ------------------
  |  Branch (4293:17): [True: 0, False: 23.6M]
  ------------------
 4294|      0|                    p=bytes+(value+(c&0x3f))*3;
 4295|      0|                    value=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2];
 4296|      0|                    if(value<=0xff) {
  ------------------
  |  Branch (4296:24): [True: 0, False: 0]
  ------------------
 4297|      0|                        if(value==0) {
  ------------------
  |  Branch (4297:28): [True: 0, False: 0]
  ------------------
 4298|      0|                            goto unassigned;
 4299|      0|                        } else {
 4300|      0|                            length=1;
 4301|      0|                        }
 4302|      0|                    } else if(value<=0xffff) {
  ------------------
  |  Branch (4302:31): [True: 0, False: 0]
  ------------------
 4303|      0|                        length=2;
 4304|      0|                    } else {
 4305|      0|                        length=3;
 4306|      0|                    }
 4307|      0|                    break;
 4308|   681k|                case MBCS_OUTPUT_4:
  ------------------
  |  Branch (4308:17): [True: 681k, False: 22.9M]
  ------------------
 4309|   681k|                    value=((const uint32_t *)bytes)[value +(c&0x3f)];
 4310|   681k|                    if(value<=0xff) {
  ------------------
  |  Branch (4310:24): [True: 648k, False: 33.3k]
  ------------------
 4311|   648k|                        if(value==0) {
  ------------------
  |  Branch (4311:28): [True: 648k, False: 0]
  ------------------
 4312|   648k|                            goto unassigned;
 4313|   648k|                        } else {
 4314|      0|                            length=1;
 4315|      0|                        }
 4316|   648k|                    } else if(value<=0xffff) {
  ------------------
  |  Branch (4316:31): [True: 25.4k, False: 7.86k]
  ------------------
 4317|  25.4k|                        length=2;
 4318|  25.4k|                    } else if(value<=0xffffff) {
  ------------------
  |  Branch (4318:31): [True: 0, False: 7.86k]
  ------------------
 4319|      0|                        length=3;
 4320|  7.86k|                    } else {
 4321|  7.86k|                        length=4;
 4322|  7.86k|                    }
 4323|  33.3k|                    break;
 4324|  33.3k|                case MBCS_OUTPUT_3_EUC:
  ------------------
  |  Branch (4324:17): [True: 801, False: 23.6M]
  ------------------
 4325|    801|                    value=((const uint16_t *)bytes)[value +(c&0x3f)];
 4326|       |                    /* EUC 16-bit fixed-length representation */
 4327|    801|                    if(value<=0xff) {
  ------------------
  |  Branch (4327:24): [True: 402, False: 399]
  ------------------
 4328|    402|                        if(value==0) {
  ------------------
  |  Branch (4328:28): [True: 207, False: 195]
  ------------------
 4329|    207|                            goto unassigned;
 4330|    207|                        } else {
 4331|    195|                            length=1;
 4332|    195|                        }
 4333|    402|                    } else if((value&0x8000)==0) {
  ------------------
  |  Branch (4333:31): [True: 0, False: 399]
  ------------------
 4334|      0|                        value|=0x8e8000;
 4335|      0|                        length=3;
 4336|    399|                    } else if((value&0x80)==0) {
  ------------------
  |  Branch (4336:31): [True: 200, False: 199]
  ------------------
 4337|    200|                        value|=0x8f0080;
 4338|    200|                        length=3;
 4339|    200|                    } else {
 4340|    199|                        length=2;
 4341|    199|                    }
 4342|    594|                    break;
 4343|  11.9M|                case MBCS_OUTPUT_4_EUC:
  ------------------
  |  Branch (4343:17): [True: 11.9M, False: 11.7M]
  ------------------
 4344|  11.9M|                    p=bytes+(value+(c&0x3f))*3;
 4345|  11.9M|                    value=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2];
 4346|       |                    /* EUC 16-bit fixed-length representation applied to the first two bytes */
 4347|  11.9M|                    if(value<=0xff) {
  ------------------
  |  Branch (4347:24): [True: 2.25k, False: 11.9M]
  ------------------
 4348|  2.25k|                        if(value==0) {
  ------------------
  |  Branch (4348:28): [True: 2.03k, False: 217]
  ------------------
 4349|  2.03k|                            goto unassigned;
 4350|  2.03k|                        } else {
 4351|    217|                            length=1;
 4352|    217|                        }
 4353|  11.9M|                    } else if(value<=0xffff) {
  ------------------
  |  Branch (4353:31): [True: 2.01k, False: 11.9M]
  ------------------
 4354|  2.01k|                        length=2;
 4355|  11.9M|                    } else if((value&0x800000)==0) {
  ------------------
  |  Branch (4355:31): [True: 11.9M, False: 0]
  ------------------
 4356|  11.9M|                        value|=0x8e800000;
 4357|  11.9M|                        length=4;
 4358|  11.9M|                    } else if((value&0x8000)==0) {
  ------------------
  |  Branch (4358:31): [True: 0, False: 0]
  ------------------
 4359|      0|                        value|=0x8f008000;
 4360|      0|                        length=4;
 4361|      0|                    } else {
 4362|      0|                        length=3;
 4363|      0|                    }
 4364|  11.9M|                    break;
 4365|  11.9M|                default:
  ------------------
  |  Branch (4365:17): [True: 0, False: 23.6M]
  ------------------
 4366|       |                    /* must not occur */
 4367|       |                    /*
 4368|       |                     * To avoid compiler warnings that value & length may be
 4369|       |                     * used without having been initialized, we set them here.
 4370|       |                     * In reality, this is unreachable code.
 4371|       |                     * Not having a default branch also causes warnings with
 4372|       |                     * some compilers.
 4373|       |                     */
 4374|      0|                    value=0;
 4375|      0|                    length=0;
 4376|      0|                    break;
 4377|  23.6M|                }
 4378|       |                /* output the value */
 4379|  23.6M|            } else {
 4380|       |                /*
 4381|       |                 * This also tests if the codepage maps single surrogates.
 4382|       |                 * If it does, then surrogates are not paired but mapped separately.
 4383|       |                 * Note that in this case unmatched surrogates are not detected.
 4384|       |                 */
 4385|  27.8k|                if(U16_IS_SURROGATE(c) && !(unicodeMask&UCNV_HAS_SURROGATES)) {
  ------------------
  |  |   75|  27.8k|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  55.7k|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 6.19k, False: 21.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                              if(U16_IS_SURROGATE(c) && !(unicodeMask&UCNV_HAS_SURROGATES)) {
  ------------------
  |  |   65|  6.19k|#define UCNV_HAS_SURROGATES    2
  ------------------
  |  Branch (4385:43): [True: 6.19k, False: 0]
  ------------------
 4386|  6.19k|                    if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|  6.19k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 2.63k, False: 3.56k]
  |  |  ------------------
  ------------------
 4387|  2.63k|getTrail:
 4388|  2.63k|                        if(source<sourceLimit) {
  ------------------
  |  Branch (4388:28): [True: 2.61k, False: 13]
  ------------------
 4389|       |                            /* test the following code unit */
 4390|  2.61k|                            char16_t trail=*source;
 4391|  2.61k|                            if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  2.61k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 621, False: 1.99k]
  |  |  ------------------
  ------------------
 4392|    621|                                ++source;
 4393|    621|                                ++nextSourceIndex;
 4394|    621|                                c=U16_GET_SUPPLEMENTARY(c, trail);
  ------------------
  |  |  113|    621|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|    621|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 4395|    621|                                if(!(unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
  ------------------
  |  |   64|    621|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (4395:36): [True: 292, False: 329]
  ------------------
 4396|       |                                    /* BMP-only codepages are stored without stage 1 entries for supplementary code points */
 4397|    292|                                    cnv->fromUnicodeStatus=prevLength; /* save the old state */
 4398|       |                                    /* callback(unassigned) */
 4399|    292|                                    goto unassigned;
 4400|    292|                                }
 4401|       |                                /* convert this supplementary code point */
 4402|       |                                /* exit this condition tree */
 4403|  1.99k|                            } else {
 4404|       |                                /* this is an unmatched lead code unit (1st surrogate) */
 4405|       |                                /* callback(illegal) */
 4406|  1.99k|                                *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 4407|  1.99k|                                break;
 4408|  1.99k|                            }
 4409|  2.61k|                        } else {
 4410|       |                            /* no more input */
 4411|     13|                            break;
 4412|     13|                        }
 4413|  3.56k|                    } else {
 4414|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
 4415|       |                        /* callback(illegal) */
 4416|  3.56k|                        *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 4417|  3.56k|                        break;
 4418|  3.56k|                    }
 4419|  6.19k|                }
 4420|       |
 4421|       |                /* convert the Unicode code point in c into codepage bytes */
 4422|       |
 4423|       |                /*
 4424|       |                 * The basic lookup is a triple-stage compact array (trie) lookup.
 4425|       |                 * For details see the beginning of this file.
 4426|       |                 *
 4427|       |                 * Single-byte codepages are handled with a different data structure
 4428|       |                 * by _MBCSSingle... functions.
 4429|       |                 *
 4430|       |                 * The result consists of a 32-bit value from stage 2 and
 4431|       |                 * a pointer to as many bytes as are stored per character.
 4432|       |                 * The pointer points to the character's bytes in stage 3.
 4433|       |                 * Bits 15..0 of the stage 2 entry contain the stage 3 index
 4434|       |                 * for that pointer, while bits 31..16 are flags for which of
 4435|       |                 * the 16 characters in the block are roundtrip-assigned.
 4436|       |                 *
 4437|       |                 * For 2-byte and 4-byte codepages, the bytes are stored as uint16_t
 4438|       |                 * respectively as uint32_t, in the platform encoding.
 4439|       |                 * For 3-byte codepages, the bytes are always stored in big-endian order.
 4440|       |                 *
 4441|       |                 * For EUC encodings that use only either 0x8e or 0x8f as the first
 4442|       |                 * byte of their longest byte sequences, the first two bytes in
 4443|       |                 * this third stage indicate with their 7th bits whether these bytes
 4444|       |                 * are to be written directly or actually need to be preceded by
 4445|       |                 * one of the two Single-Shift codes. With this, the third stage
 4446|       |                 * stores one byte fewer per character than the actual maximum length of
 4447|       |                 * EUC byte sequences.
 4448|       |                 *
 4449|       |                 * Other than that, leading zero bytes are removed and the other
 4450|       |                 * bytes output. A single zero byte may be output if the "assigned"
 4451|       |                 * bit in stage 2 was on.
 4452|       |                 * The data structure does not support zero byte output as a fallback,
 4453|       |                 * and also does not allow output of leading zeros.
 4454|       |                 */
 4455|  22.0k|                stage2Entry=MBCS_STAGE_2_FROM_U(table, c);
  ------------------
  |  |  308|  22.0k|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 4456|       |
 4457|       |                /* get the bytes and the length for the output */
 4458|  22.0k|                switch(outputType) {
 4459|      0|                case MBCS_OUTPUT_2:
  ------------------
  |  Branch (4459:17): [True: 0, False: 22.0k]
  ------------------
 4460|      0|                    value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  311|      0|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 4461|      0|                    if(value<=0xff) {
  ------------------
  |  Branch (4461:24): [True: 0, False: 0]
  ------------------
 4462|      0|                        length=1;
 4463|      0|                    } else {
 4464|      0|                        length=2;
 4465|      0|                    }
 4466|      0|                    break;
 4467|  7.93k|                case MBCS_OUTPUT_2_SISO:
  ------------------
  |  Branch (4467:17): [True: 7.93k, False: 14.0k]
  ------------------
 4468|       |                    /* 1/2-byte stateful with Shift-In/Shift-Out */
 4469|       |                    /*
 4470|       |                     * Save the old state in the converter object
 4471|       |                     * right here, then change the local prevLength state variable if necessary.
 4472|       |                     * Then, if this character turns out to be unassigned or a fallback that
 4473|       |                     * is not taken, the callback code must not save the new state in the converter
 4474|       |                     * because the new state is for a character that is not output.
 4475|       |                     * However, the callback must still restore the state from the converter
 4476|       |                     * in case the callback function changed it for its output.
 4477|       |                     */
 4478|  7.93k|                    cnv->fromUnicodeStatus=prevLength; /* save the old state */
 4479|  7.93k|                    value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  311|  7.93k|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 4480|  7.93k|                    if(value<=0xff) {
  ------------------
  |  Branch (4480:24): [True: 6.66k, False: 1.27k]
  ------------------
 4481|  6.66k|                        if(value==0 && MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c)==0) {
  ------------------
  |  |  309|  6.26k|#define MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ( ((stage2Entry) & ((uint32_t)1<< (16+((c)&0xf)) )) !=0)
  ------------------
  |  Branch (4481:28): [True: 6.26k, False: 408]
  |  Branch (4481:40): [True: 6.26k, False: 0]
  ------------------
 4482|       |                            /* no mapping, leave value==0 */
 4483|  6.26k|                            length=0;
 4484|  6.26k|                        } else if(prevLength<=1) {
  ------------------
  |  Branch (4484:35): [True: 195, False: 213]
  ------------------
 4485|    195|                            length=1;
 4486|    213|                        } else {
 4487|       |                            /* change from double-byte mode to single-byte */
 4488|    213|                            if (siLength == 1) {
  ------------------
  |  Branch (4488:33): [True: 213, False: 0]
  ------------------
 4489|    213|                                value|=(uint32_t)siBytes[0]<<8;
 4490|    213|                                length = 2;
 4491|    213|                            } else if (siLength == 2) {
  ------------------
  |  Branch (4491:40): [True: 0, False: 0]
  ------------------
 4492|      0|                                value|=(uint32_t)siBytes[1]<<8;
 4493|      0|                                value|=(uint32_t)siBytes[0]<<16;
 4494|      0|                                length = 3;
 4495|      0|                            }
 4496|    213|                            prevLength=1;
 4497|    213|                        }
 4498|  6.66k|                    } else {
 4499|  1.27k|                        if(prevLength==2) {
  ------------------
  |  Branch (4499:28): [True: 1.06k, False: 209]
  ------------------
 4500|  1.06k|                            length=2;
 4501|  1.06k|                        } else {
 4502|       |                            /* change from single-byte mode to double-byte */
 4503|    209|                            if (soLength == 1) {
  ------------------
  |  Branch (4503:33): [True: 209, False: 0]
  ------------------
 4504|    209|                                value|=(uint32_t)soBytes[0]<<16;
 4505|    209|                                length = 3;
 4506|    209|                            } else if (soLength == 2) {
  ------------------
  |  Branch (4506:40): [True: 0, False: 0]
  ------------------
 4507|      0|                                value|=(uint32_t)soBytes[1]<<16;
 4508|      0|                                value|=(uint32_t)soBytes[0]<<24;
 4509|      0|                                length = 4;
 4510|      0|                            }
 4511|    209|                            prevLength=2;
 4512|    209|                        }
 4513|  1.27k|                    }
 4514|  7.93k|                    break;
 4515|    917|                case MBCS_OUTPUT_DBCS_ONLY:
  ------------------
  |  Branch (4515:17): [True: 917, False: 21.0k]
  ------------------
 4516|       |                    /* table with single-byte results, but only DBCS mappings used */
 4517|    917|                    value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  311|    917|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 4518|    917|                    if(value<=0xff) {
  ------------------
  |  Branch (4518:24): [True: 572, False: 345]
  ------------------
 4519|       |                        /* no mapping or SBCS result, not taken for DBCS-only */
 4520|    572|                        value=stage2Entry=0; /* stage2Entry=0 to reset roundtrip flags */
 4521|    572|                        length=0;
 4522|    572|                    } else {
 4523|    345|                        length=2;
 4524|    345|                    }
 4525|    917|                    break;
 4526|      0|                case MBCS_OUTPUT_3:
  ------------------
  |  Branch (4526:17): [True: 0, False: 22.0k]
  ------------------
 4527|      0|                    p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  314|      0|#define MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c) ((bytes)+(16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf))*3)
  ------------------
 4528|      0|                    value=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2];
 4529|      0|                    if(value<=0xff) {
  ------------------
  |  Branch (4529:24): [True: 0, False: 0]
  ------------------
 4530|      0|                        length=1;
 4531|      0|                    } else if(value<=0xffff) {
  ------------------
  |  Branch (4531:31): [True: 0, False: 0]
  ------------------
 4532|      0|                        length=2;
 4533|      0|                    } else {
 4534|      0|                        length=3;
 4535|      0|                    }
 4536|      0|                    break;
 4537|  10.7k|                case MBCS_OUTPUT_4:
  ------------------
  |  Branch (4537:17): [True: 10.7k, False: 11.2k]
  ------------------
 4538|  10.7k|                    value=MBCS_VALUE_4_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  312|  10.7k|#define MBCS_VALUE_4_FROM_STAGE_2(bytes, stage2Entry, c) ((uint32_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 4539|  10.7k|                    if(value<=0xff) {
  ------------------
  |  Branch (4539:24): [True: 7.07k, False: 3.66k]
  ------------------
 4540|  7.07k|                        length=1;
 4541|  7.07k|                    } else if(value<=0xffff) {
  ------------------
  |  Branch (4541:31): [True: 2.73k, False: 932]
  ------------------
 4542|  2.73k|                        length=2;
 4543|  2.73k|                    } else if(value<=0xffffff) {
  ------------------
  |  Branch (4543:31): [True: 0, False: 932]
  ------------------
 4544|      0|                        length=3;
 4545|    932|                    } else {
 4546|    932|                        length=4;
 4547|    932|                    }
 4548|  10.7k|                    break;
 4549|    719|                case MBCS_OUTPUT_3_EUC:
  ------------------
  |  Branch (4549:17): [True: 719, False: 21.2k]
  ------------------
 4550|    719|                    value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  311|    719|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 4551|       |                    /* EUC 16-bit fixed-length representation */
 4552|    719|                    if(value<=0xff) {
  ------------------
  |  Branch (4552:24): [True: 325, False: 394]
  ------------------
 4553|    325|                        length=1;
 4554|    394|                    } else if((value&0x8000)==0) {
  ------------------
  |  Branch (4554:31): [True: 0, False: 394]
  ------------------
 4555|      0|                        value|=0x8e8000;
 4556|      0|                        length=3;
 4557|    394|                    } else if((value&0x80)==0) {
  ------------------
  |  Branch (4557:31): [True: 198, False: 196]
  ------------------
 4558|    198|                        value|=0x8f0080;
 4559|    198|                        length=3;
 4560|    198|                    } else {
 4561|    196|                        length=2;
 4562|    196|                    }
 4563|    719|                    break;
 4564|  1.69k|                case MBCS_OUTPUT_4_EUC:
  ------------------
  |  Branch (4564:17): [True: 1.69k, False: 20.3k]
  ------------------
 4565|  1.69k|                    p=MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  314|  1.69k|#define MBCS_POINTER_3_FROM_STAGE_2(bytes, stage2Entry, c) ((bytes)+(16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf))*3)
  ------------------
 4566|  1.69k|                    value=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2];
 4567|       |                    /* EUC 16-bit fixed-length representation applied to the first two bytes */
 4568|  1.69k|                    if(value<=0xff) {
  ------------------
  |  Branch (4568:24): [True: 989, False: 705]
  ------------------
 4569|    989|                        length=1;
 4570|    989|                    } else if(value<=0xffff) {
  ------------------
  |  Branch (4570:31): [True: 195, False: 510]
  ------------------
 4571|    195|                        length=2;
 4572|    510|                    } else if((value&0x800000)==0) {
  ------------------
  |  Branch (4572:31): [True: 510, False: 0]
  ------------------
 4573|    510|                        value|=0x8e800000;
 4574|    510|                        length=4;
 4575|    510|                    } else if((value&0x8000)==0) {
  ------------------
  |  Branch (4575:31): [True: 0, False: 0]
  ------------------
 4576|      0|                        value|=0x8f008000;
 4577|      0|                        length=4;
 4578|      0|                    } else {
 4579|      0|                        length=3;
 4580|      0|                    }
 4581|  1.69k|                    break;
 4582|      0|                default:
  ------------------
  |  Branch (4582:17): [True: 0, False: 22.0k]
  ------------------
 4583|       |                    /* must not occur */
 4584|       |                    /*
 4585|       |                     * To avoid compiler warnings that value & length may be
 4586|       |                     * used without having been initialized, we set them here.
 4587|       |                     * In reality, this is unreachable code.
 4588|       |                     * Not having a default branch also causes warnings with
 4589|       |                     * some compilers.
 4590|       |                     */
 4591|      0|                    value=stage2Entry=0; /* stage2Entry=0 to reset roundtrip flags */
 4592|      0|                    length=0;
 4593|      0|                    break;
 4594|  22.0k|                }
 4595|       |
 4596|       |                /* is this code point assigned, or do we use fallbacks? */
 4597|  22.0k|                if(!(MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c)!=0 ||
  ------------------
  |  |  309|  22.0k|#define MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ( ((stage2Entry) & ((uint32_t)1<< (16+((c)&0xf)) )) !=0)
  ------------------
  |  Branch (4597:22): [True: 6.54k, False: 15.4k]
  ------------------
 4598|  22.0k|                     (UCNV_FROM_U_USE_FALLBACK(cnv, c) && value!=0))
  ------------------
  |  |  276|  15.4k|#define UCNV_FROM_U_USE_FALLBACK(cnv, c) FROM_U_USE_FALLBACK((cnv)->useFallback, c)
  |  |  ------------------
  |  |  |  |  275|  30.9k|#define FROM_U_USE_FALLBACK(useFallback, c) ((useFallback) || IS_PRIVATE_USE(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  274|  15.4k|#define IS_PRIVATE_USE(c) ((uint32_t)((c)-0xe000)<0x1900 || (uint32_t)((c)-0xf0000)<0x20000)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (274:28): [True: 6.86k, False: 8.59k]
  |  |  |  |  |  |  |  Branch (274:61): [True: 216, False: 8.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (275:46): [True: 0, False: 15.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4598:59): [True: 238, False: 6.83k]
  ------------------
 4599|  22.0k|                ) {
 4600|       |                    /*
 4601|       |                     * We allow a 0 byte output if the "assigned" bit is set for this entry.
 4602|       |                     * There is no way with this data structure for fallback output
 4603|       |                     * to be a zero byte.
 4604|       |                     */
 4605|       |
 4606|  1.69M|unassigned:
 4607|       |                    /* try an extension mapping */
 4608|  1.69M|                    pArgs->source=source;
 4609|  1.69M|                    c=_extFromU(cnv, cnv->sharedData,
 4610|  1.69M|                                c, &source, sourceLimit,
 4611|  1.69M|                                &target, target+targetCapacity,
 4612|  1.69M|                                &offsets, sourceIndex,
 4613|  1.69M|                                pArgs->flush,
 4614|  1.69M|                                pErrorCode);
 4615|  1.69M|                    nextSourceIndex+=(int32_t)(source-pArgs->source);
 4616|  1.69M|                    prevLength=cnv->fromUnicodeStatus; /* restore SISO state */
 4617|       |
 4618|  1.69M|                    if(U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (4618:24): [True: 1.00M, False: 689k]
  ------------------
 4619|       |                        /* not mappable or buffer overflow */
 4620|  1.00M|                        break;
 4621|  1.00M|                    } else {
 4622|       |                        /* a mapping was written to the target, continue */
 4623|       |
 4624|       |                        /* recalculate the targetCapacity after an extension mapping */
 4625|   689k|                        targetCapacity=(int32_t)(pArgs->targetLimit-(char *)target);
 4626|       |
 4627|       |                        /* normal end of conversion: prepare for a new character */
 4628|   689k|                        if(offsets!=nullptr) {
  ------------------
  |  Branch (4628:28): [True: 0, False: 689k]
  ------------------
 4629|      0|                            prevSourceIndex=sourceIndex;
 4630|      0|                            sourceIndex=nextSourceIndex;
 4631|      0|                        }
 4632|   689k|                        continue;
 4633|   689k|                    }
 4634|  1.69M|                }
 4635|  22.0k|            }
 4636|       |
 4637|       |            /* write the output character bytes from value and length */
 4638|       |            /* from the first if in the loop we know that targetCapacity>0 */
 4639|  22.0M|            if(length<=targetCapacity) {
  ------------------
  |  Branch (4639:16): [True: 22.0M, False: 657]
  ------------------
 4640|  22.0M|                if(offsets==nullptr) {
  ------------------
  |  Branch (4640:20): [True: 22.0M, False: 0]
  ------------------
 4641|  22.0M|                    switch(length) {
 4642|       |                        /* each branch falls through to the next one */
 4643|  11.9M|                    case 4:
  ------------------
  |  Branch (4643:21): [True: 11.9M, False: 10.0M]
  ------------------
 4644|  11.9M|                        *target++=(uint8_t)(value>>24);
 4645|  11.9M|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  11.9M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4646|  16.5M|                    case 3:
  ------------------
  |  Branch (4646:21): [True: 4.59M, False: 17.4M]
  ------------------
 4647|  16.5M|                        *target++=(uint8_t)(value>>16);
 4648|  16.5M|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  16.5M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4649|  22.0M|                    case 2:
  ------------------
  |  Branch (4649:21): [True: 5.43M, False: 16.5M]
  ------------------
 4650|  22.0M|                        *target++=(uint8_t)(value>>8);
 4651|  22.0M|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  22.0M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4652|  22.0M|                    case 1:
  ------------------
  |  Branch (4652:21): [True: 2.42k, False: 22.0M]
  ------------------
 4653|  22.0M|                        *target++=(uint8_t)value;
 4654|  22.0M|                        U_FALLTHROUGH;
  ------------------
  |  |  511|  22.0M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4655|  22.0M|                    default:
  ------------------
  |  Branch (4655:21): [True: 0, False: 22.0M]
  ------------------
 4656|       |                        /* will never occur */
 4657|  22.0M|                        break;
 4658|  22.0M|                    }
 4659|  22.0M|                } else {
 4660|      0|                    switch(length) {
 4661|       |                        /* each branch falls through to the next one */
 4662|      0|                    case 4:
  ------------------
  |  Branch (4662:21): [True: 0, False: 0]
  ------------------
 4663|      0|                        *target++=(uint8_t)(value>>24);
 4664|      0|                        *offsets++=sourceIndex;
 4665|      0|                        U_FALLTHROUGH;
  ------------------
  |  |  511|      0|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4666|      0|                    case 3:
  ------------------
  |  Branch (4666:21): [True: 0, False: 0]
  ------------------
 4667|      0|                        *target++=(uint8_t)(value>>16);
 4668|      0|                        *offsets++=sourceIndex;
 4669|      0|                        U_FALLTHROUGH;
  ------------------
  |  |  511|      0|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4670|      0|                    case 2:
  ------------------
  |  Branch (4670:21): [True: 0, False: 0]
  ------------------
 4671|      0|                        *target++=(uint8_t)(value>>8);
 4672|      0|                        *offsets++=sourceIndex;
 4673|      0|                        U_FALLTHROUGH;
  ------------------
  |  |  511|      0|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4674|      0|                    case 1:
  ------------------
  |  Branch (4674:21): [True: 0, False: 0]
  ------------------
 4675|      0|                        *target++=(uint8_t)value;
 4676|      0|                        *offsets++=sourceIndex;
 4677|      0|                        U_FALLTHROUGH;
  ------------------
  |  |  511|      0|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4678|      0|                    default:
  ------------------
  |  Branch (4678:21): [True: 0, False: 0]
  ------------------
 4679|       |                        /* will never occur */
 4680|      0|                        break;
 4681|      0|                    }
 4682|      0|                }
 4683|  22.0M|                targetCapacity-=length;
 4684|  22.0M|            } else {
 4685|    657|                uint8_t *charErrorBuffer;
 4686|       |
 4687|       |                /*
 4688|       |                 * We actually do this backwards here:
 4689|       |                 * In order to save an intermediate variable, we output
 4690|       |                 * first to the overflow buffer what does not fit into the
 4691|       |                 * regular target.
 4692|       |                 */
 4693|       |                /* we know that 1<=targetCapacity<length<=4 */
 4694|    657|                length-=targetCapacity;
 4695|    657|                charErrorBuffer=(uint8_t *)cnv->charErrorBuffer;
 4696|    657|                switch(length) {
 4697|       |                    /* each branch falls through to the next one */
 4698|    194|                case 3:
  ------------------
  |  Branch (4698:17): [True: 194, False: 463]
  ------------------
 4699|    194|                    *charErrorBuffer++=(uint8_t)(value>>16);
 4700|    194|                    U_FALLTHROUGH;
  ------------------
  |  |  511|    194|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4701|    409|                case 2:
  ------------------
  |  Branch (4701:17): [True: 215, False: 442]
  ------------------
 4702|    409|                    *charErrorBuffer++=(uint8_t)(value>>8);
 4703|    409|                    U_FALLTHROUGH;
  ------------------
  |  |  511|    409|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4704|    657|                case 1:
  ------------------
  |  Branch (4704:17): [True: 248, False: 409]
  ------------------
 4705|    657|                    *charErrorBuffer=(uint8_t)value;
 4706|    657|                    U_FALLTHROUGH;
  ------------------
  |  |  511|    657|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4707|    657|                default:
  ------------------
  |  Branch (4707:17): [True: 0, False: 657]
  ------------------
 4708|       |                    /* will never occur */
 4709|    657|                    break;
 4710|    657|                }
 4711|    657|                cnv->charErrorBufferLength=(int8_t)length;
 4712|       |
 4713|       |                /* now output what fits into the regular target */
 4714|    657|                value>>=8*length; /* length was reduced by targetCapacity */
 4715|    657|                switch(targetCapacity) {
 4716|       |                    /* each branch falls through to the next one */
 4717|    194|                case 3:
  ------------------
  |  Branch (4717:17): [True: 194, False: 463]
  ------------------
 4718|    194|                    *target++=(uint8_t)(value>>16);
 4719|    194|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (4719:24): [True: 0, False: 194]
  ------------------
 4720|      0|                        *offsets++=sourceIndex;
 4721|      0|                    }
 4722|    194|                    U_FALLTHROUGH;
  ------------------
  |  |  511|    194|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4723|    411|                case 2:
  ------------------
  |  Branch (4723:17): [True: 217, False: 440]
  ------------------
 4724|    411|                    *target++=(uint8_t)(value>>8);
 4725|    411|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (4725:24): [True: 0, False: 411]
  ------------------
 4726|      0|                        *offsets++=sourceIndex;
 4727|      0|                    }
 4728|    411|                    U_FALLTHROUGH;
  ------------------
  |  |  511|    411|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4729|    657|                case 1:
  ------------------
  |  Branch (4729:17): [True: 246, False: 411]
  ------------------
 4730|    657|                    *target++=(uint8_t)value;
 4731|    657|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (4731:24): [True: 0, False: 657]
  ------------------
 4732|      0|                        *offsets++=sourceIndex;
 4733|      0|                    }
 4734|    657|                    U_FALLTHROUGH;
  ------------------
  |  |  511|    657|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 4735|    657|                default:
  ------------------
  |  Branch (4735:17): [True: 0, False: 657]
  ------------------
 4736|       |                    /* will never occur */
 4737|    657|                    break;
 4738|    657|                }
 4739|       |
 4740|       |                /* target overflow */
 4741|    657|                targetCapacity=0;
 4742|    657|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 4743|    657|                c=0;
 4744|    657|                break;
 4745|    657|            }
 4746|       |
 4747|       |            /* normal end of conversion: prepare for a new character */
 4748|  22.0M|            c=0;
 4749|  22.0M|            if(offsets!=nullptr) {
  ------------------
  |  Branch (4749:16): [True: 0, False: 22.0M]
  ------------------
 4750|      0|                prevSourceIndex=sourceIndex;
 4751|      0|                sourceIndex=nextSourceIndex;
 4752|      0|            }
 4753|  22.0M|            continue;
 4754|  22.0M|        } else {
 4755|       |            /* target is full */
 4756|    480|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 4757|    480|            break;
 4758|    480|        }
 4759|  23.9M|    }
 4760|       |
 4761|       |    /*
 4762|       |     * the end of the input stream and detection of truncated input
 4763|       |     * are handled by the framework, but for EBCDIC_STATEFUL conversion
 4764|       |     * we need to emit an SI at the very end
 4765|       |     *
 4766|       |     * conditions:
 4767|       |     *   successful
 4768|       |     *   EBCDIC_STATEFUL in DBCS mode
 4769|       |     *   end of input and no truncated input
 4770|       |     */
 4771|  1.01M|    if( U_SUCCESS(*pErrorCode) &&
  ------------------
  |  Branch (4771:9): [True: 714, False: 1.00M]
  ------------------
 4772|  1.01M|        outputType==MBCS_OUTPUT_2_SISO && prevLength==2 &&
  ------------------
  |  Branch (4772:9): [True: 254, False: 460]
  |  Branch (4772:43): [True: 145, False: 109]
  ------------------
 4773|  1.01M|        pArgs->flush && source>=sourceLimit && c==0
  ------------------
  |  Branch (4773:9): [True: 145, False: 0]
  |  Branch (4773:25): [True: 145, False: 0]
  |  Branch (4773:48): [True: 136, False: 9]
  ------------------
 4774|  1.01M|    ) {
 4775|       |        /* EBCDIC_STATEFUL ending with DBCS: emit an SI to return the output stream to SBCS */
 4776|    136|        if(targetCapacity>0) {
  ------------------
  |  Branch (4776:12): [True: 135, False: 1]
  ------------------
 4777|    135|            *target++ = siBytes[0];
 4778|    135|            if (siLength == 2) {
  ------------------
  |  Branch (4778:17): [True: 0, False: 135]
  ------------------
 4779|      0|                if (targetCapacity<2) {
  ------------------
  |  Branch (4779:21): [True: 0, False: 0]
  ------------------
 4780|      0|                    cnv->charErrorBuffer[0] = siBytes[1];
 4781|      0|                    cnv->charErrorBufferLength=1;
 4782|      0|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 4783|      0|                } else {
 4784|      0|                    *target++ = siBytes[1];
 4785|      0|                }
 4786|      0|            }
 4787|    135|            if(offsets!=nullptr) {
  ------------------
  |  Branch (4787:16): [True: 0, False: 135]
  ------------------
 4788|       |                /* set the last source character's index (sourceIndex points at sourceLimit now) */
 4789|      0|                *offsets++=prevSourceIndex;
 4790|      0|            }
 4791|    135|        } else {
 4792|       |            /* target is full */
 4793|      1|            cnv->charErrorBuffer[0] = siBytes[0];
 4794|      1|            if (siLength == 2) {
  ------------------
  |  Branch (4794:17): [True: 0, False: 1]
  ------------------
 4795|      0|                cnv->charErrorBuffer[1] = siBytes[1];
 4796|      0|            }
 4797|      1|            cnv->charErrorBufferLength=siLength;
 4798|      1|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 4799|      1|        }
 4800|    136|        prevLength=1; /* we switched into SBCS */
 4801|    136|    }
 4802|       |
 4803|       |    /* set the converter state back into UConverter */
 4804|  1.01M|    cnv->fromUChar32=c;
 4805|  1.01M|    cnv->fromUnicodeStatus=prevLength;
 4806|       |
 4807|       |    /* write back the updated pointers */
 4808|  1.01M|    pArgs->source=source;
 4809|  1.01M|    pArgs->target=(char *)target;
 4810|  1.01M|    pArgs->offsets=offsets;
 4811|  1.01M|}
ucnv_MBCSFromUChar32_78:
 4833|  58.8M|                 UBool useFallback) {
 4834|  58.8M|    const int32_t *cx;
 4835|  58.8M|    const uint16_t *table;
 4836|       |#if 0
 4837|       |/* #if 0 because this is not currently used in ICU - reduce code, increase code coverage */
 4838|       |    const uint8_t *p;
 4839|       |#endif
 4840|  58.8M|    uint32_t stage2Entry;
 4841|  58.8M|    uint32_t value;
 4842|  58.8M|    int32_t length;
 4843|       |
 4844|       |    /* BMP-only codepages are stored without stage 1 entries for supplementary code points */
 4845|  58.8M|    if(c<=0xffff || (sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
  ------------------
  |  |   64|  9.53k|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (4845:8): [True: 58.7M, False: 9.53k]
  |  Branch (4845:21): [True: 0, False: 9.53k]
  ------------------
 4846|  58.7M|        table=sharedData->mbcs.fromUnicodeTable;
 4847|       |
 4848|       |        /* convert the Unicode code point in c into codepage bytes (same as in _MBCSFromUnicodeWithOffsets) */
 4849|  58.7M|        if(sharedData->mbcs.outputType==MBCS_OUTPUT_1) {
  ------------------
  |  Branch (4849:12): [True: 16.6M, False: 42.1M]
  ------------------
 4850|  16.6M|            value=MBCS_SINGLE_RESULT_FROM_U(table, (uint16_t *)sharedData->mbcs.fromUnicodeBytes, c);
  ------------------
  |  |  299|  16.6M|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
 4851|       |            /* is this code point assigned, or do we use fallbacks? */
 4852|  16.6M|            if(useFallback ? value>=0x800 : value>=0xc00) {
  ------------------
  |  Branch (4852:16): [True: 0, False: 16.6M]
  |  Branch (4852:16): [True: 37.8k, False: 16.6M]
  ------------------
 4853|  37.8k|                *pValue=value&0xff;
 4854|  37.8k|                return 1;
 4855|  37.8k|            }
 4856|  42.1M|        } else /* outputType!=MBCS_OUTPUT_1 */ {
 4857|  42.1M|            stage2Entry=MBCS_STAGE_2_FROM_U(table, c);
  ------------------
  |  |  308|  42.1M|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 4858|       |
 4859|       |            /* get the bytes and the length for the output */
 4860|  42.1M|            switch(sharedData->mbcs.outputType) {
 4861|  42.0M|            case MBCS_OUTPUT_2:
  ------------------
  |  Branch (4861:13): [True: 42.0M, False: 90.3k]
  ------------------
 4862|  42.0M|                value=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
  ------------------
  |  |  311|  42.0M|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 4863|  42.0M|                if(value<=0xff) {
  ------------------
  |  Branch (4863:20): [True: 3.79M, False: 38.2M]
  ------------------
 4864|  3.79M|                    length=1;
 4865|  38.2M|                } else {
 4866|  38.2M|                    length=2;
 4867|  38.2M|                }
 4868|  42.0M|                break;
 4869|       |#if 0
 4870|       |/* #if 0 because this is not currently used in ICU - reduce code, increase code coverage */
 4871|       |            case MBCS_OUTPUT_DBCS_ONLY:
 4872|       |                /* table with single-byte results, but only DBCS mappings used */
 4873|       |                value=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
 4874|       |                if(value<=0xff) {
 4875|       |                    /* no mapping or SBCS result, not taken for DBCS-only */
 4876|       |                    value=stage2Entry=0; /* stage2Entry=0 to reset roundtrip flags */
 4877|       |                    length=0;
 4878|       |                } else {
 4879|       |                    length=2;
 4880|       |                }
 4881|       |                break;
 4882|       |            case MBCS_OUTPUT_3:
 4883|       |                p=MBCS_POINTER_3_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
 4884|       |                value=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2];
 4885|       |                if(value<=0xff) {
 4886|       |                    length=1;
 4887|       |                } else if(value<=0xffff) {
 4888|       |                    length=2;
 4889|       |                } else {
 4890|       |                    length=3;
 4891|       |                }
 4892|       |                break;
 4893|       |            case MBCS_OUTPUT_4:
 4894|       |                value=MBCS_VALUE_4_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
 4895|       |                if(value<=0xff) {
 4896|       |                    length=1;
 4897|       |                } else if(value<=0xffff) {
 4898|       |                    length=2;
 4899|       |                } else if(value<=0xffffff) {
 4900|       |                    length=3;
 4901|       |                } else {
 4902|       |                    length=4;
 4903|       |                }
 4904|       |                break;
 4905|       |            case MBCS_OUTPUT_3_EUC:
 4906|       |                value=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
 4907|       |                /* EUC 16-bit fixed-length representation */
 4908|       |                if(value<=0xff) {
 4909|       |                    length=1;
 4910|       |                } else if((value&0x8000)==0) {
 4911|       |                    value|=0x8e8000;
 4912|       |                    length=3;
 4913|       |                } else if((value&0x80)==0) {
 4914|       |                    value|=0x8f0080;
 4915|       |                    length=3;
 4916|       |                } else {
 4917|       |                    length=2;
 4918|       |                }
 4919|       |                break;
 4920|       |            case MBCS_OUTPUT_4_EUC:
 4921|       |                p=MBCS_POINTER_3_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
 4922|       |                value=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2];
 4923|       |                /* EUC 16-bit fixed-length representation applied to the first two bytes */
 4924|       |                if(value<=0xff) {
 4925|       |                    length=1;
 4926|       |                } else if(value<=0xffff) {
 4927|       |                    length=2;
 4928|       |                } else if((value&0x800000)==0) {
 4929|       |                    value|=0x8e800000;
 4930|       |                    length=4;
 4931|       |                } else if((value&0x8000)==0) {
 4932|       |                    value|=0x8f008000;
 4933|       |                    length=4;
 4934|       |                } else {
 4935|       |                    length=3;
 4936|       |                }
 4937|       |                break;
 4938|       |#endif
 4939|  90.3k|            default:
  ------------------
  |  Branch (4939:13): [True: 90.3k, False: 42.0M]
  ------------------
 4940|       |                /* must not occur */
 4941|  90.3k|                return -1;
 4942|  42.1M|            }
 4943|       |
 4944|       |            /* is this code point assigned, or do we use fallbacks? */
 4945|  42.0M|            if( MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ||
  ------------------
  |  |  309|  84.0M|#define MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ( ((stage2Entry) & ((uint32_t)1<< (16+((c)&0xf)) )) !=0)
  |  |  ------------------
  |  |  |  Branch (309:50): [True: 38.2M, False: 3.79M]
  |  |  ------------------
  ------------------
 4946|  42.0M|                (FROM_U_USE_FALLBACK(useFallback, c) && value!=0)
  ------------------
  |  |  275|  7.58M|#define FROM_U_USE_FALLBACK(useFallback, c) ((useFallback) || IS_PRIVATE_USE(c))
  |  |  ------------------
  |  |  |  |  274|  3.79M|#define IS_PRIVATE_USE(c) ((uint32_t)((c)-0xe000)<0x1900 || (uint32_t)((c)-0xf0000)<0x20000)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (274:28): [True: 48.1k, False: 3.74M]
  |  |  |  |  |  Branch (274:61): [True: 0, False: 3.74M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (275:46): [True: 0, False: 3.79M]
  |  |  ------------------
  ------------------
  |  Branch (4946:57): [True: 0, False: 48.1k]
  ------------------
 4947|  42.0M|            ) {
 4948|       |                /*
 4949|       |                 * We allow a 0 byte output if the "assigned" bit is set for this entry.
 4950|       |                 * There is no way with this data structure for fallback output
 4951|       |                 * to be a zero byte.
 4952|       |                 */
 4953|       |                /* assigned */
 4954|  38.2M|                *pValue=value;
 4955|  38.2M|                return length;
 4956|  38.2M|            }
 4957|  42.0M|        }
 4958|  58.7M|    }
 4959|       |
 4960|  20.4M|    cx=sharedData->mbcs.extIndexes;
 4961|  20.4M|    if(cx!=nullptr) {
  ------------------
  |  Branch (4961:8): [True: 3.80M, False: 16.6M]
  ------------------
 4962|  3.80M|        length=ucnv_extSimpleMatchFromU(cx, c, pValue, useFallback);
  ------------------
  |  |  657|  3.80M|#define ucnv_extSimpleMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extSimpleMatchFromU)
  |  |  ------------------
  |  |  |  |  123|  3.80M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  3.80M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  3.80M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4963|  3.80M|        return length>=0 ? length : -length;  /* return abs(length); */
  ------------------
  |  Branch (4963:16): [True: 3.80M, False: 0]
  ------------------
 4964|  3.80M|    }
 4965|       |
 4966|       |    /* unassigned */
 4967|  16.6M|    return 0;
 4968|  20.4M|}
ucnvmbcs.cpp:_ZL13ucnv_MBCSLoadP20UConverterSharedDataP18UConverterLoadArgsPKhP10UErrorCode:
 1558|    422|          UErrorCode *pErrorCode) {
 1559|    422|    UDataInfo info;
 1560|    422|    UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
 1561|    422|    _MBCSHeader *header=(_MBCSHeader *)raw;
 1562|    422|    uint32_t offset;
 1563|    422|    uint32_t headerLength;
 1564|    422|    UBool noFromU=false;
 1565|       |
 1566|    422|    if(header->version[0]==4) {
  ------------------
  |  Branch (1566:8): [True: 422, False: 0]
  ------------------
 1567|    422|        headerLength=MBCS_HEADER_V4_LENGTH;
 1568|    422|    } else if(header->version[0]==5 && header->version[1]>=3 &&
  ------------------
  |  Branch (1568:15): [True: 0, False: 0]
  |  Branch (1568:40): [True: 0, False: 0]
  ------------------
 1569|      0|              (header->options&MBCS_OPT_UNKNOWN_INCOMPATIBLE_MASK)==0) {
  ------------------
  |  Branch (1569:15): [True: 0, False: 0]
  ------------------
 1570|      0|        headerLength=header->options&MBCS_OPT_LENGTH_MASK;
 1571|      0|        noFromU = static_cast<UBool>((header->options & MBCS_OPT_NO_FROM_U) != 0);
 1572|      0|    } else {
 1573|      0|        *pErrorCode=U_INVALID_TABLE_FORMAT;
 1574|      0|        return;
 1575|      0|    }
 1576|       |
 1577|    422|    mbcsTable->outputType = static_cast<uint8_t>(header->flags);
 1578|    422|    if(noFromU && mbcsTable->outputType==MBCS_OUTPUT_1) {
  ------------------
  |  Branch (1578:8): [True: 0, False: 422]
  |  Branch (1578:19): [True: 0, False: 0]
  ------------------
 1579|      0|        *pErrorCode=U_INVALID_TABLE_FORMAT;
 1580|      0|        return;
 1581|      0|    }
 1582|       |
 1583|       |    /* extension data, header version 4.2 and higher */
 1584|    422|    offset=header->flags>>8;
 1585|    422|    if(offset!=0) {
  ------------------
  |  Branch (1585:8): [True: 122, False: 300]
  ------------------
 1586|    122|        mbcsTable->extIndexes = reinterpret_cast<const int32_t*>(raw + offset);
 1587|    122|    }
 1588|       |
 1589|    422|    if(mbcsTable->outputType==MBCS_OUTPUT_EXT_ONLY) {
  ------------------
  |  Branch (1589:8): [True: 36, False: 386]
  ------------------
 1590|     36|        UConverterLoadArgs args=UCNV_LOAD_ARGS_INITIALIZER;
  ------------------
  |  |   62|     36|    { (int32_t)sizeof(UConverterLoadArgs), 0, false, false, 0, 0, NULL, NULL, NULL }
  ------------------
 1591|     36|        UConverterSharedData *baseSharedData;
 1592|     36|        const int32_t *extIndexes;
 1593|     36|        const char *baseName;
 1594|       |
 1595|       |        /* extension-only file, load the base table and set values appropriately */
 1596|     36|        if((extIndexes=mbcsTable->extIndexes)==nullptr) {
  ------------------
  |  Branch (1596:12): [True: 0, False: 36]
  ------------------
 1597|       |            /* extension-only file without extension */
 1598|      0|            *pErrorCode=U_INVALID_TABLE_FORMAT;
 1599|      0|            return;
 1600|      0|        }
 1601|       |
 1602|     36|        if(pArgs->nestedLoads!=1) {
  ------------------
  |  Branch (1602:12): [True: 0, False: 36]
  ------------------
 1603|       |            /* an extension table must not be loaded as a base table */
 1604|      0|            *pErrorCode=U_INVALID_TABLE_FILE;
 1605|      0|            return;
 1606|      0|        }
 1607|       |
 1608|       |        /* load the base table */
 1609|     36|        baseName = reinterpret_cast<const char*>(header) + headerLength * 4;
 1610|     36|        if(0==uprv_strcmp(baseName, sharedData->staticData->name)) {
  ------------------
  |  |   38|     36|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|     36|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1610:12): [True: 0, False: 36]
  ------------------
 1611|       |            /* forbid loading this same extension-only file */
 1612|      0|            *pErrorCode=U_INVALID_TABLE_FORMAT;
 1613|      0|            return;
 1614|      0|        }
 1615|       |
 1616|       |        /* TODO parse package name out of the prefix of the base name in the extension .cnv file? */
 1617|     36|        args.size=sizeof(UConverterLoadArgs);
 1618|     36|        args.nestedLoads=2;
 1619|     36|        args.onlyTestIsLoadable=pArgs->onlyTestIsLoadable;
 1620|     36|        args.reserved=pArgs->reserved;
 1621|     36|        args.options=pArgs->options;
 1622|     36|        args.pkg=pArgs->pkg;
 1623|     36|        args.name=baseName;
 1624|     36|        baseSharedData=ucnv_load(&args, pErrorCode);
  ------------------
  |  |  699|     36|#define ucnv_load U_ICU_ENTRY_POINT_RENAME(ucnv_load)
  |  |  ------------------
  |  |  |  |  123|     36|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     36|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     36|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1625|     36|        if(U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1625:12): [True: 0, False: 36]
  ------------------
 1626|      0|            return;
 1627|      0|        }
 1628|     36|        if( baseSharedData->staticData->conversionType!=UCNV_MBCS ||
  ------------------
  |  Branch (1628:13): [True: 0, False: 36]
  ------------------
 1629|     36|            baseSharedData->mbcs.baseSharedData!=nullptr
  ------------------
  |  Branch (1629:13): [True: 0, False: 36]
  ------------------
 1630|     36|        ) {
 1631|      0|            ucnv_unload(baseSharedData);
  ------------------
  |  |  725|      0|#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1632|      0|            *pErrorCode=U_INVALID_TABLE_FORMAT;
 1633|      0|            return;
 1634|      0|        }
 1635|     36|        if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (1635:12): [True: 22, False: 14]
  ------------------
 1636|       |            /*
 1637|       |             * Exit as soon as we know that we can load the converter
 1638|       |             * and the format is valid and supported.
 1639|       |             * The worst that can happen in the following code is a memory
 1640|       |             * allocation error.
 1641|       |             */
 1642|     22|            ucnv_unload(baseSharedData);
  ------------------
  |  |  725|     22|#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload)
  |  |  ------------------
  |  |  |  |  123|     22|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     22|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     22|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1643|     22|            return;
 1644|     22|        }
 1645|       |
 1646|       |        /* copy the base table data */
 1647|     36|        uprv_memcpy(mbcsTable, &baseSharedData->mbcs, sizeof(UConverterMBCSTable));
  ------------------
  |  |   42|     14|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     14|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     14|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     14|    _Pragma("clang diagnostic push") \
  |  |   45|     14|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     14|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     14|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     14|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     14|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     14|    _Pragma("clang diagnostic pop") \
  |  |   49|     14|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     14|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     36|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     36|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1648|       |
 1649|       |        /* overwrite values with relevant ones for the extension converter */
 1650|     14|        mbcsTable->baseSharedData=baseSharedData;
 1651|     14|        mbcsTable->extIndexes=extIndexes;
 1652|       |
 1653|       |        /*
 1654|       |         * It would be possible to share the swapLFNL data with a base converter,
 1655|       |         * but the generated name would have to be different, and the memory
 1656|       |         * would have to be free'd only once.
 1657|       |         * It is easier to just create the data for the extension converter
 1658|       |         * separately when it is requested.
 1659|       |         */
 1660|     14|        mbcsTable->swapLFNLStateTable=nullptr;
 1661|     14|        mbcsTable->swapLFNLFromUnicodeBytes=nullptr;
 1662|     14|        mbcsTable->swapLFNLName=nullptr;
 1663|       |
 1664|       |        /*
 1665|       |         * The reconstitutedData must be deleted only when the base converter
 1666|       |         * is unloaded.
 1667|       |         */
 1668|     14|        mbcsTable->reconstitutedData=nullptr;
 1669|       |
 1670|       |        /*
 1671|       |         * Set a special, runtime-only outputType if the extension converter
 1672|       |         * is a DBCS version of a base converter that also maps single bytes.
 1673|       |         */
 1674|     14|        if( sharedData->staticData->conversionType==UCNV_DBCS ||
  ------------------
  |  Branch (1674:13): [True: 0, False: 14]
  ------------------
 1675|     14|                (sharedData->staticData->conversionType==UCNV_MBCS &&
  ------------------
  |  Branch (1675:18): [True: 14, False: 0]
  ------------------
 1676|     14|                 sharedData->staticData->minBytesPerChar>=2)
  ------------------
  |  Branch (1676:18): [True: 2, False: 12]
  ------------------
 1677|     14|        ) {
 1678|      2|            if(baseSharedData->mbcs.outputType==MBCS_OUTPUT_2_SISO) {
  ------------------
  |  Branch (1678:16): [True: 1, False: 1]
  ------------------
 1679|       |                /* the base converter is SI/SO-stateful */
 1680|      1|                int32_t entry;
 1681|       |
 1682|       |                /* get the dbcs state from the state table entry for SO=0x0e */
 1683|      1|                entry=mbcsTable->stateTable[0][0xe];
 1684|      1|                if( MBCS_ENTRY_IS_FINAL(entry) &&
  ------------------
  |  |  285|      2|#define MBCS_ENTRY_IS_FINAL(entry) ((entry)<0)
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1685|      1|                    MBCS_ENTRY_FINAL_ACTION(entry)==MBCS_STATE_CHANGE_ONLY &&
  ------------------
  |  |  292|      1|#define MBCS_ENTRY_FINAL_ACTION(entry) ((((uint32_t)entry)>>20)&0xf)
  ------------------
  |  Branch (1685:21): [True: 1, False: 0]
  ------------------
 1686|      1|                    MBCS_ENTRY_FINAL_STATE(entry)!=0
  ------------------
  |  |  290|      1|#define MBCS_ENTRY_FINAL_STATE(entry) ((((uint32_t)entry)>>24)&0x7f)
  ------------------
  |  Branch (1686:21): [True: 1, False: 0]
  ------------------
 1687|      1|                ) {
 1688|      1|                    mbcsTable->dbcsOnlyState = static_cast<uint8_t>(MBCS_ENTRY_FINAL_STATE(entry));
  ------------------
  |  |  290|      1|#define MBCS_ENTRY_FINAL_STATE(entry) ((((uint32_t)entry)>>24)&0x7f)
  ------------------
 1689|       |
 1690|      1|                    mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
 1691|      1|                }
 1692|      1|            } else if(
 1693|      1|                baseSharedData->staticData->conversionType==UCNV_MBCS &&
  ------------------
  |  Branch (1693:17): [True: 1, False: 0]
  ------------------
 1694|      1|                baseSharedData->staticData->minBytesPerChar==1 &&
  ------------------
  |  Branch (1694:17): [True: 1, False: 0]
  ------------------
 1695|      1|                baseSharedData->staticData->maxBytesPerChar==2 &&
  ------------------
  |  Branch (1695:17): [True: 1, False: 0]
  ------------------
 1696|      1|                mbcsTable->countStates<=127
  ------------------
  |  Branch (1696:17): [True: 1, False: 0]
  ------------------
 1697|      1|            ) {
 1698|       |                /* non-stateful base converter, need to modify the state table */
 1699|      1|                int32_t (*newStateTable)[256];
 1700|      1|                int32_t *state;
 1701|      1|                int32_t i, count;
 1702|       |
 1703|       |                /* allocate a new state table and copy the base state table contents */
 1704|      1|                count=mbcsTable->countStates;
 1705|      1|                newStateTable = static_cast<int32_t(*)[256]>(uprv_malloc((count + 1) * 1024));
  ------------------
  |  | 1524|      1|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1706|      1|                if(newStateTable==nullptr) {
  ------------------
  |  Branch (1706:20): [True: 0, False: 1]
  ------------------
 1707|      0|                    ucnv_unload(baseSharedData);
  ------------------
  |  |  725|      0|#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1708|      0|                    *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
 1709|      0|                    return;
 1710|      0|                }
 1711|       |
 1712|      1|                uprv_memcpy(newStateTable, mbcsTable->stateTable, count*1024);
  ------------------
  |  |   42|      1|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      1|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      1|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      1|    _Pragma("clang diagnostic push") \
  |  |   45|      1|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      1|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      1|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      1|    _Pragma("clang diagnostic pop") \
  |  |   49|      1|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      1|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      1|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      1|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1713|       |
 1714|       |                /* change all final single-byte entries to go to a new all-illegal state */
 1715|      1|                state=newStateTable[0];
 1716|    257|                for(i=0; i<256; ++i) {
  ------------------
  |  Branch (1716:26): [True: 256, False: 1]
  ------------------
 1717|    256|                    if(MBCS_ENTRY_IS_FINAL(state[i])) {
  ------------------
  |  |  285|    256|#define MBCS_ENTRY_IS_FINAL(entry) ((entry)<0)
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 162, False: 94]
  |  |  ------------------
  ------------------
 1718|    162|                        state[i]=MBCS_ENTRY_TRANSITION(count, 0);
  ------------------
  |  |  270|    162|#define MBCS_ENTRY_TRANSITION(state, offset) (int32_t)(((int32_t)(state)<<24L)|(offset))
  ------------------
 1719|    162|                    }
 1720|    256|                }
 1721|       |
 1722|       |                /* build the new all-illegal state */
 1723|      1|                state=newStateTable[count];
 1724|    257|                for(i=0; i<256; ++i) {
  ------------------
  |  Branch (1724:26): [True: 256, False: 1]
  ------------------
 1725|    256|                    state[i]=MBCS_ENTRY_FINAL(0, MBCS_STATE_ILLEGAL, 0);
  ------------------
  |  |  274|    256|#define MBCS_ENTRY_FINAL(state, action, value) (int32_t)(0x80000000|((int32_t)(state)<<24L)|((action)<<20L)|(value))
  ------------------
 1726|    256|                }
 1727|      1|                mbcsTable->stateTable=(const int32_t (*)[256])newStateTable;
 1728|      1|                mbcsTable->countStates = static_cast<uint8_t>(count + 1);
 1729|      1|                mbcsTable->stateTableOwned=true;
 1730|       |
 1731|      1|                mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
 1732|      1|            }
 1733|      2|        }
 1734|       |
 1735|       |        /*
 1736|       |         * unlike below for files with base tables, do not get the unicodeMask
 1737|       |         * from the sharedData; instead, use the base table's unicodeMask,
 1738|       |         * which we copied in the memcpy above;
 1739|       |         * this is necessary because the static data unicodeMask, especially
 1740|       |         * the UCNV_HAS_SUPPLEMENTARY flag, is part of the base table data
 1741|       |         */
 1742|    386|    } else {
 1743|       |        /* conversion file with a base table; an additional extension table is optional */
 1744|       |        /* make sure that the output type is known */
 1745|    386|        switch(mbcsTable->outputType) {
 1746|    283|        case MBCS_OUTPUT_1:
  ------------------
  |  Branch (1746:9): [True: 283, False: 103]
  ------------------
 1747|    348|        case MBCS_OUTPUT_2:
  ------------------
  |  Branch (1747:9): [True: 65, False: 321]
  ------------------
 1748|    353|        case MBCS_OUTPUT_3:
  ------------------
  |  Branch (1748:9): [True: 5, False: 381]
  ------------------
 1749|    355|        case MBCS_OUTPUT_4:
  ------------------
  |  Branch (1749:9): [True: 2, False: 384]
  ------------------
 1750|    363|        case MBCS_OUTPUT_3_EUC:
  ------------------
  |  Branch (1750:9): [True: 8, False: 378]
  ------------------
 1751|    367|        case MBCS_OUTPUT_4_EUC:
  ------------------
  |  Branch (1751:9): [True: 4, False: 382]
  ------------------
 1752|    386|        case MBCS_OUTPUT_2_SISO:
  ------------------
  |  Branch (1752:9): [True: 19, False: 367]
  ------------------
 1753|       |            /* OK */
 1754|    386|            break;
 1755|      0|        default:
  ------------------
  |  Branch (1755:9): [True: 0, False: 386]
  ------------------
 1756|      0|            *pErrorCode=U_INVALID_TABLE_FORMAT;
 1757|      0|            return;
 1758|    386|        }
 1759|    386|        if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (1759:12): [True: 229, False: 157]
  ------------------
 1760|       |            /*
 1761|       |             * Exit as soon as we know that we can load the converter
 1762|       |             * and the format is valid and supported.
 1763|       |             * The worst that can happen in the following code is a memory
 1764|       |             * allocation error.
 1765|       |             */
 1766|    229|            return;
 1767|    229|        }
 1768|       |
 1769|    157|        mbcsTable->countStates = static_cast<uint8_t>(header->countStates);
 1770|    157|        mbcsTable->countToUFallbacks=header->countToUFallbacks;
 1771|    157|        mbcsTable->stateTable = reinterpret_cast<const int32_t(*)[256]>(raw + headerLength * 4);
 1772|    157|        mbcsTable->toUFallbacks = reinterpret_cast<const _MBCSToUFallback*>(mbcsTable->stateTable + header->countStates);
 1773|    157|        mbcsTable->unicodeCodeUnits = reinterpret_cast<const uint16_t*>(raw + header->offsetToUCodeUnits);
 1774|       |
 1775|    157|        mbcsTable->fromUnicodeTable = reinterpret_cast<const uint16_t*>(raw + header->offsetFromUTable);
 1776|    157|        mbcsTable->fromUnicodeBytes = raw + header->offsetFromUBytes;
 1777|    157|        mbcsTable->fromUBytesLength=header->fromUBytesLength;
 1778|       |
 1779|       |        /*
 1780|       |         * converter versions 6.1 and up contain a unicodeMask that is
 1781|       |         * used here to select the most efficient function implementations
 1782|       |         */
 1783|    157|        info.size=sizeof(UDataInfo);
 1784|    157|        udata_getInfo((UDataMemory *)sharedData->dataMemory, &info);
  ------------------
  |  |  888|    157|#define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo)
  |  |  ------------------
  |  |  |  |  123|    157|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    157|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    157|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1785|    157|        if(info.formatVersion[0]>6 || (info.formatVersion[0]==6 && info.formatVersion[1]>=1)) {
  ------------------
  |  Branch (1785:12): [True: 0, False: 157]
  |  Branch (1785:40): [True: 157, False: 0]
  |  Branch (1785:68): [True: 157, False: 0]
  ------------------
 1786|       |            /* mask off possible future extensions to be safe */
 1787|    157|            mbcsTable->unicodeMask = static_cast<uint8_t>(sharedData->staticData->unicodeMask & 3);
 1788|    157|        } else {
 1789|       |            /* for older versions, assume worst case: contains anything possible (prevent over-optimizations) */
 1790|      0|            mbcsTable->unicodeMask=UCNV_HAS_SUPPLEMENTARY|UCNV_HAS_SURROGATES;
  ------------------
  |  |   64|      0|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
                          mbcsTable->unicodeMask=UCNV_HAS_SUPPLEMENTARY|UCNV_HAS_SURROGATES;
  ------------------
  |  |   65|      0|#define UCNV_HAS_SURROGATES    2
  ------------------
 1791|      0|        }
 1792|       |
 1793|       |        /*
 1794|       |         * _MBCSHeader.version 4.3 adds utf8Friendly data structures.
 1795|       |         * Check for the header version, SBCS vs. MBCS, and for whether the
 1796|       |         * data structures are optimized for code points as high as what the
 1797|       |         * runtime code is designed for.
 1798|       |         * The implementation does not handle mapping tables with entries for
 1799|       |         * unpaired surrogates.
 1800|       |         */
 1801|    157|        if( header->version[1]>=3 &&
  ------------------
  |  Branch (1801:13): [True: 157, False: 0]
  ------------------
 1802|    157|            (mbcsTable->unicodeMask&UCNV_HAS_SURROGATES)==0 &&
  ------------------
  |  |   65|    157|#define UCNV_HAS_SURROGATES    2
  ------------------
  |  Branch (1802:13): [True: 157, False: 0]
  ------------------
 1803|    157|            (mbcsTable->countStates==1 ?
  ------------------
  |  Branch (1803:13): [True: 157, False: 0]
  |  Branch (1803:14): [True: 121, False: 36]
  ------------------
 1804|    121|                (header->version[2]>=(SBCS_FAST_MAX>>8)) :
 1805|    157|                (header->version[2]>=(MBCS_FAST_MAX>>8))
 1806|    157|            )
 1807|    157|        ) {
 1808|    157|            mbcsTable->utf8Friendly=true;
 1809|       |
 1810|    157|            if(mbcsTable->countStates==1) {
  ------------------
  |  Branch (1810:16): [True: 121, False: 36]
  ------------------
 1811|       |                /*
 1812|       |                 * SBCS: Stage 3 is allocated in 64-entry blocks for U+0000..SBCS_FAST_MAX or higher.
 1813|       |                 * Build a table with indexes to each block, to be used instead of
 1814|       |                 * the regular stage 1/2 table.
 1815|       |                 */
 1816|    121|                int32_t i;
 1817|  7.86k|                for(i=0; i<(SBCS_FAST_LIMIT>>6); ++i) {
  ------------------
  |  Branch (1817:26): [True: 7.74k, False: 121]
  ------------------
 1818|  7.74k|                    mbcsTable->sbcsIndex[i]=mbcsTable->fromUnicodeTable[mbcsTable->fromUnicodeTable[i>>4]+((i<<2)&0x3c)];
 1819|  7.74k|                }
 1820|       |                /* set SBCS_FAST_MAX to reflect the reach of sbcsIndex[] even if header->version[2]>(SBCS_FAST_MAX>>8) */
 1821|    121|                mbcsTable->maxFastUChar=SBCS_FAST_MAX;
 1822|    121|            } else {
 1823|       |                /*
 1824|       |                 * MBCS: Stage 3 is allocated in 64-entry blocks for U+0000..MBCS_FAST_MAX or higher.
 1825|       |                 * The .cnv file is prebuilt with an additional stage table with indexes
 1826|       |                 * to each block.
 1827|       |                 */
 1828|     36|                mbcsTable->mbcsIndex = reinterpret_cast<const uint16_t*>(
 1829|     36|                    mbcsTable->fromUnicodeBytes +
 1830|     36|                     (noFromU ? 0 : mbcsTable->fromUBytesLength));
  ------------------
  |  Branch (1830:23): [True: 0, False: 36]
  ------------------
 1831|     36|                mbcsTable->maxFastUChar = (static_cast<char16_t>(header->version[2]) << 8) | 0xff;
 1832|     36|            }
 1833|    157|        }
 1834|       |
 1835|       |        /* calculate a bit set of 4 ASCII characters per bit that round-trip to ASCII bytes */
 1836|    157|        {
 1837|    157|            uint32_t asciiRoundtrips=0xffffffff;
 1838|    157|            int32_t i;
 1839|       |
 1840|  20.2k|            for(i=0; i<0x80; ++i) {
  ------------------
  |  Branch (1840:22): [True: 20.0k, False: 157]
  ------------------
 1841|  20.0k|                if(mbcsTable->stateTable[0][i]!=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, i)) {
  ------------------
  |  |  274|  20.0k|#define MBCS_ENTRY_FINAL(state, action, value) (int32_t)(0x80000000|((int32_t)(state)<<24L)|((action)<<20L)|(value))
  ------------------
  |  Branch (1841:20): [True: 8.18k, False: 11.9k]
  ------------------
 1842|  8.18k|                    asciiRoundtrips &= ~(static_cast<uint32_t>(1) << (i >> 2));
 1843|  8.18k|                }
 1844|  20.0k|            }
 1845|    157|            mbcsTable->asciiRoundtrips=asciiRoundtrips;
 1846|    157|        }
 1847|       |
 1848|    157|        if(noFromU) {
  ------------------
  |  Branch (1848:12): [True: 0, False: 157]
  ------------------
 1849|      0|            uint32_t stage1Length=
 1850|      0|                mbcsTable->unicodeMask&UCNV_HAS_SUPPLEMENTARY ?
  ------------------
  |  |   64|      0|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (1850:17): [True: 0, False: 0]
  ------------------
 1851|      0|                    0x440 : 0x40;
 1852|      0|            uint32_t stage2Length=
 1853|      0|                (header->offsetFromUBytes-header->offsetFromUTable)/4-
 1854|      0|                stage1Length/2;
 1855|      0|            reconstituteData(mbcsTable, stage1Length, stage2Length, header->fullStage2Length, pErrorCode);
 1856|      0|        }
 1857|    157|    }
 1858|       |
 1859|       |    /* Set the impl pointer here so that it is set for both extension-only and base tables. */
 1860|    171|    if(mbcsTable->utf8Friendly) {
  ------------------
  |  Branch (1860:8): [True: 171, False: 0]
  ------------------
 1861|    171|        if(mbcsTable->countStates==1) {
  ------------------
  |  Branch (1861:12): [True: 121, False: 50]
  ------------------
 1862|    121|            sharedData->impl=&_SBCSUTF8Impl;
 1863|    121|        } else {
 1864|     50|            if(mbcsTable->outputType==MBCS_OUTPUT_2) {
  ------------------
  |  Branch (1864:16): [True: 28, False: 22]
  ------------------
 1865|     28|                sharedData->impl=&_DBCSUTF8Impl;
 1866|     28|            }
 1867|     50|        }
 1868|    171|    }
 1869|       |
 1870|    171|    if(mbcsTable->outputType==MBCS_OUTPUT_DBCS_ONLY || mbcsTable->outputType==MBCS_OUTPUT_2_SISO) {
  ------------------
  |  Branch (1870:8): [True: 2, False: 169]
  |  Branch (1870:56): [True: 10, False: 159]
  ------------------
 1871|       |        /*
 1872|       |         * MBCS_OUTPUT_DBCS_ONLY: No SBCS mappings, therefore ASCII does not roundtrip.
 1873|       |         * MBCS_OUTPUT_2_SISO: Bypass the ASCII fastpath to handle prevLength correctly.
 1874|       |         */
 1875|     12|        mbcsTable->asciiRoundtrips=0;
 1876|     12|    }
 1877|    171|}
ucnvmbcs.cpp:_ZL15ucnv_MBCSUnloadP20UConverterSharedData:
 1880|    251|ucnv_MBCSUnload(UConverterSharedData *sharedData) {
 1881|    251|    UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
 1882|       |
 1883|    251|    if(mbcsTable->swapLFNLStateTable!=nullptr) {
  ------------------
  |  Branch (1883:8): [True: 0, False: 251]
  ------------------
 1884|      0|        uprv_free(mbcsTable->swapLFNLStateTable);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1885|      0|    }
 1886|    251|    if(mbcsTable->stateTableOwned) {
  ------------------
  |  Branch (1886:8): [True: 0, False: 251]
  ------------------
 1887|      0|        uprv_free((void *)mbcsTable->stateTable);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1888|      0|    }
 1889|    251|    if(mbcsTable->baseSharedData!=nullptr) {
  ------------------
  |  Branch (1889:8): [True: 0, False: 251]
  ------------------
 1890|      0|        ucnv_unload(mbcsTable->baseSharedData);
  ------------------
  |  |  725|      0|#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1891|      0|    }
 1892|    251|    if(mbcsTable->reconstitutedData!=nullptr) {
  ------------------
  |  Branch (1892:8): [True: 0, False: 251]
  ------------------
 1893|      0|        uprv_free(mbcsTable->reconstitutedData);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1894|      0|    }
 1895|    251|}
ucnvmbcs.cpp:_ZL13ucnv_MBCSOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
 1900|  1.81k|              UErrorCode *pErrorCode) {
 1901|  1.81k|    UConverterMBCSTable *mbcsTable;
 1902|  1.81k|    const int32_t *extIndexes;
 1903|  1.81k|    uint8_t outputType;
 1904|  1.81k|    int8_t maxBytesPerUChar;
 1905|       |
 1906|  1.81k|    if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (1906:8): [True: 191, False: 1.62k]
  ------------------
 1907|    191|        return;
 1908|    191|    }
 1909|       |
 1910|  1.62k|    mbcsTable=&cnv->sharedData->mbcs;
 1911|  1.62k|    outputType=mbcsTable->outputType;
 1912|       |
 1913|  1.62k|    if(outputType==MBCS_OUTPUT_DBCS_ONLY) {
  ------------------
  |  Branch (1913:8): [True: 106, False: 1.51k]
  ------------------
 1914|       |        /* the swaplfnl option does not apply, remove it */
 1915|    106|        cnv->options=pArgs->options&=~UCNV_OPTION_SWAP_LFNL;
  ------------------
  |  |   45|    106|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
 1916|    106|    }
 1917|       |
 1918|  1.62k|    if((pArgs->options&UCNV_OPTION_SWAP_LFNL)!=0) {
  ------------------
  |  |   45|  1.62k|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
  |  Branch (1918:8): [True: 36, False: 1.58k]
  ------------------
 1919|       |        /* do this because double-checked locking is broken */
 1920|     36|        UBool isCached;
 1921|       |
 1922|     36|        icu::umtx_lock(nullptr);
  ------------------
  |  | 1250|     36|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|     36|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     36|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     36|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1923|     36|        isCached=mbcsTable->swapLFNLStateTable!=nullptr;
 1924|     36|        icu::umtx_unlock(nullptr);
  ------------------
  |  | 1251|     36|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|     36|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     36|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     36|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1925|       |
 1926|     36|        if(!isCached) {
  ------------------
  |  Branch (1926:12): [True: 15, False: 21]
  ------------------
 1927|     15|            if(!_EBCDICSwapLFNL(cnv->sharedData, pErrorCode)) {
  ------------------
  |  Branch (1927:16): [True: 0, False: 15]
  ------------------
 1928|      0|                if(U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1928:20): [True: 0, False: 0]
  ------------------
 1929|      0|                    return; /* something went wrong */
 1930|      0|                }
 1931|       |
 1932|       |                /* the option does not apply, remove it */
 1933|      0|                cnv->options=pArgs->options&=~UCNV_OPTION_SWAP_LFNL;
  ------------------
  |  |   45|      0|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
 1934|      0|            }
 1935|     15|        }
 1936|     36|    }
 1937|       |
 1938|  1.62k|    if(uprv_strstr(pArgs->name, "18030")!=nullptr) {
  ------------------
  |  |   41|  1.62k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.62k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1938:8): [True: 129, False: 1.49k]
  ------------------
 1939|    129|        if(uprv_strstr(pArgs->name, "gb18030")!=nullptr || uprv_strstr(pArgs->name, "GB18030")!=nullptr) {
  ------------------
  |  |   41|    129|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|    129|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
                      if(uprv_strstr(pArgs->name, "gb18030")!=nullptr || uprv_strstr(pArgs->name, "GB18030")!=nullptr) {
  ------------------
  |  |   41|      0|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1939:12): [True: 129, False: 0]
  |  Branch (1939:60): [True: 0, False: 0]
  ------------------
 1940|       |            /* set a flag for GB 18030 mode, which changes the callback behavior */
 1941|    129|            cnv->options|=_MBCS_OPTION_GB18030;
  ------------------
  |  |  559|    129|#define _MBCS_OPTION_GB18030 0x8000
  ------------------
 1942|    129|        }
 1943|  1.49k|    } else if((uprv_strstr(pArgs->name, "KEIS")!=nullptr) || (uprv_strstr(pArgs->name, "keis")!=nullptr)) {
  ------------------
  |  |   41|  1.49k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
                  } else if((uprv_strstr(pArgs->name, "KEIS")!=nullptr) || (uprv_strstr(pArgs->name, "keis")!=nullptr)) {
  ------------------
  |  |   41|  1.49k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1943:15): [True: 0, False: 1.49k]
  |  Branch (1943:62): [True: 0, False: 1.49k]
  ------------------
 1944|       |        /* set a flag for KEIS converter, which changes the SI/SO character sequence */
 1945|      0|        cnv->options|=_MBCS_OPTION_KEIS;
  ------------------
  |  |  562|      0|#define _MBCS_OPTION_KEIS 0x01000
  ------------------
 1946|  1.49k|    } else if((uprv_strstr(pArgs->name, "JEF")!=nullptr) || (uprv_strstr(pArgs->name, "jef")!=nullptr)) {
  ------------------
  |  |   41|  1.49k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
                  } else if((uprv_strstr(pArgs->name, "JEF")!=nullptr) || (uprv_strstr(pArgs->name, "jef")!=nullptr)) {
  ------------------
  |  |   41|  1.49k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1946:15): [True: 0, False: 1.49k]
  |  Branch (1946:61): [True: 0, False: 1.49k]
  ------------------
 1947|       |        /* set a flag for JEF converter, which changes the SI/SO character sequence */
 1948|      0|        cnv->options|=_MBCS_OPTION_JEF;
  ------------------
  |  |  563|      0|#define _MBCS_OPTION_JEF  0x02000
  ------------------
 1949|  1.49k|    } else if((uprv_strstr(pArgs->name, "JIPS")!=nullptr) || (uprv_strstr(pArgs->name, "jips")!=nullptr)) {
  ------------------
  |  |   41|  1.49k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
                  } else if((uprv_strstr(pArgs->name, "JIPS")!=nullptr) || (uprv_strstr(pArgs->name, "jips")!=nullptr)) {
  ------------------
  |  |   41|  1.49k|#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
  |  |  ------------------
  |  |  |  |  393|  1.49k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1949:15): [True: 0, False: 1.49k]
  |  Branch (1949:62): [True: 0, False: 1.49k]
  ------------------
 1950|       |        /* set a flag for JIPS converter, which changes the SI/SO character sequence */
 1951|      0|        cnv->options|=_MBCS_OPTION_JIPS;
  ------------------
  |  |  564|      0|#define _MBCS_OPTION_JIPS 0x04000
  ------------------
 1952|      0|    }
 1953|       |
 1954|       |    /* fix maxBytesPerUChar depending on outputType and options etc. */
 1955|  1.62k|    if(outputType==MBCS_OUTPUT_2_SISO) {
  ------------------
  |  Branch (1955:8): [True: 245, False: 1.37k]
  ------------------
 1956|    245|        cnv->maxBytesPerUChar=3; /* SO+DBCS */
 1957|    245|    }
 1958|       |
 1959|  1.62k|    extIndexes=mbcsTable->extIndexes;
 1960|  1.62k|    if(extIndexes!=nullptr) {
  ------------------
  |  Branch (1960:8): [True: 1.33k, False: 282]
  ------------------
 1961|  1.33k|        maxBytesPerUChar = static_cast<int8_t>(UCNV_GET_MAX_BYTES_PER_UCHAR(extIndexes));
  ------------------
  |  |  348|  1.33k|    ((indexes)[UCNV_EXT_COUNT_BYTES]&0xff)
  ------------------
 1962|  1.33k|        if(outputType==MBCS_OUTPUT_2_SISO) {
  ------------------
  |  Branch (1962:12): [True: 245, False: 1.09k]
  ------------------
 1963|    245|            ++maxBytesPerUChar; /* SO + multiple DBCS */
 1964|    245|        }
 1965|       |
 1966|  1.33k|        if(maxBytesPerUChar>cnv->maxBytesPerUChar) {
  ------------------
  |  Branch (1966:12): [True: 18, False: 1.32k]
  ------------------
 1967|     18|            cnv->maxBytesPerUChar=maxBytesPerUChar;
 1968|     18|        }
 1969|  1.33k|    }
 1970|       |
 1971|       |#if 0
 1972|       |    /*
 1973|       |     * documentation of UConverter fields used for status
 1974|       |     * all of these fields are (re)set to 0 by ucnv_bld.c and ucnv_reset()
 1975|       |     */
 1976|       |
 1977|       |    /* toUnicode */
 1978|       |    cnv->toUnicodeStatus=0;     /* offset */
 1979|       |    cnv->mode=0;                /* state */
 1980|       |    cnv->toULength=0;           /* byteIndex */
 1981|       |
 1982|       |    /* fromUnicode */
 1983|       |    cnv->fromUChar32=0;
 1984|       |    cnv->fromUnicodeStatus=1;   /* prevLength */
 1985|       |#endif
 1986|  1.62k|}
ucnvmbcs.cpp:_ZL15_EBCDICSwapLFNLP20UConverterSharedDataP10UErrorCode:
 1258|     15|_EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
 1259|     15|    UConverterMBCSTable *mbcsTable;
 1260|       |
 1261|     15|    const uint16_t *table, *results;
 1262|     15|    const uint8_t *bytes;
 1263|       |
 1264|     15|    int32_t (*newStateTable)[256];
 1265|     15|    uint16_t *newResults;
 1266|     15|    uint8_t *p;
 1267|     15|    char *name;
 1268|       |
 1269|     15|    uint32_t stage2Entry;
 1270|     15|    uint32_t size, sizeofFromUBytes;
 1271|       |
 1272|     15|    mbcsTable=&sharedData->mbcs;
 1273|       |
 1274|     15|    table=mbcsTable->fromUnicodeTable;
 1275|     15|    bytes=mbcsTable->fromUnicodeBytes;
 1276|     15|    results = reinterpret_cast<const uint16_t*>(bytes);
 1277|       |
 1278|       |    /*
 1279|       |     * Check that this is an EBCDIC table with SBCS portion -
 1280|       |     * SBCS or EBCDIC_STATEFUL with standard EBCDIC LF and NL mappings.
 1281|       |     *
 1282|       |     * If not, ignore the option. Options are always ignored if they do not apply.
 1283|       |     */
 1284|     15|    if(!(
 1285|     15|         (mbcsTable->outputType==MBCS_OUTPUT_1 || mbcsTable->outputType==MBCS_OUTPUT_2_SISO) &&
  ------------------
  |  Branch (1285:11): [True: 15, False: 0]
  |  Branch (1285:51): [True: 0, False: 0]
  ------------------
 1286|     15|         mbcsTable->stateTable[0][EBCDIC_LF]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF) &&
  ------------------
  |  | 1246|     15|#define EBCDIC_LF 0x25
  ------------------
                       mbcsTable->stateTable[0][EBCDIC_LF]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF) &&
  ------------------
  |  |  274|     30|#define MBCS_ENTRY_FINAL(state, action, value) (int32_t)(0x80000000|((int32_t)(state)<<24L)|((action)<<20L)|(value))
  ------------------
  |  Branch (1286:10): [True: 15, False: 0]
  ------------------
 1287|     15|         mbcsTable->stateTable[0][EBCDIC_NL]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL)
  ------------------
  |  | 1247|     15|#define EBCDIC_NL 0x15
  ------------------
                       mbcsTable->stateTable[0][EBCDIC_NL]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL)
  ------------------
  |  |  274|     15|#define MBCS_ENTRY_FINAL(state, action, value) (int32_t)(0x80000000|((int32_t)(state)<<24L)|((action)<<20L)|(value))
  ------------------
  |  Branch (1287:10): [True: 15, False: 0]
  ------------------
 1288|     15|    )) {
 1289|      0|        return false;
 1290|      0|    }
 1291|       |
 1292|     15|    if(mbcsTable->outputType==MBCS_OUTPUT_1) {
  ------------------
  |  Branch (1292:8): [True: 15, False: 0]
  ------------------
 1293|     15|        if(!(
 1294|     15|             EBCDIC_RT_LF==MBCS_SINGLE_RESULT_FROM_U(table, results, U_LF) &&
  ------------------
  |  | 1250|     15|#define EBCDIC_RT_LF 0xf25
  ------------------
                           EBCDIC_RT_LF==MBCS_SINGLE_RESULT_FROM_U(table, results, U_LF) &&
  ------------------
  |  |  299|     30|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
  |  Branch (1294:14): [True: 15, False: 0]
  ------------------
 1295|     15|             EBCDIC_RT_NL==MBCS_SINGLE_RESULT_FROM_U(table, results, U_NL)
  ------------------
  |  | 1251|     15|#define EBCDIC_RT_NL 0xf15
  ------------------
                           EBCDIC_RT_NL==MBCS_SINGLE_RESULT_FROM_U(table, results, U_NL)
  ------------------
  |  |  299|     15|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
  |  Branch (1295:14): [True: 15, False: 0]
  ------------------
 1296|     15|        )) {
 1297|      0|            return false;
 1298|      0|        }
 1299|     15|    } else /* MBCS_OUTPUT_2_SISO */ {
 1300|      0|        stage2Entry=MBCS_STAGE_2_FROM_U(table, U_LF);
  ------------------
  |  |  308|      0|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 1301|      0|        if(!(
 1302|      0|             MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, U_LF)!=0 &&
  ------------------
  |  |  309|      0|#define MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ( ((stage2Entry) & ((uint32_t)1<< (16+((c)&0xf)) )) !=0)
  ------------------
  |  Branch (1302:14): [True: 0, False: 0]
  ------------------
 1303|      0|             EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
  ------------------
  |  | 1246|      0|#define EBCDIC_LF 0x25
  ------------------
                           EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
  ------------------
  |  |  311|      0|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
  |  Branch (1303:14): [True: 0, False: 0]
  ------------------
 1304|      0|        )) {
 1305|      0|            return false;
 1306|      0|        }
 1307|       |
 1308|      0|        stage2Entry=MBCS_STAGE_2_FROM_U(table, U_NL);
  ------------------
  |  |  308|      0|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 1309|      0|        if(!(
 1310|      0|             MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, U_NL)!=0 &&
  ------------------
  |  |  309|      0|#define MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ( ((stage2Entry) & ((uint32_t)1<< (16+((c)&0xf)) )) !=0)
  ------------------
  |  Branch (1310:14): [True: 0, False: 0]
  ------------------
 1311|      0|             EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
  ------------------
  |  | 1247|      0|#define EBCDIC_NL 0x15
  ------------------
                           EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
  ------------------
  |  |  311|      0|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
  |  Branch (1311:14): [True: 0, False: 0]
  ------------------
 1312|      0|        )) {
 1313|      0|            return false;
 1314|      0|        }
 1315|      0|    }
 1316|       |
 1317|     15|    if(mbcsTable->fromUBytesLength>0) {
  ------------------
  |  Branch (1317:8): [True: 15, False: 0]
  ------------------
 1318|       |        /*
 1319|       |         * We _know_ the number of bytes in the fromUnicodeBytes array
 1320|       |         * starting with header.version 4.1.
 1321|       |         */
 1322|     15|        sizeofFromUBytes=mbcsTable->fromUBytesLength;
 1323|     15|    } else {
 1324|       |        /*
 1325|       |         * Otherwise:
 1326|       |         * There used to be code to enumerate the fromUnicode
 1327|       |         * trie and find the highest entry, but it was removed in ICU 3.2
 1328|       |         * because it was not tested and caused a low code coverage number.
 1329|       |         * See Jitterbug 3674.
 1330|       |         * This affects only some .cnv file formats with a header.version
 1331|       |         * below 4.1, and only when swaplfnl is requested.
 1332|       |         *
 1333|       |         * ucnvmbcs.c revision 1.99 is the last one with the
 1334|       |         * ucnv_MBCSSizeofFromUBytes() function.
 1335|       |         */
 1336|      0|        *pErrorCode=U_INVALID_FORMAT_ERROR;
 1337|      0|        return false;
 1338|      0|    }
 1339|       |
 1340|       |    /*
 1341|       |     * The table has an appropriate format.
 1342|       |     * Allocate and build
 1343|       |     * - a modified to-Unicode state table
 1344|       |     * - a modified from-Unicode output array
 1345|       |     * - a converter name string with the swap option appended
 1346|       |     */
 1347|     15|    size=
 1348|     15|        mbcsTable->countStates*1024+
 1349|     15|        sizeofFromUBytes+
 1350|     15|        UCNV_MAX_CONVERTER_NAME_LENGTH+20;
  ------------------
  |  |   79|     15|#define UCNV_MAX_CONVERTER_NAME_LENGTH 60
  ------------------
 1351|     15|    p = static_cast<uint8_t*>(uprv_malloc(size));
  ------------------
  |  | 1524|     15|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|     15|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     15|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     15|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1352|     15|    if(p==nullptr) {
  ------------------
  |  Branch (1352:8): [True: 0, False: 15]
  ------------------
 1353|      0|        *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
 1354|      0|        return false;
 1355|      0|    }
 1356|       |
 1357|       |    /* copy and modify the to-Unicode state table */
 1358|     15|    newStateTable = reinterpret_cast<int32_t(*)[256]>(p);
 1359|     15|    uprv_memcpy(newStateTable, mbcsTable->stateTable, mbcsTable->countStates*1024);
  ------------------
  |  |   42|     15|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     15|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     15|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     15|    _Pragma("clang diagnostic push") \
  |  |   45|     15|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     15|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     15|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     15|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     15|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     15|    _Pragma("clang diagnostic pop") \
  |  |   49|     15|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     15|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     15|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     15|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1360|       |
 1361|     15|    newStateTable[0][EBCDIC_LF]=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL);
  ------------------
  |  | 1246|     15|#define EBCDIC_LF 0x25
  ------------------
                  newStateTable[0][EBCDIC_LF]=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL);
  ------------------
  |  |  274|     15|#define MBCS_ENTRY_FINAL(state, action, value) (int32_t)(0x80000000|((int32_t)(state)<<24L)|((action)<<20L)|(value))
  ------------------
 1362|     15|    newStateTable[0][EBCDIC_NL]=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF);
  ------------------
  |  | 1247|     15|#define EBCDIC_NL 0x15
  ------------------
                  newStateTable[0][EBCDIC_NL]=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF);
  ------------------
  |  |  274|     15|#define MBCS_ENTRY_FINAL(state, action, value) (int32_t)(0x80000000|((int32_t)(state)<<24L)|((action)<<20L)|(value))
  ------------------
 1363|       |
 1364|       |    /* copy and modify the from-Unicode result table */
 1365|     15|    newResults = reinterpret_cast<uint16_t*>(newStateTable[mbcsTable->countStates]);
 1366|     15|    uprv_memcpy(newResults, bytes, sizeofFromUBytes);
  ------------------
  |  |   42|     15|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|     15|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|     15|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|     15|    _Pragma("clang diagnostic push") \
  |  |   45|     15|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|     15|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|     15|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|     15|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|     15|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|     15|    _Pragma("clang diagnostic pop") \
  |  |   49|     15|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|     15|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|     15|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|     15|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1367|       |
 1368|       |    /* conveniently, the table access macros work on the left side of expressions */
 1369|     15|    if(mbcsTable->outputType==MBCS_OUTPUT_1) {
  ------------------
  |  Branch (1369:8): [True: 15, False: 0]
  ------------------
 1370|     15|        MBCS_SINGLE_RESULT_FROM_U(table, newResults, U_LF)=EBCDIC_RT_NL;
  ------------------
  |  |  299|     15|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
                      MBCS_SINGLE_RESULT_FROM_U(table, newResults, U_LF)=EBCDIC_RT_NL;
  ------------------
  |  | 1251|     15|#define EBCDIC_RT_NL 0xf15
  ------------------
 1371|     15|        MBCS_SINGLE_RESULT_FROM_U(table, newResults, U_NL)=EBCDIC_RT_LF;
  ------------------
  |  |  299|     15|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
                      MBCS_SINGLE_RESULT_FROM_U(table, newResults, U_NL)=EBCDIC_RT_LF;
  ------------------
  |  | 1250|     15|#define EBCDIC_RT_LF 0xf25
  ------------------
 1372|     15|    } else /* MBCS_OUTPUT_2_SISO */ {
 1373|      0|        stage2Entry=MBCS_STAGE_2_FROM_U(table, U_LF);
  ------------------
  |  |  308|      0|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 1374|      0|        MBCS_VALUE_2_FROM_STAGE_2(newResults, stage2Entry, U_LF)=EBCDIC_NL;
  ------------------
  |  |  311|      0|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
                      MBCS_VALUE_2_FROM_STAGE_2(newResults, stage2Entry, U_LF)=EBCDIC_NL;
  ------------------
  |  | 1247|      0|#define EBCDIC_NL 0x15
  ------------------
 1375|       |
 1376|      0|        stage2Entry=MBCS_STAGE_2_FROM_U(table, U_NL);
  ------------------
  |  |  308|      0|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 1377|      0|        MBCS_VALUE_2_FROM_STAGE_2(newResults, stage2Entry, U_NL)=EBCDIC_LF;
  ------------------
  |  |  311|      0|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
                      MBCS_VALUE_2_FROM_STAGE_2(newResults, stage2Entry, U_NL)=EBCDIC_LF;
  ------------------
  |  | 1246|      0|#define EBCDIC_LF 0x25
  ------------------
 1378|      0|    }
 1379|       |
 1380|       |    /* set the canonical converter name */
 1381|     15|    name = reinterpret_cast<char*>(newResults) + sizeofFromUBytes;
 1382|     15|    uprv_strcpy(name, sharedData->staticData->name);
  ------------------
  |  |   36|     15|#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
  |  |  ------------------
  |  |  |  |  393|     15|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1383|     15|    uprv_strcat(name, UCNV_SWAP_LFNL_OPTION_STRING);
  ------------------
  |  |   39|     15|#define uprv_strcat(dst, src) U_STANDARD_CPP_NAMESPACE strcat(dst, src)
  |  |  ------------------
  |  |  |  |  393|     15|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1384|       |
 1385|       |    /* set the pointers */
 1386|     15|    icu::umtx_lock(nullptr);
  ------------------
  |  | 1250|     15|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|     15|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     15|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     15|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1387|     15|    if(mbcsTable->swapLFNLStateTable==nullptr) {
  ------------------
  |  Branch (1387:8): [True: 15, False: 0]
  ------------------
 1388|     15|        mbcsTable->swapLFNLStateTable=newStateTable;
 1389|     15|        mbcsTable->swapLFNLFromUnicodeBytes = reinterpret_cast<uint8_t*>(newResults);
 1390|     15|        mbcsTable->swapLFNLName=name;
 1391|       |
 1392|     15|        newStateTable=nullptr;
 1393|     15|    }
 1394|     15|    icu::umtx_unlock(nullptr);
  ------------------
  |  | 1251|     15|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|     15|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     15|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     15|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1395|       |
 1396|       |    /* release the allocated memory if another thread beat us to it */
 1397|     15|    if(newStateTable!=nullptr) {
  ------------------
  |  Branch (1397:8): [True: 0, False: 15]
  ------------------
 1398|      0|        uprv_free(newStateTable);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1399|      0|    }
 1400|     15|    return true;
 1401|     15|}
ucnvmbcs.cpp:_ZL17ucnv_MBCSWriteSubP25UConverterFromUnicodeArgsiP10UErrorCode:
 5650|  16.2M|              UErrorCode *pErrorCode) {
 5651|  16.2M|    UConverter *cnv=pArgs->converter;
 5652|  16.2M|    char *p, *subchar;
 5653|  16.2M|    char buffer[4];
 5654|  16.2M|    int32_t length;
 5655|       |
 5656|       |    /* first, select between subChar and subChar1 */
 5657|  16.2M|    if( cnv->subChar1!=0 &&
  ------------------
  |  Branch (5657:9): [True: 3.38M, False: 12.8M]
  ------------------
 5658|  16.2M|        (cnv->sharedData->mbcs.extIndexes!=nullptr ?
  ------------------
  |  Branch (5658:9): [True: 27.8k, False: 3.35M]
  |  Branch (5658:10): [True: 3.38M, False: 0]
  ------------------
 5659|  3.38M|            cnv->useSubChar1 :
 5660|  3.38M|            (cnv->invalidUCharBuffer[0]<=0xff))
 5661|  16.2M|    ) {
 5662|       |        /* select subChar1 if it is set (not 0) and the unmappable Unicode code point is up to U+00ff (IBM MBCS behavior) */
 5663|  27.8k|        subchar = reinterpret_cast<char*>(&cnv->subChar1);
 5664|  27.8k|        length=1;
 5665|  16.1M|    } else {
 5666|       |        /* select subChar in all other cases */
 5667|  16.1M|        subchar = reinterpret_cast<char*>(cnv->subChars);
 5668|  16.1M|        length=cnv->subCharLen;
 5669|  16.1M|    }
 5670|       |
 5671|       |    /* reset the selector for the next code point */
 5672|  16.2M|    cnv->useSubChar1=false;
 5673|       |
 5674|  16.2M|    if (cnv->sharedData->mbcs.outputType == MBCS_OUTPUT_2_SISO) {
  ------------------
  |  Branch (5674:9): [True: 995k, False: 15.2M]
  ------------------
 5675|   995k|        p=buffer;
 5676|       |
 5677|       |        /* fromUnicodeStatus contains prevLength */
 5678|   995k|        switch(length) {
 5679|  14.5k|        case 1:
  ------------------
  |  Branch (5679:9): [True: 14.5k, False: 981k]
  ------------------
 5680|  14.5k|            if(cnv->fromUnicodeStatus==2) {
  ------------------
  |  Branch (5680:16): [True: 877, False: 13.6k]
  ------------------
 5681|       |                /* DBCS mode and SBCS sub char: change to SBCS */
 5682|    877|                cnv->fromUnicodeStatus=1;
 5683|    877|                *p++=UCNV_SI;
  ------------------
  |  |   84|    877|#define  UCNV_SI 0x0F
  ------------------
 5684|    877|            }
 5685|  14.5k|            *p++=subchar[0];
 5686|  14.5k|            break;
 5687|   981k|        case 2:
  ------------------
  |  Branch (5687:9): [True: 981k, False: 14.5k]
  ------------------
 5688|   981k|            if(cnv->fromUnicodeStatus<=1) {
  ------------------
  |  Branch (5688:16): [True: 790k, False: 190k]
  ------------------
 5689|       |                /* SBCS mode and DBCS sub char: change to DBCS */
 5690|   790k|                cnv->fromUnicodeStatus=2;
 5691|   790k|                *p++=UCNV_SO;
  ------------------
  |  |   86|   790k|#define  UCNV_SO 0x0E
  ------------------
 5692|   790k|            }
 5693|   981k|            *p++=subchar[0];
 5694|   981k|            *p++=subchar[1];
 5695|   981k|            break;
 5696|      0|        default:
  ------------------
  |  Branch (5696:9): [True: 0, False: 995k]
  ------------------
 5697|      0|            *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
 5698|      0|            return;
 5699|   995k|        }
 5700|   995k|        subchar=buffer;
 5701|   995k|        length = static_cast<int32_t>(p - buffer);
 5702|   995k|    }
 5703|       |
 5704|  16.2M|    ucnv_cbFromUWriteBytes(pArgs, subchar, length, offsetIndex, pErrorCode);
  ------------------
  |  |  633|  16.2M|#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|  16.2M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  16.2M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  16.2M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5705|  16.2M|}
ucnvmbcs.cpp:_ZL33ucnv_MBCSSingleFromBMPWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
 3812|  10.4M|                              UErrorCode *pErrorCode) {
 3813|  10.4M|    UConverter *cnv;
 3814|  10.4M|    const char16_t *source, *sourceLimit, *lastSource;
 3815|  10.4M|    uint8_t *target;
 3816|  10.4M|    int32_t targetCapacity, length;
 3817|  10.4M|    int32_t *offsets;
 3818|       |
 3819|  10.4M|    const uint16_t *table;
 3820|  10.4M|    const uint16_t *results;
 3821|       |
 3822|  10.4M|    UChar32 c;
 3823|       |
 3824|  10.4M|    int32_t sourceIndex;
 3825|       |
 3826|  10.4M|    uint32_t asciiRoundtrips;
 3827|  10.4M|    uint16_t value, minValue;
 3828|       |
 3829|       |    /* set up the local pointers */
 3830|  10.4M|    cnv=pArgs->converter;
 3831|  10.4M|    source=pArgs->source;
 3832|  10.4M|    sourceLimit=pArgs->sourceLimit;
 3833|  10.4M|    target = reinterpret_cast<uint8_t*>(pArgs->target);
 3834|  10.4M|    targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target);
 3835|  10.4M|    offsets=pArgs->offsets;
 3836|       |
 3837|  10.4M|    table=cnv->sharedData->mbcs.fromUnicodeTable;
 3838|  10.4M|    if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) {
  ------------------
  |  |   45|  10.4M|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
  |  Branch (3838:8): [True: 533, False: 10.4M]
  ------------------
 3839|    533|        results = reinterpret_cast<uint16_t*>(cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes);
 3840|  10.4M|    } else {
 3841|  10.4M|        results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes;
 3842|  10.4M|    }
 3843|  10.4M|    asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
 3844|       |
 3845|  10.4M|    if(cnv->useFallback) {
  ------------------
  |  Branch (3845:8): [True: 0, False: 10.4M]
  ------------------
 3846|       |        /* use all roundtrip and fallback results */
 3847|      0|        minValue=0x800;
 3848|  10.4M|    } else {
 3849|       |        /* use only roundtrips and fallbacks from private-use characters */
 3850|  10.4M|        minValue=0xc00;
 3851|  10.4M|    }
 3852|       |
 3853|       |    /* get the converter state from UConverter */
 3854|  10.4M|    c=cnv->fromUChar32;
 3855|       |
 3856|       |    /* sourceIndex=-1 if the current character began in the previous buffer */
 3857|  10.4M|    sourceIndex= c==0 ? 0 : -1;
  ------------------
  |  Branch (3857:18): [True: 10.4M, False: 0]
  ------------------
 3858|  10.4M|    lastSource=source;
 3859|       |
 3860|       |    /*
 3861|       |     * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
 3862|       |     * for the minimum of the sourceLength and targetCapacity
 3863|       |     */
 3864|  10.4M|    length = static_cast<int32_t>(sourceLimit - source);
 3865|  10.4M|    if(length<targetCapacity) {
  ------------------
  |  Branch (3865:8): [True: 10.4M, False: 0]
  ------------------
 3866|  10.4M|        targetCapacity=length;
 3867|  10.4M|    }
 3868|       |
 3869|       |    /* conversion loop */
 3870|  10.4M|    if(c!=0 && targetCapacity>0) {
  ------------------
  |  Branch (3870:8): [True: 0, False: 10.4M]
  |  Branch (3870:16): [True: 0, False: 0]
  ------------------
 3871|      0|        goto getTrail;
 3872|      0|    }
 3873|       |
 3874|       |#if MBCS_UNROLL_SINGLE_FROM_BMP
 3875|       |    /* unrolling makes it slower on Pentium III/Windows 2000?! */
 3876|       |    /* unroll the loop with the most common case */
 3877|       |unrolled:
 3878|       |    if(targetCapacity>=4) {
 3879|       |        int32_t count, loops;
 3880|       |        uint16_t andedValues;
 3881|       |
 3882|       |        loops=count=targetCapacity>>2;
 3883|       |        do {
 3884|       |            c=*source++;
 3885|       |            andedValues=value=MBCS_SINGLE_RESULT_FROM_U(table, results, c);
 3886|       |            *target++=(uint8_t)value;
 3887|       |            c=*source++;
 3888|       |            andedValues&=value=MBCS_SINGLE_RESULT_FROM_U(table, results, c);
 3889|       |            *target++=(uint8_t)value;
 3890|       |            c=*source++;
 3891|       |            andedValues&=value=MBCS_SINGLE_RESULT_FROM_U(table, results, c);
 3892|       |            *target++=(uint8_t)value;
 3893|       |            c=*source++;
 3894|       |            andedValues&=value=MBCS_SINGLE_RESULT_FROM_U(table, results, c);
 3895|       |            *target++=(uint8_t)value;
 3896|       |
 3897|       |            /* were all 4 entries really valid? */
 3898|       |            if(andedValues<minValue) {
 3899|       |                /* no, return to the first of these 4 */
 3900|       |                source-=4;
 3901|       |                target-=4;
 3902|       |                break;
 3903|       |            }
 3904|       |        } while(--count>0);
 3905|       |        count=loops-count;
 3906|       |        targetCapacity-=4*count;
 3907|       |
 3908|       |        if(offsets!=nullptr) {
 3909|       |            lastSource+=4*count;
 3910|       |            while(count>0) {
 3911|       |                *offsets++=sourceIndex++;
 3912|       |                *offsets++=sourceIndex++;
 3913|       |                *offsets++=sourceIndex++;
 3914|       |                *offsets++=sourceIndex++;
 3915|       |                --count;
 3916|       |            }
 3917|       |        }
 3918|       |
 3919|       |        c=0;
 3920|       |    }
 3921|       |#endif
 3922|       |
 3923|  13.1M|    while(targetCapacity>0) {
  ------------------
  |  Branch (3923:11): [True: 13.1M, False: 263]
  ------------------
 3924|       |        /*
 3925|       |         * Get a correct Unicode code point:
 3926|       |         * a single char16_t for a BMP code point or
 3927|       |         * a matched surrogate pair for a "supplementary code point".
 3928|       |         */
 3929|  13.1M|        c=*source++;
 3930|       |        /*
 3931|       |         * Do not immediately check for single surrogates:
 3932|       |         * Assume that they are unassigned and check for them in that case.
 3933|       |         * This speeds up the conversion of assigned characters.
 3934|       |         */
 3935|       |        /* convert the Unicode code point in c into codepage bytes */
 3936|  13.1M|        if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) {
  ------------------
  |  |  296|  2.57M|#define IS_ASCII_ROUNDTRIP(b, asciiRoundtrips) (((asciiRoundtrips) & (1<<((b)>>2)))!=0)
  |  |  ------------------
  |  |  |  Branch (296:48): [True: 2.43M, False: 142k]
  |  |  ------------------
  ------------------
  |  Branch (3936:12): [True: 2.57M, False: 10.5M]
  ------------------
 3937|  2.43M|            *target++ = static_cast<uint8_t>(c);
 3938|  2.43M|            --targetCapacity;
 3939|  2.43M|            c=0;
 3940|  2.43M|            continue;
 3941|  2.43M|        }
 3942|  10.7M|        value=MBCS_SINGLE_RESULT_FROM_U(table, results, c);
  ------------------
  |  |  299|  10.7M|#define MBCS_SINGLE_RESULT_FROM_U(table, results, c) (results)[ (table)[ (table)[(c)>>10] +(((c)>>4)&0x3f) ] +((c)&0xf) ]
  ------------------
 3943|       |        /* is this code point assigned, or do we use fallbacks? */
 3944|  10.7M|        if(value>=minValue) {
  ------------------
  |  Branch (3944:12): [True: 235k, False: 10.4M]
  ------------------
 3945|       |            /* assigned, write the output character bytes from value and length */
 3946|       |            /* length==1 */
 3947|       |            /* this is easy because we know that there is enough space */
 3948|   235k|            *target++ = static_cast<uint8_t>(value);
 3949|   235k|            --targetCapacity;
 3950|       |
 3951|       |            /* normal end of conversion: prepare for a new character */
 3952|   235k|            c=0;
 3953|   235k|            continue;
 3954|  10.4M|        } else if(!U16_IS_SURROGATE(c)) {
  ------------------
  |  |   75|  10.4M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  10.4M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  ------------------
  ------------------
  |  Branch (3954:19): [True: 10.3M, False: 159k]
  ------------------
 3955|       |            /* normal, unassigned BMP character */
 3956|  10.3M|        } else if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|   159k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 80.0k, False: 79.3k]
  |  |  ------------------
  ------------------
 3957|  80.0k|getTrail:
 3958|  80.0k|            if(source<sourceLimit) {
  ------------------
  |  Branch (3958:16): [True: 80.0k, False: 12]
  ------------------
 3959|       |                /* test the following code unit */
 3960|  80.0k|                char16_t trail=*source;
 3961|  80.0k|                if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  80.0k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 1.75k, False: 78.2k]
  |  |  ------------------
  ------------------
 3962|  1.75k|                    ++source;
 3963|  1.75k|                    c=U16_GET_SUPPLEMENTARY(c, trail);
  ------------------
  |  |  113|  1.75k|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|  1.75k|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 3964|       |                    /* this codepage does not map supplementary code points */
 3965|       |                    /* callback(unassigned) */
 3966|  78.2k|                } else {
 3967|       |                    /* this is an unmatched lead code unit (1st surrogate) */
 3968|       |                    /* callback(illegal) */
 3969|  78.2k|                    *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 3970|  78.2k|                    break;
 3971|  78.2k|                }
 3972|  80.0k|            } else {
 3973|       |                /* no more input */
 3974|     12|                if (pArgs->flush) {
  ------------------
  |  Branch (3974:21): [True: 12, False: 0]
  ------------------
 3975|     12|                    *pErrorCode=U_TRUNCATED_CHAR_FOUND;
 3976|     12|                }
 3977|     12|                break;
 3978|     12|            }
 3979|  80.0k|        } else {
 3980|       |            /* this is an unmatched trail code unit (2nd surrogate) */
 3981|       |            /* callback(illegal) */
 3982|  79.3k|            *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 3983|  79.3k|            break;
 3984|  79.3k|        }
 3985|       |
 3986|       |        /* c does not have a mapping */
 3987|       |
 3988|       |        /* get the number of code units for c to correctly advance sourceIndex */
 3989|  10.3M|        length=U16_LENGTH(c);
  ------------------
  |  |  141|  10.3M|#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
  |  |  ------------------
  |  |  |  Branch (141:24): [True: 10.3M, False: 1.75k]
  |  |  ------------------
  ------------------
 3990|       |
 3991|       |        /* set offsets since the start or the last extension */
 3992|  10.3M|        if(offsets!=nullptr) {
  ------------------
  |  Branch (3992:12): [True: 0, False: 10.3M]
  ------------------
 3993|      0|            int32_t count = static_cast<int32_t>(source - lastSource);
 3994|       |
 3995|       |            /* do not set the offset for this character */
 3996|      0|            count-=length;
 3997|       |
 3998|      0|            while(count>0) {
  ------------------
  |  Branch (3998:19): [True: 0, False: 0]
  ------------------
 3999|      0|                *offsets++=sourceIndex++;
 4000|      0|                --count;
 4001|      0|            }
 4002|       |            /* offsets and sourceIndex are now set for the current character */
 4003|      0|        }
 4004|       |
 4005|       |        /* try an extension mapping */
 4006|  10.3M|        lastSource=source;
 4007|  10.3M|        c=_extFromU(cnv, cnv->sharedData,
 4008|  10.3M|                    c, &source, sourceLimit,
 4009|  10.3M|                    &target, reinterpret_cast<const uint8_t*>(pArgs->targetLimit),
 4010|  10.3M|                    &offsets, sourceIndex,
 4011|  10.3M|                    pArgs->flush,
 4012|  10.3M|                    pErrorCode);
 4013|  10.3M|        sourceIndex += length + static_cast<int32_t>(source - lastSource);
 4014|  10.3M|        lastSource=source;
 4015|       |
 4016|  10.3M|        if(U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (4016:12): [True: 10.3M, False: 695]
  ------------------
 4017|       |            /* not mappable or buffer overflow */
 4018|  10.3M|            break;
 4019|  10.3M|        } else {
 4020|       |            /* a mapping was written to the target, continue */
 4021|       |
 4022|       |            /* recalculate the targetCapacity after an extension mapping */
 4023|    695|            targetCapacity = static_cast<int32_t>(pArgs->targetLimit - reinterpret_cast<char*>(target));
 4024|    695|            length = static_cast<int32_t>(sourceLimit - source);
 4025|    695|            if(length<targetCapacity) {
  ------------------
  |  Branch (4025:16): [True: 695, False: 0]
  ------------------
 4026|    695|                targetCapacity=length;
 4027|    695|            }
 4028|    695|        }
 4029|       |
 4030|       |#if MBCS_UNROLL_SINGLE_FROM_BMP
 4031|       |        /* unrolling makes it slower on Pentium III/Windows 2000?! */
 4032|       |        goto unrolled;
 4033|       |#endif
 4034|  10.3M|    }
 4035|       |
 4036|  10.4M|    if(U_SUCCESS(*pErrorCode) && source<sourceLimit && target>=(uint8_t *)pArgs->targetLimit) {
  ------------------
  |  Branch (4036:8): [True: 263, False: 10.4M]
  |  Branch (4036:34): [True: 0, False: 263]
  |  Branch (4036:56): [True: 0, False: 0]
  ------------------
 4037|       |        /* target is full */
 4038|      0|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 4039|      0|    }
 4040|       |
 4041|       |    /* set offsets since the start or the last callback */
 4042|  10.4M|    if(offsets!=nullptr) {
  ------------------
  |  Branch (4042:8): [True: 0, False: 10.4M]
  ------------------
 4043|      0|        size_t count=source-lastSource;
 4044|      0|        if (count > 0 && *pErrorCode == U_TRUNCATED_CHAR_FOUND) {
  ------------------
  |  Branch (4044:13): [True: 0, False: 0]
  |  Branch (4044:26): [True: 0, False: 0]
  ------------------
 4045|       |            /*
 4046|       |            Caller gave us a partial supplementary character,
 4047|       |            which this function couldn't convert in any case.
 4048|       |            The callback will handle the offset.
 4049|       |            */
 4050|      0|            count--;
 4051|      0|        }
 4052|      0|        while(count>0) {
  ------------------
  |  Branch (4052:15): [True: 0, False: 0]
  ------------------
 4053|      0|            *offsets++=sourceIndex++;
 4054|      0|            --count;
 4055|      0|        }
 4056|      0|    }
 4057|       |
 4058|       |    /* set the converter state back into UConverter */
 4059|  10.4M|    cnv->fromUChar32=c;
 4060|       |
 4061|       |    /* write back the updated pointers */
 4062|  10.4M|    pArgs->source=source;
 4063|  10.4M|    pArgs->target = reinterpret_cast<char*>(target);
 4064|  10.4M|    pArgs->offsets=offsets;
 4065|  10.4M|}
ucnvmbcs.cpp:_ZL37ucnv_MBCSDoubleFromUnicodeWithOffsetsP25UConverterFromUnicodeArgsP10UErrorCode:
 3404|  4.75M|                                  UErrorCode *pErrorCode) {
 3405|  4.75M|    UConverter *cnv;
 3406|  4.75M|    const char16_t *source, *sourceLimit;
 3407|  4.75M|    uint8_t *target;
 3408|  4.75M|    int32_t targetCapacity;
 3409|  4.75M|    int32_t *offsets;
 3410|       |
 3411|  4.75M|    const uint16_t *table;
 3412|  4.75M|    const uint16_t *mbcsIndex;
 3413|  4.75M|    const uint8_t *bytes;
 3414|       |
 3415|  4.75M|    UChar32 c;
 3416|       |
 3417|  4.75M|    int32_t sourceIndex, nextSourceIndex;
 3418|       |
 3419|  4.75M|    uint32_t stage2Entry;
 3420|  4.75M|    uint32_t asciiRoundtrips;
 3421|  4.75M|    uint32_t value;
 3422|  4.75M|    uint8_t unicodeMask;
 3423|       |
 3424|       |    /* use optimized function if possible */
 3425|  4.75M|    cnv=pArgs->converter;
 3426|  4.75M|    unicodeMask=cnv->sharedData->mbcs.unicodeMask;
 3427|       |
 3428|       |    /* set up the local pointers */
 3429|  4.75M|    source=pArgs->source;
 3430|  4.75M|    sourceLimit=pArgs->sourceLimit;
 3431|  4.75M|    target = reinterpret_cast<uint8_t*>(pArgs->target);
 3432|  4.75M|    targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target);
 3433|  4.75M|    offsets=pArgs->offsets;
 3434|       |
 3435|  4.75M|    table=cnv->sharedData->mbcs.fromUnicodeTable;
 3436|  4.75M|    mbcsIndex=cnv->sharedData->mbcs.mbcsIndex;
 3437|  4.75M|    if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) {
  ------------------
  |  |   45|  4.75M|#define UCNV_OPTION_SWAP_LFNL   0x10
  ------------------
  |  Branch (3437:8): [True: 0, False: 4.75M]
  ------------------
 3438|      0|        bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
 3439|  4.75M|    } else {
 3440|  4.75M|        bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
 3441|  4.75M|    }
 3442|  4.75M|    asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
 3443|       |
 3444|       |    /* get the converter state from UConverter */
 3445|  4.75M|    c=cnv->fromUChar32;
 3446|       |
 3447|       |    /* sourceIndex=-1 if the current character began in the previous buffer */
 3448|  4.75M|    sourceIndex= c==0 ? 0 : -1;
  ------------------
  |  Branch (3448:18): [True: 4.75M, False: 0]
  ------------------
 3449|  4.75M|    nextSourceIndex=0;
 3450|       |
 3451|       |    /* conversion loop */
 3452|  4.75M|    if(c!=0 && targetCapacity>0) {
  ------------------
  |  Branch (3452:8): [True: 0, False: 4.75M]
  |  Branch (3452:16): [True: 0, False: 0]
  ------------------
 3453|      0|        goto getTrail;
 3454|      0|    }
 3455|       |
 3456|  6.14M|    while(source<sourceLimit) {
  ------------------
  |  Branch (3456:11): [True: 6.14M, False: 211]
  ------------------
 3457|       |        /*
 3458|       |         * This following test is to see if available input would overflow the output.
 3459|       |         * It does not catch output of more than one byte that
 3460|       |         * overflows as a result of a multi-byte character or callback output
 3461|       |         * from the last source character.
 3462|       |         * Therefore, those situations also test for overflows and will
 3463|       |         * then break the loop, too.
 3464|       |         */
 3465|  6.14M|        if(targetCapacity>0) {
  ------------------
  |  Branch (3465:12): [True: 6.14M, False: 0]
  ------------------
 3466|       |            /*
 3467|       |             * Get a correct Unicode code point:
 3468|       |             * a single char16_t for a BMP code point or
 3469|       |             * a matched surrogate pair for a "supplementary code point".
 3470|       |             */
 3471|  6.14M|            c=*source++;
 3472|  6.14M|            ++nextSourceIndex;
 3473|  6.14M|            if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) {
  ------------------
  |  |  296|   166k|#define IS_ASCII_ROUNDTRIP(b, asciiRoundtrips) (((asciiRoundtrips) & (1<<((b)>>2)))!=0)
  |  |  ------------------
  |  |  |  Branch (296:48): [True: 144k, False: 22.3k]
  |  |  ------------------
  ------------------
  |  Branch (3473:16): [True: 166k, False: 5.97M]
  ------------------
 3474|   144k|                *target++ = static_cast<uint8_t>(c);
 3475|   144k|                if(offsets!=nullptr) {
  ------------------
  |  Branch (3475:20): [True: 0, False: 144k]
  ------------------
 3476|      0|                    *offsets++=sourceIndex;
 3477|      0|                    sourceIndex=nextSourceIndex;
 3478|      0|                }
 3479|   144k|                --targetCapacity;
 3480|   144k|                c=0;
 3481|   144k|                continue;
 3482|   144k|            }
 3483|       |            /*
 3484|       |             * utf8Friendly table: Test for <=0xd7ff rather than <=MBCS_FAST_MAX
 3485|       |             * to avoid dealing with surrogates.
 3486|       |             * MBCS_FAST_MAX must be >=0xd7ff.
 3487|       |             */
 3488|  5.99M|            if(c<=0xd7ff) {
  ------------------
  |  Branch (3488:16): [True: 5.23M, False: 767k]
  ------------------
 3489|  5.23M|                value=DBCS_RESULT_FROM_MOST_BMP(mbcsIndex, (const uint16_t *)bytes, c);
  ------------------
  |  |  317|  5.23M|#define DBCS_RESULT_FROM_MOST_BMP(table, results, c) (results)[ (table)[(c)>>6] +((c)&0x3f) ]
  ------------------
 3490|       |                /* There are only roundtrips (!=0) and no-mapping (==0) entries. */
 3491|  5.23M|                if(value==0) {
  ------------------
  |  Branch (3491:20): [True: 4.12M, False: 1.10M]
  ------------------
 3492|  4.12M|                    goto unassigned;
 3493|  4.12M|                }
 3494|       |                /* output the value */
 3495|  5.23M|            } else {
 3496|       |                /*
 3497|       |                 * This also tests if the codepage maps single surrogates.
 3498|       |                 * If it does, then surrogates are not paired but mapped separately.
 3499|       |                 * Note that in this case unmatched surrogates are not detected.
 3500|       |                 */
 3501|   767k|                if(U16_IS_SURROGATE(c) && !(unicodeMask&UCNV_HAS_SURROGATES)) {
  ------------------
  |  |   75|   767k|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  1.53M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 109k, False: 658k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                              if(U16_IS_SURROGATE(c) && !(unicodeMask&UCNV_HAS_SURROGATES)) {
  ------------------
  |  |   65|   109k|#define UCNV_HAS_SURROGATES    2
  ------------------
  |  Branch (3501:43): [True: 109k, False: 0]
  ------------------
 3502|   109k|                    if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|   109k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 55.2k, False: 53.8k]
  |  |  ------------------
  ------------------
 3503|  55.2k|getTrail:
 3504|  55.2k|                        if(source<sourceLimit) {
  ------------------
  |  Branch (3504:28): [True: 55.2k, False: 12]
  ------------------
 3505|       |                            /* test the following code unit */
 3506|  55.2k|                            char16_t trail=*source;
 3507|  55.2k|                            if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  55.2k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 1.51k, False: 53.7k]
  |  |  ------------------
  ------------------
 3508|  1.51k|                                ++source;
 3509|  1.51k|                                ++nextSourceIndex;
 3510|  1.51k|                                c=U16_GET_SUPPLEMENTARY(c, trail);
  ------------------
  |  |  113|  1.51k|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|  1.51k|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 3511|  1.51k|                                if(!(unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
  ------------------
  |  |   64|  1.51k|#define UCNV_HAS_SUPPLEMENTARY 1
  ------------------
  |  Branch (3511:36): [True: 625, False: 893]
  ------------------
 3512|       |                                    /* BMP-only codepages are stored without stage 1 entries for supplementary code points */
 3513|       |                                    /* callback(unassigned) */
 3514|    625|                                    goto unassigned;
 3515|    625|                                }
 3516|       |                                /* convert this supplementary code point */
 3517|       |                                /* exit this condition tree */
 3518|  53.7k|                            } else {
 3519|       |                                /* this is an unmatched lead code unit (1st surrogate) */
 3520|       |                                /* callback(illegal) */
 3521|  53.7k|                                *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 3522|  53.7k|                                break;
 3523|  53.7k|                            }
 3524|  55.2k|                        } else {
 3525|       |                            /* no more input */
 3526|     12|                            break;
 3527|     12|                        }
 3528|  55.2k|                    } else {
 3529|       |                        /* this is an unmatched trail code unit (2nd surrogate) */
 3530|       |                        /* callback(illegal) */
 3531|  53.8k|                        *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 3532|  53.8k|                        break;
 3533|  53.8k|                    }
 3534|   109k|                }
 3535|       |
 3536|       |                /* convert the Unicode code point in c into codepage bytes */
 3537|   659k|                stage2Entry=MBCS_STAGE_2_FROM_U(table, c);
  ------------------
  |  |  308|   659k|#define MBCS_STAGE_2_FROM_U(table, c) ((const uint32_t *)(table))[ (table)[(c)>>10] +(((c)>>4)&0x3f) ]
  ------------------
 3538|       |
 3539|       |                /* get the bytes and the length for the output */
 3540|       |                /* MBCS_OUTPUT_2 */
 3541|   659k|                value=MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c);
  ------------------
  |  |  311|   659k|#define MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, c) ((uint16_t *)(bytes))[16*(uint32_t)(uint16_t)(stage2Entry)+((c)&0xf)]
  ------------------
 3542|       |
 3543|       |                /* is this code point assigned, or do we use fallbacks? */
 3544|   659k|                if(!(MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ||
  ------------------
  |  |  309|  1.31M|#define MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, c) ( ((stage2Entry) & ((uint32_t)1<< (16+((c)&0xf)) )) !=0)
  |  |  ------------------
  |  |  |  Branch (309:50): [True: 50.3k, False: 608k]
  |  |  ------------------
  ------------------
 3545|   659k|                     (UCNV_FROM_U_USE_FALLBACK(cnv, c) && value!=0))
  ------------------
  |  |  276|   608k|#define UCNV_FROM_U_USE_FALLBACK(cnv, c) FROM_U_USE_FALLBACK((cnv)->useFallback, c)
  |  |  ------------------
  |  |  |  |  275|  1.21M|#define FROM_U_USE_FALLBACK(useFallback, c) ((useFallback) || IS_PRIVATE_USE(c))
  |  |  |  |  ------------------
  |  |  |  |  |  |  274|   608k|#define IS_PRIVATE_USE(c) ((uint32_t)((c)-0xe000)<0x1900 || (uint32_t)((c)-0xf0000)<0x20000)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (274:28): [True: 337k, False: 271k]
  |  |  |  |  |  |  |  Branch (274:61): [True: 291, False: 270k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (275:46): [True: 0, False: 608k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3545:59): [True: 76.4k, False: 261k]
  ------------------
 3546|   659k|                ) {
 3547|       |                    /*
 3548|       |                     * We allow a 0 byte output if the "assigned" bit is set for this entry.
 3549|       |                     * There is no way with this data structure for fallback output
 3550|       |                     * to be a zero byte.
 3551|       |                     */
 3552|       |
 3553|  4.65M|unassigned:
 3554|       |                    /* try an extension mapping */
 3555|  4.65M|                    pArgs->source=source;
 3556|  4.65M|                    c=_extFromU(cnv, cnv->sharedData,
 3557|  4.65M|                                c, &source, sourceLimit,
 3558|  4.65M|                                &target, target+targetCapacity,
 3559|  4.65M|                                &offsets, sourceIndex,
 3560|  4.65M|                                pArgs->flush,
 3561|  4.65M|                                pErrorCode);
 3562|  4.65M|                    nextSourceIndex += static_cast<int32_t>(source - pArgs->source);
 3563|       |
 3564|  4.65M|                    if(U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (3564:24): [True: 4.65M, False: 3.31k]
  ------------------
 3565|       |                        /* not mappable or buffer overflow */
 3566|  4.65M|                        break;
 3567|  4.65M|                    } else {
 3568|       |                        /* a mapping was written to the target, continue */
 3569|       |
 3570|       |                        /* recalculate the targetCapacity after an extension mapping */
 3571|  3.31k|                        targetCapacity = static_cast<int32_t>(pArgs->targetLimit - reinterpret_cast<char*>(target));
 3572|       |
 3573|       |                        /* normal end of conversion: prepare for a new character */
 3574|  3.31k|                        sourceIndex=nextSourceIndex;
 3575|  3.31k|                        continue;
 3576|  3.31k|                    }
 3577|  4.65M|                }
 3578|   659k|            }
 3579|       |
 3580|       |            /* write the output character bytes from value and length */
 3581|       |            /* from the first if in the loop we know that targetCapacity>0 */
 3582|  1.23M|            if(value<=0xff) {
  ------------------
  |  Branch (3582:16): [True: 4.22k, False: 1.23M]
  ------------------
 3583|       |                /* this is easy because we know that there is enough space */
 3584|  4.22k|                *target++ = static_cast<uint8_t>(value);
 3585|  4.22k|                if(offsets!=nullptr) {
  ------------------
  |  Branch (3585:20): [True: 0, False: 4.22k]
  ------------------
 3586|      0|                    *offsets++=sourceIndex;
 3587|      0|                }
 3588|  4.22k|                --targetCapacity;
 3589|  1.23M|            } else /* length==2 */ {
 3590|  1.23M|                *target++ = static_cast<uint8_t>(value >> 8);
 3591|  1.23M|                if(2<=targetCapacity) {
  ------------------
  |  Branch (3591:20): [True: 1.23M, False: 0]
  ------------------
 3592|  1.23M|                    *target++ = static_cast<uint8_t>(value);
 3593|  1.23M|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (3593:24): [True: 0, False: 1.23M]
  ------------------
 3594|      0|                        *offsets++=sourceIndex;
 3595|      0|                        *offsets++=sourceIndex;
 3596|      0|                    }
 3597|  1.23M|                    targetCapacity-=2;
 3598|  1.23M|                } else {
 3599|      0|                    if(offsets!=nullptr) {
  ------------------
  |  Branch (3599:24): [True: 0, False: 0]
  ------------------
 3600|      0|                        *offsets++=sourceIndex;
 3601|      0|                    }
 3602|      0|                    cnv->charErrorBuffer[0] = static_cast<char>(value);
 3603|      0|                    cnv->charErrorBufferLength=1;
 3604|       |
 3605|       |                    /* target overflow */
 3606|      0|                    targetCapacity=0;
 3607|      0|                    *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 3608|      0|                    c=0;
 3609|      0|                    break;
 3610|      0|                }
 3611|  1.23M|            }
 3612|       |
 3613|       |            /* normal end of conversion: prepare for a new character */
 3614|  1.23M|            c=0;
 3615|  1.23M|            sourceIndex=nextSourceIndex;
 3616|  1.23M|            continue;
 3617|  1.23M|        } else {
 3618|       |            /* target is full */
 3619|      0|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 3620|      0|            break;
 3621|      0|        }
 3622|  6.14M|    }
 3623|       |
 3624|       |    /* set the converter state back into UConverter */
 3625|  4.75M|    cnv->fromUChar32=c;
 3626|       |
 3627|       |    /* write back the updated pointers */
 3628|  4.75M|    pArgs->source=source;
 3629|  4.75M|    pArgs->target = reinterpret_cast<char*>(target);
 3630|  4.75M|    pArgs->offsets=offsets;
 3631|  4.75M|}
ucnvmbcs.cpp:_ZL12getSISOBytes11SISO_OptionjPh:
  585|  2.02M|static int32_t getSISOBytes(SISO_Option option, uint32_t cnvOption, uint8_t *value) {
  586|  2.02M|    int32_t SISOLength = 0;
  587|       |
  588|  2.02M|    switch (option) {
  589|  1.01M|        case SI:
  ------------------
  |  Branch (589:9): [True: 1.01M, False: 1.01M]
  ------------------
  590|  1.01M|            if ((cnvOption&_MBCS_OPTION_KEIS)!=0) {
  ------------------
  |  |  562|  1.01M|#define _MBCS_OPTION_KEIS 0x01000
  ------------------
  |  Branch (590:17): [True: 0, False: 1.01M]
  ------------------
  591|      0|                value[0] = KEIS_SI_CHAR_1;
  ------------------
  |  |  568|      0|#define KEIS_SI_CHAR_1 0x0A
  ------------------
  592|      0|                value[1] = KEIS_SI_CHAR_2;
  ------------------
  |  |  569|      0|#define KEIS_SI_CHAR_2 0x41
  ------------------
  593|      0|                SISOLength = 2;
  594|  1.01M|            } else if ((cnvOption&_MBCS_OPTION_JEF)!=0) {
  ------------------
  |  |  563|  1.01M|#define _MBCS_OPTION_JEF  0x02000
  ------------------
  |  Branch (594:24): [True: 0, False: 1.01M]
  ------------------
  595|      0|                value[0] = JEF_SI_CHAR;
  ------------------
  |  |  572|      0|#define JEF_SI_CHAR 0x29
  ------------------
  596|      0|                SISOLength = 1;
  597|  1.01M|            } else if ((cnvOption&_MBCS_OPTION_JIPS)!=0) {
  ------------------
  |  |  564|  1.01M|#define _MBCS_OPTION_JIPS 0x04000
  ------------------
  |  Branch (597:24): [True: 0, False: 1.01M]
  ------------------
  598|      0|                value[0] = JIPS_SI_CHAR_1;
  ------------------
  |  |  576|      0|#define JIPS_SI_CHAR_1 0x1A
  ------------------
  599|      0|                value[1] = JIPS_SI_CHAR_2;
  ------------------
  |  |  577|      0|#define JIPS_SI_CHAR_2 0x71
  ------------------
  600|      0|                SISOLength = 2;
  601|  1.01M|            } else {
  602|  1.01M|                value[0] = UCNV_SI;
  ------------------
  |  |   84|  1.01M|#define  UCNV_SI 0x0F
  ------------------
  603|  1.01M|                SISOLength = 1;
  604|  1.01M|            }
  605|  1.01M|            break;
  606|  1.01M|        case SO:
  ------------------
  |  Branch (606:9): [True: 1.01M, False: 1.01M]
  ------------------
  607|  1.01M|            if ((cnvOption&_MBCS_OPTION_KEIS)!=0) {
  ------------------
  |  |  562|  1.01M|#define _MBCS_OPTION_KEIS 0x01000
  ------------------
  |  Branch (607:17): [True: 0, False: 1.01M]
  ------------------
  608|      0|                value[0] = KEIS_SO_CHAR_1;
  ------------------
  |  |  566|      0|#define KEIS_SO_CHAR_1 0x0A
  ------------------
  609|      0|                value[1] = KEIS_SO_CHAR_2;
  ------------------
  |  |  567|      0|#define KEIS_SO_CHAR_2 0x42
  ------------------
  610|      0|                SISOLength = 2;
  611|  1.01M|            } else if ((cnvOption&_MBCS_OPTION_JEF)!=0) {
  ------------------
  |  |  563|  1.01M|#define _MBCS_OPTION_JEF  0x02000
  ------------------
  |  Branch (611:24): [True: 0, False: 1.01M]
  ------------------
  612|      0|                value[0] = JEF_SO_CHAR;
  ------------------
  |  |  571|      0|#define JEF_SO_CHAR 0x28
  ------------------
  613|      0|                SISOLength = 1;
  614|  1.01M|            } else if ((cnvOption&_MBCS_OPTION_JIPS)!=0) {
  ------------------
  |  |  564|  1.01M|#define _MBCS_OPTION_JIPS 0x04000
  ------------------
  |  Branch (614:24): [True: 0, False: 1.01M]
  ------------------
  615|      0|                value[0] = JIPS_SO_CHAR_1;
  ------------------
  |  |  574|      0|#define JIPS_SO_CHAR_1 0x1A
  ------------------
  616|      0|                value[1] = JIPS_SO_CHAR_2;
  ------------------
  |  |  575|      0|#define JIPS_SO_CHAR_2 0x70
  ------------------
  617|      0|                SISOLength = 2;
  618|  1.01M|            } else {
  619|  1.01M|                value[0] = UCNV_SO;
  ------------------
  |  |   86|  1.01M|#define  UCNV_SO 0x0E
  ------------------
  620|  1.01M|                SISOLength = 1;
  621|  1.01M|            }
  622|  1.01M|            break;
  623|      0|        default:
  ------------------
  |  Branch (623:9): [True: 0, False: 2.02M]
  ------------------
  624|       |            /* Should never happen. */
  625|      0|            break;
  626|  2.02M|    }
  627|       |
  628|  2.02M|    return SISOLength;
  629|  2.02M|}
ucnvmbcs.cpp:_ZL9_extFromUP10UConverterPK20UConverterSharedDataiPPKDsS5_PPhPKhPPiiaP10UErrorCode:
 1111|  16.6M|          UErrorCode *pErrorCode) {
 1112|  16.6M|    const int32_t *cx;
 1113|       |
 1114|  16.6M|    cnv->useSubChar1=false;
 1115|       |
 1116|  16.6M|    if( (cx=sharedData->mbcs.extIndexes)!=nullptr &&
  ------------------
  |  Branch (1116:9): [True: 6.81M, False: 9.87M]
  ------------------
 1117|  16.6M|        ucnv_extInitialMatchFromU(
  ------------------
  |  |  655|  6.81M|#define ucnv_extInitialMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extInitialMatchFromU)
  |  |  ------------------
  |  |  |  |  123|  6.81M|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  6.81M|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  6.81M|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1117:9): [True: 38.0k, False: 6.77M]
  ------------------
 1118|  6.81M|            cnv, cx,
 1119|  6.81M|            cp, source, sourceLimit,
 1120|  6.81M|            reinterpret_cast<char**>(target), reinterpret_cast<const char*>(targetLimit),
 1121|  6.81M|            offsets, sourceIndex,
 1122|  6.81M|            flush,
 1123|  6.81M|            pErrorCode)
 1124|  16.6M|    ) {
 1125|  38.0k|        return 0; /* an extension mapping handled the input */
 1126|  38.0k|    }
 1127|       |
 1128|       |    /* GB 18030 */
 1129|  16.6M|    if((cnv->options&_MBCS_OPTION_GB18030)!=0) {
  ------------------
  |  |  559|  16.6M|#define _MBCS_OPTION_GB18030 0x8000
  ------------------
  |  Branch (1129:8): [True: 655k, False: 15.9M]
  ------------------
 1130|   655k|        const uint32_t *range;
 1131|   655k|        int32_t i;
 1132|       |
 1133|   655k|        range=gb18030Ranges[0];
 1134|  3.85M|        for(i=0; i<UPRV_LENGTHOF(gb18030Ranges); range+=4, ++i) {
  ------------------
  |  |   99|  3.85M|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  |  Branch (1134:18): [True: 3.85M, False: 0]
  ------------------
 1135|  3.85M|            if (range[0] <= static_cast<uint32_t>(cp) && static_cast<uint32_t>(cp) <= range[1]) {
  ------------------
  |  Branch (1135:17): [True: 1.93M, False: 1.91M]
  |  Branch (1135:58): [True: 655k, False: 1.28M]
  ------------------
 1136|       |                /* found the Unicode code point, output the four-byte sequence for it */
 1137|   655k|                uint32_t linear;
 1138|   655k|                char bytes[4];
 1139|       |
 1140|       |                /* get the linear value of the first GB 18030 code in this range */
 1141|   655k|                linear=range[2]-LINEAR_18030_BASE;
  ------------------
  |  |  527|   655k|#define LINEAR_18030_BASE LINEAR_18030(0x81, 0x30, 0x81, 0x30)
  |  |  ------------------
  |  |  |  |  525|   655k|#define LINEAR_18030(a, b, c, d) ((((a)*10+(b))*126L+(c))*10L+(d))
  |  |  ------------------
  ------------------
 1142|       |
 1143|       |                /* add the offset from the beginning of the range */
 1144|   655k|                linear += (static_cast<uint32_t>(cp) - range[0]);
 1145|       |
 1146|       |                /* turn this into a four-byte sequence */
 1147|   655k|                bytes[3] = static_cast<char>(0x30 + linear % 10); linear /= 10;
 1148|   655k|                bytes[2] = static_cast<char>(0x81 + linear % 126); linear /= 126;
 1149|   655k|                bytes[1] = static_cast<char>(0x30 + linear % 10); linear /= 10;
 1150|   655k|                bytes[0] = static_cast<char>(0x81 + linear);
 1151|       |
 1152|       |                /* output this sequence */
 1153|   655k|                ucnv_fromUWriteBytes(cnv,
  ------------------
  |  |  664|   655k|#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes)
  |  |  ------------------
  |  |  |  |  123|   655k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|   655k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|   655k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1154|   655k|                                     bytes, 4, reinterpret_cast<char**>(target), reinterpret_cast<const char*>(targetLimit),
 1155|   655k|                                     offsets, sourceIndex, pErrorCode);
 1156|   655k|                return 0;
 1157|   655k|            }
 1158|  3.85M|        }
 1159|   655k|    }
 1160|       |
 1161|       |    /* no mapping */
 1162|  15.9M|    *pErrorCode=U_INVALID_CHAR_FOUND;
 1163|  15.9M|    return cp;
 1164|  16.6M|}

ucnvscsu.cpp:_ZL9_SCSUOpenP10UConverterP18UConverterLoadArgsP10UErrorCode:
  197|    968|          UErrorCode *pErrorCode) {
  198|    968|    const char *locale=pArgs->locale;
  199|    968|    if(pArgs->onlyTestIsLoadable) {
  ------------------
  |  Branch (199:8): [True: 1, False: 967]
  ------------------
  200|      1|        return;
  201|      1|    }
  202|    967|    cnv->extraInfo=uprv_malloc(sizeof(SCSUData));
  ------------------
  |  | 1524|    967|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|    967|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    967|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    967|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|    967|    if(cnv->extraInfo!=nullptr) {
  ------------------
  |  Branch (203:8): [True: 967, False: 0]
  ------------------
  204|    967|        if(locale!=nullptr && locale[0]=='j' && locale[1]=='a' && (locale[2]==0 || locale[2]=='_')) {
  ------------------
  |  Branch (204:12): [True: 967, False: 0]
  |  Branch (204:31): [True: 0, False: 967]
  |  Branch (204:49): [True: 0, False: 0]
  |  Branch (204:68): [True: 0, False: 0]
  |  Branch (204:84): [True: 0, False: 0]
  ------------------
  205|      0|            ((SCSUData *)cnv->extraInfo)->locale=l_ja;
  206|    967|        } else {
  207|    967|            ((SCSUData *)cnv->extraInfo)->locale=lGeneric;
  208|    967|        }
  209|    967|        _SCSUReset(cnv, UCNV_RESET_BOTH);
  210|    967|    } else {
  211|      0|        *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
  212|      0|    }
  213|       |
  214|       |    /* Set the substitution character U+fffd as a Unicode string. */
  215|    967|    cnv->subUChars[0]=0xfffd;
  216|    967|    cnv->subCharLen=-1;
  217|    967|}
ucnvscsu.cpp:_ZL10_SCSUCloseP10UConverter:
  220|    967|_SCSUClose(UConverter *cnv) {
  221|    967|    if(cnv->extraInfo!=nullptr) {
  ------------------
  |  Branch (221:8): [True: 967, False: 0]
  ------------------
  222|    967|        if(!cnv->isExtraLocal) {
  ------------------
  |  Branch (222:12): [True: 967, False: 0]
  ------------------
  223|    967|            uprv_free(cnv->extraInfo);
  ------------------
  |  | 1503|    967|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|    967|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    967|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    967|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|    967|        }
  225|    967|        cnv->extraInfo=nullptr;
  226|    967|    }
  227|    967|}
ucnvscsu.cpp:_ZL10_SCSUResetP10UConverter21UConverterResetChoice:
  159|  2.89k|_SCSUReset(UConverter *cnv, UConverterResetChoice choice) {
  160|  2.89k|    SCSUData *scsu=(SCSUData *)cnv->extraInfo;
  161|       |
  162|  2.89k|    if(choice<=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (162:8): [True: 967, False: 1.93k]
  ------------------
  163|       |        /* reset toUnicode */
  164|    967|        uprv_memcpy(scsu->toUDynamicOffsets, initialDynamicOffsets, 32);
  ------------------
  |  |   42|    967|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    967|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|    967|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|    967|    _Pragma("clang diagnostic push") \
  |  |   45|    967|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|    967|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|    967|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|    967|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|    967|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|    967|    _Pragma("clang diagnostic pop") \
  |  |   49|    967|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|    967|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|    967|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    967|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|       |
  166|    967|        scsu->toUIsSingleByteMode=true;
  167|    967|        scsu->toUState=readCommand;
  168|    967|        scsu->toUQuoteWindow=scsu->toUDynamicWindow=0;
  169|    967|        scsu->toUByteOne=0;
  170|       |
  171|    967|        cnv->toULength=0;
  172|    967|    }
  173|  2.89k|    if(choice!=UCNV_RESET_TO_UNICODE) {
  ------------------
  |  Branch (173:8): [True: 2.89k, False: 0]
  ------------------
  174|       |        /* reset fromUnicode */
  175|  2.89k|        uprv_memcpy(scsu->fromUDynamicOffsets, initialDynamicOffsets, 32);
  ------------------
  |  |   42|  2.89k|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  2.89k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  2.89k|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  2.89k|    _Pragma("clang diagnostic push") \
  |  |   45|  2.89k|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  2.89k|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  2.89k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  2.89k|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  2.89k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  2.89k|    _Pragma("clang diagnostic pop") \
  |  |   49|  2.89k|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  2.89k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  2.89k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  2.89k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|       |
  177|  2.89k|        scsu->fromUIsSingleByteMode=true;
  178|  2.89k|        scsu->fromUDynamicWindow=0;
  179|       |
  180|  2.89k|        scsu->nextWindowUseIndex=0;
  181|  2.89k|        switch(scsu->locale) {
  182|      0|        case l_ja:
  ------------------
  |  Branch (182:9): [True: 0, False: 2.89k]
  ------------------
  183|      0|            uprv_memcpy(scsu->windowUse, initialWindowUse_ja, 8);
  ------------------
  |  |   42|      0|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      0|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      0|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      0|    _Pragma("clang diagnostic push") \
  |  |   45|      0|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      0|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      0|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      0|    _Pragma("clang diagnostic pop") \
  |  |   49|      0|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      0|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      0|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  184|      0|            break;
  185|  2.89k|        default:
  ------------------
  |  Branch (185:9): [True: 2.89k, False: 0]
  ------------------
  186|  2.89k|            uprv_memcpy(scsu->windowUse, initialWindowUse, 8);
  ------------------
  |  |   42|  2.89k|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  2.89k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|  2.89k|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|  2.89k|    _Pragma("clang diagnostic push") \
  |  |   45|  2.89k|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|  2.89k|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|  2.89k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|  2.89k|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|  2.89k|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|  2.89k|    _Pragma("clang diagnostic pop") \
  |  |   49|  2.89k|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|  2.89k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|  2.89k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  2.89k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|  2.89k|            break;
  188|  2.89k|        }
  189|       |
  190|  2.89k|        cnv->fromUChar32=0;
  191|  2.89k|    }
  192|  2.89k|}
ucnvscsu.cpp:_ZL16_SCSUFromUnicodeP25UConverterFromUnicodeArgsP10UErrorCode:
 1518|  68.6M|                 UErrorCode *pErrorCode) {
 1519|  68.6M|    UConverter *cnv;
 1520|  68.6M|    SCSUData *scsu;
 1521|  68.6M|    const char16_t *source, *sourceLimit;
 1522|  68.6M|    uint8_t *target;
 1523|  68.6M|    int32_t targetCapacity;
 1524|       |
 1525|  68.6M|    UBool isSingleByteMode;
 1526|  68.6M|    uint8_t dynamicWindow;
 1527|  68.6M|    uint32_t currentOffset;
 1528|       |
 1529|  68.6M|    uint32_t c, delta;
 1530|       |
 1531|  68.6M|    int32_t length;
 1532|       |
 1533|       |    /* variables for compression heuristics */
 1534|  68.6M|    uint32_t offset;
 1535|  68.6M|    char16_t lead, trail;
 1536|  68.6M|    int code;
 1537|  68.6M|    int8_t window;
 1538|       |
 1539|       |    /* set up the local pointers */
 1540|  68.6M|    cnv=pArgs->converter;
 1541|  68.6M|    scsu=(SCSUData *)cnv->extraInfo;
 1542|       |
 1543|       |    /* set up the local pointers */
 1544|  68.6M|    source=pArgs->source;
 1545|  68.6M|    sourceLimit=pArgs->sourceLimit;
 1546|  68.6M|    target=(uint8_t *)pArgs->target;
 1547|  68.6M|    targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target);
 1548|       |
 1549|       |    /* get the state machine state */
 1550|  68.6M|    isSingleByteMode=scsu->fromUIsSingleByteMode;
 1551|  68.6M|    dynamicWindow=scsu->fromUDynamicWindow;
 1552|  68.6M|    currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
 1553|       |
 1554|  68.6M|    c=cnv->fromUChar32;
 1555|       |
 1556|       |    /* similar conversion "loop" as in toUnicode */
 1557|   103M|loop:
 1558|   103M|    if(isSingleByteMode) {
  ------------------
  |  Branch (1558:8): [True: 102M, False: 873k]
  ------------------
 1559|   102M|        if(c!=0 && targetCapacity>0) {
  ------------------
  |  Branch (1559:12): [True: 0, False: 102M]
  |  Branch (1559:20): [True: 0, False: 0]
  ------------------
 1560|      0|            goto getTrailSingle;
 1561|      0|        }
 1562|       |
 1563|       |        /* state machine for single-byte mode */
 1564|       |/* singleByteMode: */
 1565|   102M|        while(source<sourceLimit) {
  ------------------
  |  Branch (1565:15): [True: 68.6M, False: 34.0M]
  ------------------
 1566|  68.6M|            if(targetCapacity<=0) {
  ------------------
  |  Branch (1566:16): [True: 396, False: 68.6M]
  ------------------
 1567|       |                /* target is full */
 1568|    396|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1569|    396|                break;
 1570|    396|            }
 1571|  68.6M|            c=*source++;
 1572|       |
 1573|  68.6M|            if((c-0x20)<=0x5f) {
  ------------------
  |  Branch (1573:16): [True: 25.8k, False: 68.5M]
  ------------------
 1574|       |                /* pass US-ASCII graphic character through */
 1575|  25.8k|                *target++=(uint8_t)c;
 1576|  25.8k|                --targetCapacity;
 1577|  68.5M|            } else if(c<0x20) {
  ------------------
  |  Branch (1577:23): [True: 26.8k, False: 68.5M]
  ------------------
 1578|  26.8k|                if((1UL<<c)&0x2601 /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */) {
  ------------------
  |  Branch (1578:20): [True: 24.3k, False: 2.53k]
  ------------------
 1579|       |                    /* CR/LF/TAB/NUL */
 1580|  24.3k|                    *target++=(uint8_t)c;
 1581|  24.3k|                    --targetCapacity;
 1582|  24.3k|                } else {
 1583|       |                    /* quote C0 control character */
 1584|  2.53k|                    c|=SQ0<<8;
 1585|  2.53k|                    length=2;
 1586|  2.53k|                    goto outputBytes;
 1587|  2.53k|                }
 1588|  68.5M|            } else if((delta=c-currentOffset)<=0x7f) {
  ------------------
  |  Branch (1588:23): [True: 139k, False: 68.4M]
  ------------------
 1589|       |                /* use the current dynamic window */
 1590|   139k|                *target++=(uint8_t)(delta|0x80);
 1591|   139k|                --targetCapacity;
 1592|  68.4M|            } else if(U16_IS_SURROGATE(c)) {
  ------------------
  |  |   75|  68.4M|#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
  |  |  ------------------
  |  |  |  |  193|  68.4M|#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:27): [True: 34.1M, False: 34.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1593|  34.1M|                if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|  34.1M|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 29.5k, False: 34.0M]
  |  |  ------------------
  ------------------
 1594|  29.5k|getTrailSingle:
 1595|  29.5k|                    lead=(char16_t)c;
 1596|  29.5k|                    if(source<sourceLimit) {
  ------------------
  |  Branch (1596:24): [True: 29.5k, False: 59]
  ------------------
 1597|       |                        /* test the following code unit */
 1598|  29.5k|                        trail=*source;
 1599|  29.5k|                        if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  29.5k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 21.5k, False: 7.99k]
  |  |  ------------------
  ------------------
 1600|  21.5k|                            ++source;
 1601|  21.5k|                            c=U16_GET_SUPPLEMENTARY(c, trail);
  ------------------
  |  |  113|  21.5k|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|  21.5k|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 1602|       |                            /* convert this surrogate code point */
 1603|       |                            /* exit this condition tree */
 1604|  21.5k|                        } else {
 1605|       |                            /* this is an unmatched lead code unit (1st surrogate) */
 1606|       |                            /* callback(illegal) */
 1607|  7.99k|                            *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 1608|  7.99k|                            goto endloop;
 1609|  7.99k|                        }
 1610|  29.5k|                    } else {
 1611|       |                        /* no more input */
 1612|     59|                        break;
 1613|     59|                    }
 1614|  34.0M|                } else {
 1615|       |                    /* this is an unmatched trail code unit (2nd surrogate) */
 1616|       |                    /* callback(illegal) */
 1617|  34.0M|                    *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 1618|  34.0M|                    goto endloop;
 1619|  34.0M|                }
 1620|       |
 1621|       |                /* compress supplementary character U+10000..U+10ffff */
 1622|  21.5k|                if((delta=c-currentOffset)<=0x7f) {
  ------------------
  |  Branch (1622:20): [True: 228, False: 21.2k]
  ------------------
 1623|       |                    /* use the current dynamic window */
 1624|    228|                    *target++=(uint8_t)(delta|0x80);
 1625|    228|                    --targetCapacity;
 1626|  21.2k|                } else if((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) {
  ------------------
  |  Branch (1626:27): [True: 958, False: 20.3k]
  ------------------
 1627|       |                    /* there is a dynamic window that contains this character, change to it */
 1628|    958|                    dynamicWindow=window;
 1629|    958|                    currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
 1630|    958|                    useDynamicWindow(scsu, dynamicWindow);
 1631|    958|                    c=((uint32_t)(SC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
 1632|    958|                    length=2;
 1633|    958|                    goto outputBytes;
 1634|  20.3k|                } else if((code=getDynamicOffset(c, &offset))>=0) {
  ------------------
  |  Branch (1634:27): [True: 3.52k, False: 16.8k]
  ------------------
 1635|       |                    /* might check if there are more characters in this window to come */
 1636|       |                    /* define an extended window with this character */
 1637|  3.52k|                    code-=0x200;
 1638|  3.52k|                    dynamicWindow=getNextDynamicWindow(scsu);
 1639|  3.52k|                    currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
 1640|  3.52k|                    useDynamicWindow(scsu, dynamicWindow);
 1641|  3.52k|                    c=((uint32_t)SDX<<24)|((uint32_t)dynamicWindow<<21)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
 1642|  3.52k|                    length=4;
 1643|  3.52k|                    goto outputBytes;
 1644|  16.8k|                } else {
 1645|       |                    /* change to Unicode mode and output this (lead, trail) pair */
 1646|  16.8k|                    isSingleByteMode=false;
 1647|  16.8k|                    *target++=(uint8_t)SCU;
 1648|  16.8k|                    --targetCapacity;
 1649|  16.8k|                    c=((uint32_t)lead<<16)|trail;
 1650|  16.8k|                    length=4;
 1651|  16.8k|                    goto outputBytes;
 1652|  16.8k|                }
 1653|  34.3M|            } else if(c<0xa0) {
  ------------------
  |  Branch (1653:23): [True: 557, False: 34.3M]
  ------------------
 1654|       |                /* quote C1 control character */
 1655|    557|                c=(c&0x7f)|(SQ0+1)<<8; /* SQ0+1==SQ1 */
 1656|    557|                length=2;
 1657|    557|                goto outputBytes;
 1658|  34.3M|            } else if(c==0xfeff || c>=0xfff0) {
  ------------------
  |  Branch (1658:23): [True: 210, False: 34.2M]
  |  Branch (1658:36): [True: 34.0M, False: 210k]
  ------------------
 1659|       |                /* quote signature character=byte order mark and specials */
 1660|  34.0M|                c|=SQU<<16;
 1661|  34.0M|                length=3;
 1662|  34.0M|                goto outputBytes;
 1663|  34.0M|            } else {
 1664|       |                /* compress all other BMP characters */
 1665|   210k|                if((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) {
  ------------------
  |  Branch (1665:20): [True: 14.2k, False: 196k]
  ------------------
 1666|       |                    /* there is a window defined that contains this character - switch to it or quote from it? */
 1667|  14.2k|                    if(source>=sourceLimit || isInOffsetWindowOrDirect(scsu->fromUDynamicOffsets[window], *source)) {
  ------------------
  |  Branch (1667:24): [True: 53, False: 14.1k]
  |  Branch (1667:47): [True: 2.73k, False: 11.4k]
  ------------------
 1668|       |                        /* change to dynamic window */
 1669|  2.79k|                        dynamicWindow=window;
 1670|  2.79k|                        currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
 1671|  2.79k|                        useDynamicWindow(scsu, dynamicWindow);
 1672|  2.79k|                        c=((uint32_t)(SC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
 1673|  2.79k|                        length=2;
 1674|  2.79k|                        goto outputBytes;
 1675|  11.4k|                    } else {
 1676|       |                        /* quote from dynamic window */
 1677|  11.4k|                        c=((uint32_t)(SQ0+window)<<8)|(c-scsu->fromUDynamicOffsets[window])|0x80;
 1678|  11.4k|                        length=2;
 1679|  11.4k|                        goto outputBytes;
 1680|  11.4k|                    }
 1681|   196k|                } else if((window=getWindow(staticOffsets, c))>=0) {
  ------------------
  |  Branch (1681:27): [True: 5.78k, False: 190k]
  ------------------
 1682|       |                    /* quote from static window */
 1683|  5.78k|                    c=((uint32_t)(SQ0+window)<<8)|(c-staticOffsets[window]);
 1684|  5.78k|                    length=2;
 1685|  5.78k|                    goto outputBytes;
 1686|   190k|                } else if((code=getDynamicOffset(c, &offset))>=0) {
  ------------------
  |  Branch (1686:27): [True: 23.6k, False: 167k]
  ------------------
 1687|       |                    /* define a dynamic window with this character */
 1688|  23.6k|                    dynamicWindow=getNextDynamicWindow(scsu);
 1689|  23.6k|                    currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
 1690|  23.6k|                    useDynamicWindow(scsu, dynamicWindow);
 1691|  23.6k|                    c=((uint32_t)(SD0+dynamicWindow)<<16)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
 1692|  23.6k|                    length=3;
 1693|  23.6k|                    goto outputBytes;
 1694|   167k|                } else if (c - 0x3400 < 0xd800 - 0x3400 &&
  ------------------
  |  Branch (1694:28): [True: 167k, False: 0]
  ------------------
 1695|   167k|                           (source >= sourceLimit || static_cast<uint32_t>(*source - 0x3400) < 0xd800 - 0x3400)
  ------------------
  |  Branch (1695:29): [True: 31, False: 167k]
  |  Branch (1695:54): [True: 5.91k, False: 161k]
  ------------------
 1696|   167k|                ) {
 1697|       |                    /*
 1698|       |                     * this character is not compressible (a BMP ideograph or similar);
 1699|       |                     * switch to Unicode mode if this is the last character in the block
 1700|       |                     * or there is at least one more ideograph following immediately
 1701|       |                     */
 1702|  5.95k|                    isSingleByteMode=false;
 1703|  5.95k|                    c|=SCU<<16;
 1704|  5.95k|                    length=3;
 1705|  5.95k|                    goto outputBytes;
 1706|   161k|                } else {
 1707|       |                    /* quote Unicode */
 1708|   161k|                    c|=SQU<<16;
 1709|   161k|                    length=3;
 1710|   161k|                    goto outputBytes;
 1711|   161k|                }
 1712|   210k|            }
 1713|       |
 1714|       |            /* normal end of conversion: prepare for a new character */
 1715|   189k|            c=0;
 1716|   189k|        }
 1717|   102M|    } else {
 1718|   873k|        if(c!=0 && targetCapacity>0) {
  ------------------
  |  Branch (1718:12): [True: 0, False: 873k]
  |  Branch (1718:20): [True: 0, False: 0]
  ------------------
 1719|      0|            goto getTrailUnicode;
 1720|      0|        }
 1721|       |
 1722|       |        /* state machine for Unicode mode */
 1723|       |/* unicodeByteMode: */
 1724|  1.56M|        while(source<sourceLimit) {
  ------------------
  |  Branch (1724:15): [True: 1.33M, False: 228k]
  ------------------
 1725|  1.33M|            if(targetCapacity<=0) {
  ------------------
  |  Branch (1725:16): [True: 422, False: 1.33M]
  ------------------
 1726|       |                /* target is full */
 1727|    422|                *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1728|    422|                break;
 1729|    422|            }
 1730|  1.33M|            c=*source++;
 1731|       |
 1732|  1.33M|            if (c - 0x3400 < 0xd800 - 0x3400) {
  ------------------
  |  Branch (1732:17): [True: 693k, False: 643k]
  ------------------
 1733|       |                /* not compressible, write character directly */
 1734|   693k|                if(targetCapacity>=2) {
  ------------------
  |  Branch (1734:20): [True: 693k, False: 472]
  ------------------
 1735|   693k|                    *target++=(uint8_t)(c>>8);
 1736|   693k|                    *target++=(uint8_t)c;
 1737|   693k|                    targetCapacity-=2;
 1738|   693k|                } else {
 1739|    472|                    length=2;
 1740|    472|                    goto outputBytes;
 1741|    472|                }
 1742|   693k|            } else if (c - 0x3400 >= 0xf300 - 0x3400 /* c<0x3400 || c>=0xf300 */) {
  ------------------
  |  Branch (1742:24): [True: 366k, False: 277k]
  ------------------
 1743|       |                /* compress BMP character if the following one is not an uncompressible ideograph */
 1744|   366k|                if(!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400))) {
  ------------------
  |  Branch (1744:22): [True: 127k, False: 238k]
  |  Branch (1744:44): [True: 58.7k, False: 68.4k]
  ------------------
 1745|   307k|                    if (c - 0x30 < 10 || c - 0x61 < 26 || c - 0x41 < 26) {
  ------------------
  |  Branch (1745:25): [True: 223, False: 307k]
  |  Branch (1745:42): [True: 333, False: 306k]
  |  Branch (1745:59): [True: 224, False: 306k]
  ------------------
 1746|       |                        /* ASCII digit or letter */
 1747|    780|                        isSingleByteMode=true;
 1748|    780|                        c|=((uint32_t)(UC0+dynamicWindow)<<8)|c;
 1749|    780|                        length=2;
 1750|    780|                        goto outputBytes;
 1751|   306k|                    } else if((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) {
  ------------------
  |  Branch (1751:31): [True: 14.7k, False: 291k]
  ------------------
 1752|       |                        /* there is a dynamic window that contains this character, change to it */
 1753|  14.7k|                        isSingleByteMode=true;
 1754|  14.7k|                        dynamicWindow=window;
 1755|  14.7k|                        currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
 1756|  14.7k|                        useDynamicWindow(scsu, dynamicWindow);
 1757|  14.7k|                        c=((uint32_t)(UC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
 1758|  14.7k|                        length=2;
 1759|  14.7k|                        goto outputBytes;
 1760|   291k|                    } else if((code=getDynamicOffset(c, &offset))>=0) {
  ------------------
  |  Branch (1760:31): [True: 5.05k, False: 286k]
  ------------------
 1761|       |                        /* define a dynamic window with this character */
 1762|  5.05k|                        isSingleByteMode=true;
 1763|  5.05k|                        dynamicWindow=getNextDynamicWindow(scsu);
 1764|  5.05k|                        currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
 1765|  5.05k|                        useDynamicWindow(scsu, dynamicWindow);
 1766|  5.05k|                        c=((uint32_t)(UD0+dynamicWindow)<<16)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
 1767|  5.05k|                        length=3;
 1768|  5.05k|                        goto outputBytes;
 1769|  5.05k|                    }
 1770|   307k|                }
 1771|       |
 1772|       |                /* don't know how to compress this character, just write it directly */
 1773|   345k|                length=2;
 1774|   345k|                goto outputBytes;
 1775|   366k|            } else if(c<0xe000) {
  ------------------
  |  Branch (1775:23): [True: 275k, False: 2.75k]
  ------------------
 1776|       |                /* c is a surrogate */
 1777|   275k|                if(U16_IS_SURROGATE_LEAD(c)) {
  ------------------
  |  |   84|   275k|#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
  |  |  ------------------
  |  |  |  Branch (84:34): [True: 89.7k, False: 185k]
  |  |  ------------------
  ------------------
 1778|  89.7k|getTrailUnicode:
 1779|  89.7k|                    lead=(char16_t)c;
 1780|  89.7k|                    if(source<sourceLimit) {
  ------------------
  |  Branch (1780:24): [True: 89.7k, False: 63]
  ------------------
 1781|       |                        /* test the following code unit */
 1782|  89.7k|                        trail=*source;
 1783|  89.7k|                        if(U16_IS_TRAIL(trail)) {
  ------------------
  |  |   67|  89.7k|#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
  |  |  ------------------
  |  |  |  Branch (67:25): [True: 36.3k, False: 53.4k]
  |  |  ------------------
  ------------------
 1784|  36.3k|                            ++source;
 1785|  36.3k|                            c=U16_GET_SUPPLEMENTARY(c, trail);
  ------------------
  |  |  113|  36.3k|    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
  |  |  ------------------
  |  |  |  |   99|  36.3k|#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
  |  |  ------------------
  ------------------
 1786|       |                            /* convert this surrogate code point */
 1787|       |                            /* exit this condition tree */
 1788|  53.4k|                        } else {
 1789|       |                            /* this is an unmatched lead code unit (1st surrogate) */
 1790|       |                            /* callback(illegal) */
 1791|  53.4k|                            *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 1792|  53.4k|                            goto endloop;
 1793|  53.4k|                        }
 1794|  89.7k|                    } else {
 1795|       |                        /* no more input */
 1796|     63|                        break;
 1797|     63|                    }
 1798|   185k|                } else {
 1799|       |                    /* this is an unmatched trail code unit (2nd surrogate) */
 1800|       |                    /* callback(illegal) */
 1801|   185k|                    *pErrorCode=U_ILLEGAL_CHAR_FOUND;
 1802|   185k|                    goto endloop;
 1803|   185k|                }
 1804|       |
 1805|       |                /* compress supplementary character */
 1806|  36.3k|                if( (window=getWindow(scsu->fromUDynamicOffsets, c))>=0 &&
  ------------------
  |  Branch (1806:21): [True: 1.36k, False: 34.9k]
  ------------------
 1807|  36.3k|                    !(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400))
  ------------------
  |  Branch (1807:23): [True: 1.31k, False: 52]
  |  Branch (1807:45): [True: 344, False: 971]
  ------------------
 1808|  36.3k|                ) {
 1809|       |                    /*
 1810|       |                     * there is a dynamic window that contains this character and
 1811|       |                     * the following character is not uncompressible,
 1812|       |                     * change to the window
 1813|       |                     */
 1814|  1.02k|                    isSingleByteMode=true;
 1815|  1.02k|                    dynamicWindow=window;
 1816|  1.02k|                    currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
 1817|  1.02k|                    useDynamicWindow(scsu, dynamicWindow);
 1818|  1.02k|                    c=((uint32_t)(UC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
 1819|  1.02k|                    length=2;
 1820|  1.02k|                    goto outputBytes;
 1821|  35.2k|                } else if(source<sourceLimit && lead==*source && /* too lazy to check trail in same window as source[1] */
  ------------------
  |  Branch (1821:27): [True: 35.2k, False: 21]
  |  Branch (1821:49): [True: 1.59k, False: 33.6k]
  ------------------
 1822|  35.2k|                          (code=getDynamicOffset(c, &offset))>=0
  ------------------
  |  Branch (1822:27): [True: 800, False: 791]
  ------------------
 1823|  35.2k|                ) {
 1824|       |                    /* two supplementary characters in (probably) the same window - define an extended one */
 1825|    800|                    isSingleByteMode=true;
 1826|    800|                    code-=0x200;
 1827|    800|                    dynamicWindow=getNextDynamicWindow(scsu);
 1828|    800|                    currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
 1829|    800|                    useDynamicWindow(scsu, dynamicWindow);
 1830|    800|                    c=((uint32_t)UDX<<24)|((uint32_t)dynamicWindow<<21)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
 1831|    800|                    length=4;
 1832|    800|                    goto outputBytes;
 1833|  34.4k|                } else {
 1834|       |                    /* don't know how to compress this character, just write it directly */
 1835|  34.4k|                    c=((uint32_t)lead<<16)|trail;
 1836|  34.4k|                    length=4;
 1837|  34.4k|                    goto outputBytes;
 1838|  34.4k|                }
 1839|  36.3k|            } else /* 0xe000<=c<0xf300 */ {
 1840|       |                /* quote to avoid SCSU tags */
 1841|  2.75k|                c|=UQU<<16;
 1842|  2.75k|                length=3;
 1843|  2.75k|                goto outputBytes;
 1844|  2.75k|            }
 1845|       |
 1846|       |            /* normal end of conversion: prepare for a new character */
 1847|   693k|            c=0;
 1848|   693k|        }
 1849|   873k|    }
 1850|  68.6M|endloop:
 1851|       |
 1852|       |    /* set the converter state back into UConverter */
 1853|  68.6M|    scsu->fromUIsSingleByteMode=isSingleByteMode;
 1854|  68.6M|    scsu->fromUDynamicWindow=dynamicWindow;
 1855|       |
 1856|  68.6M|    cnv->fromUChar32=c;
 1857|       |
 1858|       |    /* write back the updated pointers */
 1859|  68.6M|    pArgs->source=source;
 1860|  68.6M|    pArgs->target=(char *)target;
 1861|  68.6M|    return;
 1862|       |
 1863|  34.7M|outputBytes:
 1864|       |    /* write the output character bytes from c and length [code copied from ucnvmbcs.c] */
 1865|       |    /* from the first if in the loop we know that targetCapacity>0 */
 1866|  34.7M|    if(length<=targetCapacity) {
  ------------------
  |  Branch (1866:8): [True: 34.7M, False: 1.51k]
  ------------------
 1867|  34.7M|        switch(length) {
 1868|       |            /* each branch falls through to the next one */
 1869|  55.3k|        case 4:
  ------------------
  |  Branch (1869:9): [True: 55.3k, False: 34.6M]
  ------------------
 1870|  55.3k|            *target++=(uint8_t)(c>>24);
 1871|  55.3k|            U_FALLTHROUGH;
  ------------------
  |  |  511|  55.3k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1872|  34.3M|        case 3:
  ------------------
  |  Branch (1872:9): [True: 34.2M, False: 441k]
  ------------------
 1873|  34.3M|            *target++=(uint8_t)(c>>16);
 1874|  34.3M|            U_FALLTHROUGH;
  ------------------
  |  |  511|  34.3M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1875|  34.7M|        case 2:
  ------------------
  |  Branch (1875:9): [True: 386k, False: 34.3M]
  ------------------
 1876|  34.7M|            *target++=(uint8_t)(c>>8);
 1877|  34.7M|            U_FALLTHROUGH;
  ------------------
  |  |  511|  34.7M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1878|  34.7M|        case 1:
  ------------------
  |  Branch (1878:9): [True: 0, False: 34.7M]
  ------------------
 1879|  34.7M|            *target++=(uint8_t)c;
 1880|  34.7M|            U_FALLTHROUGH;
  ------------------
  |  |  511|  34.7M|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1881|  34.7M|        default:
  ------------------
  |  Branch (1881:9): [True: 0, False: 34.7M]
  ------------------
 1882|       |            /* will never occur */
 1883|  34.7M|            break;
 1884|  34.7M|        }
 1885|  34.7M|        targetCapacity-=length;
 1886|       |
 1887|       |        /* normal end of conversion: prepare for a new character */
 1888|  34.7M|        c=0;
 1889|  34.7M|        goto loop;
 1890|  34.7M|    } else {
 1891|  1.51k|        uint8_t *p;
 1892|       |
 1893|       |        /*
 1894|       |         * We actually do this backwards here:
 1895|       |         * In order to save an intermediate variable, we output
 1896|       |         * first to the overflow buffer what does not fit into the
 1897|       |         * regular target.
 1898|       |         */
 1899|       |        /* we know that 0<=targetCapacity<length<=4 */
 1900|       |        /* targetCapacity==0 when SCU+supplementary where SCU used up targetCapacity==1 */
 1901|  1.51k|        length-=targetCapacity;
 1902|  1.51k|        p=(uint8_t *)cnv->charErrorBuffer;
 1903|  1.51k|        switch(length) {
 1904|       |            /* each branch falls through to the next one */
 1905|     37|        case 4:
  ------------------
  |  Branch (1905:9): [True: 37, False: 1.47k]
  ------------------
 1906|     37|            *p++=(uint8_t)(c>>24);
 1907|     37|            U_FALLTHROUGH;
  ------------------
  |  |  511|     37|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1908|    123|        case 3:
  ------------------
  |  Branch (1908:9): [True: 86, False: 1.42k]
  ------------------
 1909|    123|            *p++=(uint8_t)(c>>16);
 1910|    123|            U_FALLTHROUGH;
  ------------------
  |  |  511|    123|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1911|    536|        case 2:
  ------------------
  |  Branch (1911:9): [True: 413, False: 1.09k]
  ------------------
 1912|    536|            *p++=(uint8_t)(c>>8);
 1913|    536|            U_FALLTHROUGH;
  ------------------
  |  |  511|    536|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1914|  1.51k|        case 1:
  ------------------
  |  Branch (1914:9): [True: 975, False: 536]
  ------------------
 1915|  1.51k|            *p=(uint8_t)c;
 1916|  1.51k|            U_FALLTHROUGH;
  ------------------
  |  |  511|  1.51k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1917|  1.51k|        default:
  ------------------
  |  Branch (1917:9): [True: 0, False: 1.51k]
  ------------------
 1918|       |            /* will never occur */
 1919|  1.51k|            break;
 1920|  1.51k|        }
 1921|  1.51k|        cnv->charErrorBufferLength=(int8_t)length;
 1922|       |
 1923|       |        /* now output what fits into the regular target */
 1924|  1.51k|        c = (length == 4) ? 0 : c >> 8*length; /* length was reduced by targetCapacity */
  ------------------
  |  Branch (1924:13): [True: 37, False: 1.47k]
  ------------------
 1925|  1.51k|        switch(targetCapacity) {
 1926|       |            /* each branch falls through to the next one */
 1927|     80|        case 3:
  ------------------
  |  Branch (1927:9): [True: 80, False: 1.43k]
  ------------------
 1928|     80|            *target++=(uint8_t)(c>>16);
 1929|     80|            U_FALLTHROUGH;
  ------------------
  |  |  511|     80|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1930|    490|        case 2:
  ------------------
  |  Branch (1930:9): [True: 410, False: 1.10k]
  ------------------
 1931|    490|            *target++=(uint8_t)(c>>8);
 1932|    490|            U_FALLTHROUGH;
  ------------------
  |  |  511|    490|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1933|  1.47k|        case 1:
  ------------------
  |  Branch (1933:9): [True: 984, False: 527]
  ------------------
 1934|  1.47k|            *target++=(uint8_t)c;
 1935|  1.47k|            U_FALLTHROUGH;
  ------------------
  |  |  511|  1.47k|#       define U_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1936|  1.51k|        default:
  ------------------
  |  Branch (1936:9): [True: 37, False: 1.47k]
  ------------------
 1937|  1.51k|            break;
 1938|  1.51k|        }
 1939|       |
 1940|       |        /* target overflow */
 1941|  1.51k|        targetCapacity=0;
 1942|  1.51k|        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;
 1943|  1.51k|        c=0;
 1944|  1.51k|        goto endloop;
 1945|  1.51k|    }
 1946|  34.7M|}
ucnvscsu.cpp:_ZL9getWindowPKjj:
  883|   771k|getWindow(const uint32_t offsets[8], uint32_t c) {
  884|   771k|    int i;
  885|  6.78M|    for(i=0; i<8; ++i) {
  ------------------
  |  Branch (885:14): [True: 6.04M, False: 734k]
  ------------------
  886|  6.04M|        if (c - offsets[i] <= 0x7f) {
  ------------------
  |  Branch (886:13): [True: 37.0k, False: 6.01M]
  ------------------
  887|  37.0k|            return static_cast<int8_t>(i);
  888|  37.0k|        }
  889|  6.04M|    }
  890|   734k|    return -1;
  891|   771k|}
ucnvscsu.cpp:_ZL16useDynamicWindowP8SCSUDataa:
  922|  52.5k|useDynamicWindow(SCSUData *scsu, int8_t window) {
  923|       |    /*
  924|       |     * move the existing window, which just became the most recently used one,
  925|       |     * up in windowUse[] to nextWindowUseIndex-1
  926|       |     */
  927|       |
  928|       |    /* first, find the index of the window - backwards to favor the more recently used windows */
  929|  52.5k|    int i, j;
  930|       |
  931|  52.5k|    i=scsu->nextWindowUseIndex;
  932|  68.4k|    do {
  933|  68.4k|        if(--i<0) {
  ------------------
  |  Branch (933:12): [True: 8.30k, False: 60.1k]
  ------------------
  934|  8.30k|            i=7;
  935|  8.30k|        }
  936|  68.4k|    } while(scsu->windowUse[i]!=window);
  ------------------
  |  Branch (936:13): [True: 15.9k, False: 52.5k]
  ------------------
  937|       |
  938|       |    /* now copy each windowUse[i+1] to [i] */
  939|  52.5k|    j=i+1;
  940|  52.5k|    if(j==8) {
  ------------------
  |  Branch (940:8): [True: 5.69k, False: 46.8k]
  ------------------
  941|  5.69k|        j=0;
  942|  5.69k|    }
  943|  68.4k|    while(j!=scsu->nextWindowUseIndex) {
  ------------------
  |  Branch (943:11): [True: 15.9k, False: 52.5k]
  ------------------
  944|  15.9k|        scsu->windowUse[i]=scsu->windowUse[j];
  945|  15.9k|        i=j;
  946|  15.9k|        if(++j==8) { j=0; }
  ------------------
  |  Branch (946:12): [True: 2.60k, False: 13.3k]
  ------------------
  947|  15.9k|    }
  948|       |
  949|       |    /* finally, set the window into the most recently used index */
  950|  52.5k|    scsu->windowUse[i]=window;
  951|  52.5k|}
ucnvscsu.cpp:_ZL16getDynamicOffsetjPj:
  962|   504k|getDynamicOffset(uint32_t c, uint32_t *pOffset) {
  963|   504k|    int i;
  964|       |
  965|  4.02M|    for(i=0; i<7; ++i) {
  ------------------
  |  Branch (965:14): [True: 3.52M, False: 502k]
  ------------------
  966|  3.52M|        if (c - fixedOffsets[i] <= 0x7f) {
  ------------------
  |  Branch (966:13): [True: 2.06k, False: 3.52M]
  ------------------
  967|  2.06k|            *pOffset=fixedOffsets[i];
  968|  2.06k|            return 0xf9+i;
  969|  2.06k|        }
  970|  3.52M|    }
  971|       |
  972|   502k|    if(c<0x80) {
  ------------------
  |  Branch (972:8): [True: 58.0k, False: 444k]
  ------------------
  973|       |        /* No dynamic window for US-ASCII. */
  974|  58.0k|        return -1;
  975|   444k|    } else if(c<0x3400 ||
  ------------------
  |  Branch (975:15): [True: 18.8k, False: 425k]
  ------------------
  976|   444k|              c - 0x10000 < 0x14000 - 0x10000 ||
  ------------------
  |  Branch (976:15): [True: 1.62k, False: 423k]
  ------------------
  977|   444k|              c - 0x1d000 <= 0x1ffff - 0x1d000
  ------------------
  |  Branch (977:15): [True: 2.70k, False: 421k]
  ------------------
  978|   444k|    ) {
  979|       |        /* This character is in a code range for a "small", i.e., reasonably windowable, script. */
  980|  23.1k|        *pOffset=c&0x7fffff80;
  981|  23.1k|        return static_cast<int>(c >> 7);
  982|   421k|    } else if(0xe000<=c && c!=0xfeff && c<0xfff0) {
  ------------------
  |  Branch (982:15): [True: 254k, False: 167k]
  |  Branch (982:28): [True: 253k, False: 194]
  |  Branch (982:41): [True: 7.75k, False: 246k]
  ------------------
  983|       |        /* For these characters we need to take the gapOffset into account. */
  984|  7.75k|        *pOffset=c&0x7fffff80;
  985|  7.75k|        return static_cast<int>((c - gapOffset) >> 7);
  986|   413k|    } else {
  987|   413k|        return -1;
  988|   413k|    }
  989|   502k|}
ucnvscsu.cpp:_ZL20getNextDynamicWindowP8SCSUData:
  907|  32.9k|getNextDynamicWindow(SCSUData *scsu) {
  908|  32.9k|    int8_t window=scsu->windowUse[scsu->nextWindowUseIndex];
  909|  32.9k|    if(++scsu->nextWindowUseIndex==8) {
  ------------------
  |  Branch (909:8): [True: 3.98k, False: 29.0k]
  ------------------
  910|  3.98k|        scsu->nextWindowUseIndex=0;
  911|  3.98k|    }
  912|  32.9k|    return window;
  913|  32.9k|}
ucnvscsu.cpp:_ZL24isInOffsetWindowOrDirectjj:
  895|  14.1k|isInOffsetWindowOrDirect(uint32_t offset, uint32_t c) {
  896|  14.1k|    return c<=offset+0x7f &&
  ------------------
  |  Branch (896:12): [True: 6.84k, False: 7.33k]
  ------------------
  897|  14.1k|          (c>=offset || (c<=0x7f &&
  ------------------
  |  Branch (897:12): [True: 1.73k, False: 5.10k]
  |  Branch (897:26): [True: 1.38k, False: 3.72k]
  ------------------
  898|  5.10k|                        (c>=0x20 || (1UL<<c)&0x2601)));
  ------------------
  |  Branch (898:26): [True: 617, False: 770]
  |  Branch (898:37): [True: 389, False: 381]
  ------------------
  899|       |                                /* binary 0010 0110 0000 0001,
  900|       |                                   check for b==0xd || b==0xa || b==9 || b==0 */
  901|  14.1k|}

_ZN6icu_7817UDataPathIteratorC2EPKcS2_S2_S2_aP10UErrorCode:
  451|      1|{
  452|       |#ifdef UDATA_DEBUG
  453|       |        fprintf(stderr, "SUFFIX1=%s PATH=%s\n", inSuffix, inPath);
  454|       |#endif
  455|       |    /** Path **/
  456|      1|    if(inPath == nullptr) {
  ------------------
  |  Branch (456:8): [True: 0, False: 1]
  ------------------
  457|      0|        path = u_getDataDirectory();
  ------------------
  |  |  271|      0|#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  458|      1|    } else {
  459|      1|        path = inPath;
  460|      1|    }
  461|       |
  462|       |    /** Package **/
  463|      1|    if(pkg != nullptr) {
  ------------------
  |  Branch (463:8): [True: 1, False: 0]
  ------------------
  464|      1|      packageStub.append(U_FILE_SEP_CHAR, *pErrorCode).append(pkg, *pErrorCode);
  ------------------
  |  |  130|      1|#   define U_FILE_SEP_CHAR '/'
  ------------------
  465|       |#ifdef UDATA_DEBUG
  466|       |      fprintf(stderr, "STUB=%s [%d]\n", packageStub.data(), packageStub.length());
  467|       |#endif
  468|      1|    }
  469|       |
  470|       |    /** Item **/
  471|      1|    basename = findBasename(item);
  472|      1|    basenameLen = static_cast<int32_t>(uprv_strlen(basename));
  ------------------
  |  |   37|      1|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|      1|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  473|       |
  474|       |    /** Item path **/
  475|      1|    if(basename == item) {
  ------------------
  |  Branch (475:8): [True: 1, False: 0]
  ------------------
  476|      1|        nextPath = path;
  477|      1|    } else {
  478|      0|        itemPath.append(item, static_cast<int32_t>(basename - item), *pErrorCode);
  479|      0|        nextPath = itemPath.data();
  480|      0|    }
  481|       |#ifdef UDATA_DEBUG
  482|       |    fprintf(stderr, "SUFFIX=%s [%p]\n", inSuffix, (void*) inSuffix);
  483|       |#endif
  484|       |
  485|       |    /** Suffix  **/
  486|      1|    if(inSuffix != nullptr) {
  ------------------
  |  Branch (486:8): [True: 1, False: 0]
  ------------------
  487|      1|        suffix = inSuffix;
  488|      1|    } else {
  489|      0|        suffix = "";
  490|      0|    }
  491|       |
  492|      1|    checkLastFour = doCheckLastFour;
  493|       |
  494|       |    /* pathBuffer will hold the output path strings returned by this iterator */
  495|       |
  496|       |#ifdef UDATA_DEBUG
  497|       |    fprintf(stderr, "0: init %s -> [path=%s], [base=%s], [suff=%s], [itempath=%s], [nextpath=%s], [checklast4=%s]\n",
  498|       |            item,
  499|       |            path,
  500|       |            basename,
  501|       |            suffix.data(),
  502|       |            itemPath.data(),
  503|       |            nextPath,
  504|       |            checkLastFour?"true":"false");
  505|       |#endif
  506|      1|}
_ZN6icu_7817UDataPathIterator4nextEP10UErrorCode:
  516|      1|{
  517|      1|    if(U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (517:8): [True: 0, False: 1]
  ------------------
  518|      0|        return nullptr;
  519|      0|    }
  520|       |
  521|      1|    const char *currentPath = nullptr;
  522|      1|    int32_t     pathLen = 0;
  523|      1|    const char *pathBasename;
  524|       |
  525|      1|    do
  526|      2|    {
  527|      2|        if( nextPath == nullptr ) {
  ------------------
  |  Branch (527:13): [True: 1, False: 1]
  ------------------
  528|      1|            break;
  529|      1|        }
  530|      1|        currentPath = nextPath;
  531|       |
  532|      1|        if(nextPath == itemPath.data()) { /* we were processing item's path. */
  ------------------
  |  Branch (532:12): [True: 0, False: 1]
  ------------------
  533|      0|            nextPath = path; /* start with regular path next tm. */
  534|      0|            pathLen = static_cast<int32_t>(uprv_strlen(currentPath));
  ------------------
  |  |   37|      0|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  535|      1|        } else {
  536|       |            /* fix up next for next time */
  537|      1|            nextPath = uprv_strchr(currentPath, U_PATH_SEP_CHAR);
  ------------------
  |  |   40|      1|#define uprv_strchr(s, c) U_STANDARD_CPP_NAMESPACE strchr(s, c)
  |  |  ------------------
  |  |  |  |  393|      1|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  538|      1|            if(nextPath == nullptr) {
  ------------------
  |  Branch (538:16): [True: 1, False: 0]
  ------------------
  539|       |                /* segment: entire path */
  540|      1|                pathLen = static_cast<int32_t>(uprv_strlen(currentPath));
  ------------------
  |  |   37|      1|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|      1|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  541|      1|            } else {
  542|       |                /* segment: until next segment */
  543|      0|                pathLen = static_cast<int32_t>(nextPath - currentPath);
  544|       |                /* skip divider */
  545|      0|                nextPath ++;
  546|      0|            }
  547|      1|        }
  548|       |
  549|      1|        if(pathLen == 0) {
  ------------------
  |  Branch (549:12): [True: 1, False: 0]
  ------------------
  550|      1|            continue;
  551|      1|        }
  552|       |
  553|       |#ifdef UDATA_DEBUG
  554|       |        fprintf(stderr, "rest of path (IDD) = %s\n", currentPath);
  555|       |        fprintf(stderr, "                     ");
  556|       |        { 
  557|       |            int32_t qqq;
  558|       |            for(qqq=0;qqq<pathLen;qqq++)
  559|       |            {
  560|       |                fprintf(stderr, " ");
  561|       |            }
  562|       |
  563|       |            fprintf(stderr, "^\n");
  564|       |        }
  565|       |#endif
  566|      0|        pathBuffer.clear().append(currentPath, pathLen, *pErrorCode);
  567|       |
  568|       |        /* check for .dat files */
  569|      0|        pathBasename = findBasename(pathBuffer.data());
  570|       |
  571|      0|        if(checkLastFour && 
  ------------------
  |  Branch (571:12): [True: 0, False: 0]
  ------------------
  572|      0|           (pathLen>=4) &&
  ------------------
  |  Branch (572:12): [True: 0, False: 0]
  ------------------
  573|      0|           uprv_strncmp(pathBuffer.data() +(pathLen-4), suffix.data(), 4)==0 && /* suffix matches */
  ------------------
  |  |   44|      0|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (573:12): [True: 0, False: 0]
  ------------------
  574|      0|           uprv_strncmp(findBasename(pathBuffer.data()), basename, basenameLen)==0  && /* base matches */
  ------------------
  |  |   44|      0|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (574:12): [True: 0, False: 0]
  ------------------
  575|      0|           uprv_strlen(pathBasename)==(basenameLen+4)) { /* base+suffix = full len */
  ------------------
  |  |   37|      0|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (575:12): [True: 0, False: 0]
  ------------------
  576|       |
  577|       |#ifdef UDATA_DEBUG
  578|       |            fprintf(stderr, "Have %s file on the path: %s\n", suffix.data(), pathBuffer.data());
  579|       |#endif
  580|       |            /* do nothing */
  581|      0|        }
  582|      0|        else 
  583|      0|        {       /* regular dir path */
  584|      0|            if(pathBuffer[pathLen-1] != U_FILE_SEP_CHAR) {
  ------------------
  |  |  130|      0|#   define U_FILE_SEP_CHAR '/'
  ------------------
  |  Branch (584:16): [True: 0, False: 0]
  ------------------
  585|      0|                if((pathLen>=4) &&
  ------------------
  |  Branch (585:20): [True: 0, False: 0]
  ------------------
  586|      0|                   uprv_strncmp(pathBuffer.data()+(pathLen-4), ".dat", 4) == 0)
  ------------------
  |  |   44|      0|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (586:20): [True: 0, False: 0]
  ------------------
  587|      0|                {
  588|       |#ifdef UDATA_DEBUG
  589|       |                    fprintf(stderr, "skipping non-directory .dat file %s\n", pathBuffer.data());
  590|       |#endif
  591|      0|                    continue;
  592|      0|                }
  593|       |
  594|       |                /* Check if it is a directory with the same name as our package */
  595|      0|                if(!packageStub.isEmpty() &&
  ------------------
  |  Branch (595:20): [True: 0, False: 0]
  ------------------
  596|      0|                   (pathLen > packageStub.length()) &&
  ------------------
  |  Branch (596:20): [True: 0, False: 0]
  ------------------
  597|      0|                   !uprv_strcmp(pathBuffer.data() + pathLen - packageStub.length(), packageStub.data())) {
  ------------------
  |  |   38|      0|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (597:20): [True: 0, False: 0]
  ------------------
  598|       |#ifdef UDATA_DEBUG
  599|       |                  fprintf(stderr, "Found stub %s (will add package %s of len %d)\n", packageStub.data(), basename, basenameLen);
  600|       |#endif
  601|      0|                  pathBuffer.truncate(pathLen - packageStub.length());
  602|      0|                }
  603|      0|                pathBuffer.append(U_FILE_SEP_CHAR, *pErrorCode);
  ------------------
  |  |  130|      0|#   define U_FILE_SEP_CHAR '/'
  ------------------
  604|      0|            }
  605|       |
  606|       |            /* + basename */
  607|      0|            pathBuffer.append(packageStub.data()+1, packageStub.length()-1, *pErrorCode);
  608|       |
  609|      0|            if (!suffix.empty())  /* tack on suffix */
  ------------------
  |  Branch (609:17): [True: 0, False: 0]
  ------------------
  610|      0|            {
  611|      0|                if (suffix.length() > 4) {
  ------------------
  |  Branch (611:21): [True: 0, False: 0]
  ------------------
  612|       |                    // If the suffix is actually an item ("ibm-5348_P100-1997.cnv") and not an extension (".res")
  613|       |                    // then we need to ensure that the path ends with a separator.
  614|      0|                    pathBuffer.ensureEndsWithFileSeparator(*pErrorCode);
  615|      0|                }
  616|      0|                pathBuffer.append(suffix, *pErrorCode);
  617|      0|            }
  618|      0|        }
  619|       |
  620|       |#ifdef UDATA_DEBUG
  621|       |        fprintf(stderr, " -->  %s\n", pathBuffer.data());
  622|       |#endif
  623|       |
  624|      0|        return pathBuffer.data();
  625|       |
  626|      1|    } while(path);
  ------------------
  |  Branch (626:13): [True: 1, False: 0]
  ------------------
  627|       |
  628|       |    /* fell way off the end */
  629|      1|    return nullptr;
  630|      1|}
udata_openChoice_78:
 1406|    556|                 UErrorCode *pErrorCode) {
 1407|       |#ifdef UDATA_DEBUG
 1408|       |  fprintf(stderr, "udata_openChoice(): Opening: %s : %s . %s\n", (path?path:"nullptr"), name, type);
 1409|       |#endif
 1410|       |
 1411|    556|    if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1411:8): [True: 0, False: 556]
  |  Branch (1411:31): [True: 0, False: 556]
  ------------------
 1412|      0|        return nullptr;
 1413|    556|    } else if(name==nullptr || *name==0 || isAcceptable==nullptr) {
  ------------------
  |  Branch (1413:15): [True: 0, False: 556]
  |  Branch (1413:32): [True: 0, False: 556]
  |  Branch (1413:44): [True: 0, False: 556]
  ------------------
 1414|      0|        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
 1415|      0|        return nullptr;
 1416|    556|    } else {
 1417|    556|        return doOpenChoice(path, type, name, isAcceptable, context, pErrorCode);
 1418|    556|    }
 1419|    556|}
udata_getInfo_78:
 1424|    157|udata_getInfo(UDataMemory *pData, UDataInfo *pInfo) {
 1425|    157|    if(pInfo!=nullptr) {
  ------------------
  |  Branch (1425:8): [True: 157, False: 0]
  ------------------
 1426|    157|        if(pData!=nullptr && pData->pHeader!=nullptr) {
  ------------------
  |  Branch (1426:12): [True: 157, False: 0]
  |  Branch (1426:30): [True: 157, False: 0]
  ------------------
 1427|    157|            const UDataInfo *info=&pData->pHeader->info;
 1428|    157|            uint16_t dataInfoSize=udata_getInfoSize(info);
  ------------------
  |  |  889|    157|#define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize)
  |  |  ------------------
  |  |  |  |  123|    157|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    157|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    157|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1429|    157|            if(pInfo->size>dataInfoSize) {
  ------------------
  |  Branch (1429:16): [True: 0, False: 157]
  ------------------
 1430|      0|                pInfo->size=dataInfoSize;
 1431|      0|            }
 1432|    157|            uprv_memcpy((uint16_t *)pInfo+1, (const uint16_t *)info+1, pInfo->size-2);
  ------------------
  |  |   42|    157|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|    157|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|    157|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|    157|    _Pragma("clang diagnostic push") \
  |  |   45|    157|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|    157|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|    157|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|    157|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|    157|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|    157|    _Pragma("clang diagnostic pop") \
  |  |   49|    157|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|    157|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|    157|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|    157|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1433|    157|            if(info->isBigEndian!=U_IS_BIG_ENDIAN) {
  ------------------
  |  |  353|    157|#   define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
  ------------------
  |  Branch (1433:16): [True: 0, False: 157]
  ------------------
 1434|       |                /* opposite endianness */
 1435|      0|                uint16_t x=info->reservedWord;
 1436|      0|                pInfo->reservedWord=(uint16_t)((x<<8)|(x>>8));
 1437|      0|            }
 1438|    157|        } else {
 1439|      0|            pInfo->size=0;
 1440|      0|        }
 1441|    157|    }
 1442|    157|}
udata.cpp:_ZL12findBasenamePKc:
  225|    135|findBasename(const char *path) {
  226|    135|    const char *basename=uprv_strrchr(path, U_FILE_SEP_CHAR);
  ------------------
  |  |   42|    135|#define uprv_strrchr(s, c) U_STANDARD_CPP_NAMESPACE strrchr(s, c)
  |  |  ------------------
  |  |  |  |  393|    135|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  227|    135|    if(basename==nullptr) {
  ------------------
  |  Branch (227:8): [True: 135, False: 0]
  ------------------
  228|    135|        return path;
  229|    135|    } else {
  230|      0|        return basename+1;
  231|      0|    }
  232|    135|}
udata.cpp:_ZL16setCommonICUDataP11UDataMemoryaP10UErrorCode:
  174|      1|{
  175|      1|    UDataMemory  *newCommonData = UDataMemory_createNewInstance(pErr);
  ------------------
  |  |   79|      1|#define UDataMemory_createNewInstance U_ICU_ENTRY_POINT_RENAME(UDataMemory_createNewInstance)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|      1|    int32_t i;
  177|      1|    UBool didUpdate = false;
  178|      1|    if (U_FAILURE(*pErr)) {
  ------------------
  |  Branch (178:9): [True: 0, False: 1]
  ------------------
  179|      0|        return false;
  180|      0|    }
  181|       |
  182|       |    /*  For the assignment, other threads must cleanly see either the old            */
  183|       |    /*    or the new, not some partially initialized new.  The old can not be        */
  184|       |    /*    deleted - someone may still have a pointer to it lying around in           */
  185|       |    /*    their locals.                                                              */
  186|      1|    UDatamemory_assign(newCommonData, pData);
  ------------------
  |  |   84|      1|#define UDatamemory_assign U_ICU_ENTRY_POINT_RENAME(UDatamemory_assign)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|      1|    umtx_lock(nullptr);
  ------------------
  |  | 1250|      1|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|      1|    for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray); ++i) {
  ------------------
  |  |   99|      1|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  |  Branch (188:17): [True: 1, False: 0]
  ------------------
  189|      1|        if (gCommonICUDataArray[i] == nullptr) {
  ------------------
  |  Branch (189:13): [True: 1, False: 0]
  ------------------
  190|      1|            gCommonICUDataArray[i] = newCommonData;
  191|      1|            didUpdate = true;
  192|      1|            break;
  193|      1|        } else if (gCommonICUDataArray[i]->pHeader == pData->pHeader) {
  ------------------
  |  Branch (193:20): [True: 0, False: 0]
  ------------------
  194|       |            /* The same data pointer is already in the array. */
  195|      0|            break;
  196|      0|        }
  197|      1|    }
  198|      1|    umtx_unlock(nullptr);
  ------------------
  |  | 1251|      1|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|       |
  200|      1|    if (i == UPRV_LENGTHOF(gCommonICUDataArray) && warn) {
  ------------------
  |  |   99|      2|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  |  Branch (200:9): [True: 0, False: 1]
  |  Branch (200:52): [True: 0, False: 0]
  ------------------
  201|      0|        *pErr = U_USING_DEFAULT_WARNING;
  202|      0|    }
  203|      1|    if (didUpdate) {
  ------------------
  |  Branch (203:9): [True: 1, False: 0]
  ------------------
  204|      1|        ucln_common_registerCleanup(UCLN_COMMON_UDATA, udata_cleanup);
  ------------------
  |  |  617|      1|#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|    } else {
  206|      0|        uprv_free(newCommonData);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|      0|    }
  208|      1|    return didUpdate;
  209|      1|}
udata.cpp:_ZL18udata_getHashTableR10UErrorCode:
  298|    134|static UHashtable *udata_getHashTable(UErrorCode &err) {
  299|    134|    umtx_initOnce(gCommonDataCacheInitOnce, &udata_initHashTable, err);
  300|    134|    return gCommonDataCache;
  301|    134|}
udata.cpp:_ZL19udata_initHashTableR10UErrorCode:
  283|      1|static void U_CALLCONV udata_initHashTable(UErrorCode &err) {
  284|      1|    U_ASSERT(gCommonDataCache == nullptr);
  ------------------
  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  ------------------
  285|      1|    gCommonDataCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &err);
  ------------------
  |  | 1030|      1|#define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  gCommonDataCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &err);
  ------------------
  |  | 1011|      1|#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  gCommonDataCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &err);
  ------------------
  |  |  993|      1|#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|      1|    if (U_FAILURE(err)) {
  ------------------
  |  Branch (286:9): [True: 0, False: 1]
  ------------------
  287|      0|       return;
  288|      0|    }
  289|      1|    U_ASSERT(gCommonDataCache != nullptr);
  ------------------
  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  ------------------
  290|      1|    uhash_setValueDeleter(gCommonDataCache, DataCacheElement_deleter);
  ------------------
  |  | 1044|      1|#define uhash_setValueDeleter U_ICU_ENTRY_POINT_RENAME(uhash_setValueDeleter)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  291|      1|    ucln_common_registerCleanup(UCLN_COMMON_UDATA, udata_cleanup);
  ------------------
  |  |  617|      1|#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  292|      1|}
udata.cpp:_ZL12doOpenChoicePKcS0_S0_PFaPvS0_S0_PK9UDataInfoES1_P10UErrorCode:
 1151|    556|{
 1152|    556|    UDataMemory         *retVal = nullptr;
 1153|       |
 1154|    556|    const char         *dataPath;
 1155|       |
 1156|    556|    int32_t             tocEntrySuffixIndex;
 1157|    556|    const char         *tocEntryPathSuffix;
 1158|    556|    UErrorCode          subErrorCode=U_ZERO_ERROR;
 1159|    556|    const char         *treeChar;
 1160|       |
 1161|    556|    UBool               isICUData = false;
 1162|       |
 1163|       |
 1164|    556|    FileTracer::traceOpen(path, type, name);
 1165|       |
 1166|       |
 1167|       |    /* Is this path ICU data? */
 1168|    556|    if(path == nullptr ||
  ------------------
  |  Branch (1168:8): [True: 556, False: 0]
  ------------------
 1169|    556|       !strcmp(path, U_ICUDATA_ALIAS) ||  /* "ICUDATA" */
  ------------------
  |  |   74|      0|#define U_ICUDATA_ALIAS "ICUDATA"
  ------------------
  |  Branch (1169:8): [True: 0, False: 0]
  ------------------
 1170|    556|       !uprv_strncmp(path, U_ICUDATA_NAME U_TREE_SEPARATOR_STRING, /* "icudt26e-" */
  ------------------
  |  |   44|      0|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1170:8): [True: 0, False: 0]
  ------------------
 1171|    556|                     uprv_strlen(U_ICUDATA_NAME U_TREE_SEPARATOR_STRING)) ||  
 1172|    556|       !uprv_strncmp(path, U_ICUDATA_ALIAS U_TREE_SEPARATOR_STRING, /* "ICUDATA-" */
  ------------------
  |  |   44|      0|#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1172:8): [True: 0, False: 0]
  ------------------
 1173|    556|                     uprv_strlen(U_ICUDATA_ALIAS U_TREE_SEPARATOR_STRING))) {
 1174|    556|      isICUData = true;
 1175|    556|    }
 1176|       |
 1177|       |#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)  /* Windows:  try "foo\bar" and "foo/bar" */
 1178|       |    /* remap from alternate path char to the main one */
 1179|       |    CharString altSepPath;
 1180|       |    if(path) {
 1181|       |        if(uprv_strchr(path,U_FILE_ALT_SEP_CHAR) != nullptr) {
 1182|       |            altSepPath.append(path, *pErrorCode);
 1183|       |            char *p;
 1184|       |            while ((p = uprv_strchr(altSepPath.data(), U_FILE_ALT_SEP_CHAR)) != nullptr) {
 1185|       |                *p = U_FILE_SEP_CHAR;
 1186|       |            }
 1187|       |#if defined (UDATA_DEBUG)
 1188|       |            fprintf(stderr, "Changed path from [%s] to [%s]\n", path, altSepPath.data());
 1189|       |#endif
 1190|       |            path = altSepPath.data();
 1191|       |        }
 1192|       |    }
 1193|       |#endif
 1194|       |
 1195|    556|    CharString tocEntryName; /* entry name in tree format. ex:  'icudt28b/coll/ar.res' */
 1196|    556|    CharString tocEntryPath; /* entry name in path format. ex:  'icudt28b\\coll\\ar.res' */
 1197|       |
 1198|    556|    CharString pkgName;
 1199|    556|    CharString treeName;
 1200|       |
 1201|       |    /* ======= Set up strings */
 1202|    556|    if(path==nullptr) {
  ------------------
  |  Branch (1202:8): [True: 556, False: 0]
  ------------------
 1203|    556|        pkgName.append(U_ICUDATA_NAME, *pErrorCode);
  ------------------
  |  |  154|    556|#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
  |  |  ------------------
  |  |  |  |  144|    556|#     define U_ICUDATA_TYPE_LETTER "l"
  |  |  ------------------
  ------------------
 1204|    556|    } else {
 1205|      0|        const char *pkg;
 1206|      0|        const char *first;
 1207|      0|        pkg = uprv_strrchr(path, U_FILE_SEP_CHAR);
  ------------------
  |  |   42|      0|#define uprv_strrchr(s, c) U_STANDARD_CPP_NAMESPACE strrchr(s, c)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1208|      0|        first = uprv_strchr(path, U_FILE_SEP_CHAR);
  ------------------
  |  |   40|      0|#define uprv_strchr(s, c) U_STANDARD_CPP_NAMESPACE strchr(s, c)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1209|      0|        if(uprv_pathIsAbsolute(path) || (pkg != first)) { /* more than one slash in the path- not a tree name */
  ------------------
  |  | 1533|      0|#define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1209:12): [True: 0, False: 0]
  |  Branch (1209:41): [True: 0, False: 0]
  ------------------
 1210|       |            /* see if this is an /absolute/path/to/package  path */
 1211|      0|            if(pkg) {
  ------------------
  |  Branch (1211:16): [True: 0, False: 0]
  ------------------
 1212|      0|                pkgName.append(pkg+1, *pErrorCode);
 1213|      0|            } else {
 1214|      0|                pkgName.append(path, *pErrorCode);
 1215|      0|            }
 1216|      0|        } else {
 1217|      0|            treeChar = uprv_strchr(path, U_TREE_SEPARATOR);
  ------------------
  |  |   40|      0|#define uprv_strchr(s, c) U_STANDARD_CPP_NAMESPACE strchr(s, c)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
 1218|      0|            if(treeChar) { 
  ------------------
  |  Branch (1218:16): [True: 0, False: 0]
  ------------------
 1219|      0|                treeName.append(treeChar+1, *pErrorCode); /* following '-' */
 1220|      0|                if(isICUData) {
  ------------------
  |  Branch (1220:20): [True: 0, False: 0]
  ------------------
 1221|      0|                    pkgName.append(U_ICUDATA_NAME, *pErrorCode);
  ------------------
  |  |  154|      0|#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
  |  |  ------------------
  |  |  |  |  144|      0|#     define U_ICUDATA_TYPE_LETTER "l"
  |  |  ------------------
  ------------------
 1222|      0|                } else {
 1223|      0|                    pkgName.append(path, static_cast<int32_t>(treeChar - path), *pErrorCode);
 1224|      0|                    if (first == nullptr) {
  ------------------
  |  Branch (1224:25): [True: 0, False: 0]
  ------------------
 1225|       |                        /*
 1226|       |                        This user data has no path, but there is a tree name.
 1227|       |                        Look up the correct path from the data cache later.
 1228|       |                        */
 1229|      0|                        path = pkgName.data();
 1230|      0|                    }
 1231|      0|                }
 1232|      0|            } else {
 1233|      0|                if(isICUData) {
  ------------------
  |  Branch (1233:20): [True: 0, False: 0]
  ------------------
 1234|      0|                    pkgName.append(U_ICUDATA_NAME, *pErrorCode);
  ------------------
  |  |  154|      0|#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
  |  |  ------------------
  |  |  |  |  144|      0|#     define U_ICUDATA_TYPE_LETTER "l"
  |  |  ------------------
  ------------------
 1235|      0|                } else {
 1236|      0|                    pkgName.append(path, *pErrorCode);
 1237|      0|                }
 1238|      0|            }
 1239|      0|        }
 1240|      0|    }
 1241|       |
 1242|       |#ifdef UDATA_DEBUG
 1243|       |    fprintf(stderr, " P=%s T=%s\n", pkgName.data(), treeName.data());
 1244|       |#endif
 1245|       |
 1246|       |    /* setting up the entry name and file name 
 1247|       |     * Make up a full name by appending the type to the supplied
 1248|       |     *  name, assuming that a type was supplied.
 1249|       |     */
 1250|       |
 1251|       |    /* prepend the package */
 1252|    556|    tocEntryName.append(pkgName, *pErrorCode);
 1253|    556|    tocEntryPath.append(pkgName, *pErrorCode);
 1254|    556|    tocEntrySuffixIndex = tocEntryName.length();
 1255|       |
 1256|    556|    if(!treeName.isEmpty()) {
  ------------------
  |  Branch (1256:8): [True: 0, False: 556]
  ------------------
 1257|      0|        tocEntryName.append(U_TREE_ENTRY_SEP_CHAR, *pErrorCode).append(treeName, *pErrorCode);
  ------------------
  |  |   62|      0|#define U_TREE_ENTRY_SEP_CHAR '/'
  ------------------
 1258|      0|        tocEntryPath.append(U_FILE_SEP_CHAR, *pErrorCode).append(treeName, *pErrorCode);
  ------------------
  |  |  130|      0|#   define U_FILE_SEP_CHAR '/'
  ------------------
 1259|      0|    }
 1260|       |
 1261|    556|    tocEntryName.append(U_TREE_ENTRY_SEP_CHAR, *pErrorCode).append(name, *pErrorCode);
  ------------------
  |  |   62|    556|#define U_TREE_ENTRY_SEP_CHAR '/'
  ------------------
 1262|    556|    tocEntryPath.append(U_FILE_SEP_CHAR, *pErrorCode).append(name, *pErrorCode);
  ------------------
  |  |  130|    556|#   define U_FILE_SEP_CHAR '/'
  ------------------
 1263|    556|    if(type!=nullptr && *type!=0) {
  ------------------
  |  Branch (1263:8): [True: 556, False: 0]
  |  Branch (1263:25): [True: 556, False: 0]
  ------------------
 1264|    556|        tocEntryName.append(".", *pErrorCode).append(type, *pErrorCode);
 1265|    556|        tocEntryPath.append(".", *pErrorCode).append(type, *pErrorCode);
 1266|    556|    }
 1267|       |    // The +1 is for the U_FILE_SEP_CHAR that is always appended above.
 1268|    556|    tocEntryPathSuffix = tocEntryPath.data() + tocEntrySuffixIndex + 1; /* suffix starts here */
 1269|       |
 1270|       |#ifdef UDATA_DEBUG
 1271|       |    fprintf(stderr, " tocEntryName = %s\n", tocEntryName.data());
 1272|       |    fprintf(stderr, " tocEntryPath = %s\n", tocEntryName.data());
 1273|       |#endif
 1274|       |
 1275|    556|#if !defined(ICU_DATA_DIR_WINDOWS)
 1276|    556|    if(path == nullptr) {
  ------------------
  |  Branch (1276:8): [True: 556, False: 0]
  ------------------
 1277|    556|        path = COMMON_DATA_NAME; /* "icudt26e" */
  ------------------
  |  |   34|    556|#define COMMON_DATA_NAME U_ICUDATA_NAME
  |  |  ------------------
  |  |  |  |  154|    556|#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|    556|#     define U_ICUDATA_TYPE_LETTER "l"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1278|    556|    }
 1279|       |#else
 1280|       |    // When using the Windows system data, we expects only a single data file.
 1281|       |    path = COMMON_DATA_NAME; /* "icudt26e" */
 1282|       |#endif
 1283|       |
 1284|       |    /************************ Begin loop looking for ind. files ***************/
 1285|       |#ifdef UDATA_DEBUG
 1286|       |    fprintf(stderr, "IND: inBasename = %s, pkg=%s\n", "(n/a)", packageNameFromPath(path));
 1287|       |#endif
 1288|       |
 1289|       |    /* End of dealing with a null basename */
 1290|    556|    dataPath = u_getDataDirectory();
  ------------------
  |  |  271|    556|#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory)
  |  |  ------------------
  |  |  |  |  123|    556|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    556|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    556|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1291|       |
 1292|       |    /****    Time zone individual files override  */
 1293|    556|    if (isICUData && isTimeZoneFile(name, type)) {
  ------------------
  |  Branch (1293:9): [True: 556, False: 0]
  |  Branch (1293:22): [True: 0, False: 556]
  ------------------
 1294|      0|        const char *tzFilesDir = u_getTimeZoneFilesDirectory(pErrorCode);
  ------------------
  |  |  287|      0|#define u_getTimeZoneFilesDirectory U_ICU_ENTRY_POINT_RENAME(u_getTimeZoneFilesDirectory)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1295|      0|        if (tzFilesDir[0] != 0) {
  ------------------
  |  Branch (1295:13): [True: 0, False: 0]
  ------------------
 1296|       |#ifdef UDATA_DEBUG
 1297|       |            fprintf(stderr, "Trying Time Zone Files directory = %s\n", tzFilesDir);
 1298|       |#endif
 1299|      0|            retVal = doLoadFromIndividualFiles(/* pkgName.data() */ "", tzFilesDir, tocEntryPathSuffix,
 1300|      0|                            /* path */ "", type, name, isAcceptable, context, &subErrorCode, pErrorCode);
 1301|      0|            if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1301:16): [True: 0, False: 0]
  |  Branch (1301:39): [True: 0, False: 0]
  ------------------
 1302|      0|                return retVal;
 1303|      0|            }
 1304|      0|        }
 1305|      0|    }
 1306|       |
 1307|       |    /****    COMMON PACKAGE  - only if packages are first. */
 1308|    556|    if(gDataFileAccess == UDATA_PACKAGES_FIRST) {
  ------------------
  |  Branch (1308:8): [True: 0, False: 556]
  ------------------
 1309|       |#ifdef UDATA_DEBUG
 1310|       |        fprintf(stderr, "Trying packages (UDATA_PACKAGES_FIRST)\n");
 1311|       |#endif
 1312|       |        /* #2 */
 1313|      0|        retVal = doLoadFromCommonData(isICUData, 
 1314|      0|                            pkgName.data(), dataPath, tocEntryPathSuffix, tocEntryName.data(),
 1315|      0|                            path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
 1316|      0|        if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1316:12): [True: 0, False: 0]
  |  Branch (1316:35): [True: 0, False: 0]
  ------------------
 1317|      0|            return retVal;
 1318|      0|        }
 1319|      0|    }
 1320|       |
 1321|       |    /****    INDIVIDUAL FILES  */
 1322|    556|    if((gDataFileAccess==UDATA_PACKAGES_FIRST) ||
  ------------------
  |  Branch (1322:8): [True: 0, False: 556]
  ------------------
 1323|    556|       (gDataFileAccess==UDATA_FILES_FIRST)) {
  ------------------
  |  Branch (1323:8): [True: 556, False: 0]
  ------------------
 1324|       |#ifdef UDATA_DEBUG
 1325|       |        fprintf(stderr, "Trying individual files\n");
 1326|       |#endif
 1327|       |        /* Check to make sure that there is a dataPath to iterate over */
 1328|    556|        if ((dataPath && *dataPath) || !isICUData) {
  ------------------
  |  Branch (1328:14): [True: 556, False: 0]
  |  Branch (1328:26): [True: 0, False: 556]
  |  Branch (1328:40): [True: 0, False: 556]
  ------------------
 1329|      0|            retVal = doLoadFromIndividualFiles(pkgName.data(), dataPath, tocEntryPathSuffix,
 1330|      0|                            path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
 1331|      0|            if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1331:16): [True: 0, False: 0]
  |  Branch (1331:39): [True: 0, False: 0]
  ------------------
 1332|      0|                return retVal;
 1333|      0|            }
 1334|      0|        }
 1335|    556|    }
 1336|       |
 1337|       |    /****    COMMON PACKAGE  */
 1338|    556|    if((gDataFileAccess==UDATA_ONLY_PACKAGES) || 
  ------------------
  |  Branch (1338:8): [True: 0, False: 556]
  ------------------
 1339|    556|       (gDataFileAccess==UDATA_FILES_FIRST)) {
  ------------------
  |  Branch (1339:8): [True: 556, False: 0]
  ------------------
 1340|       |#ifdef UDATA_DEBUG
 1341|       |        fprintf(stderr, "Trying packages (UDATA_ONLY_PACKAGES || UDATA_FILES_FIRST)\n");
 1342|       |#endif
 1343|    556|        retVal = doLoadFromCommonData(isICUData,
 1344|    556|                            pkgName.data(), dataPath, tocEntryPathSuffix, tocEntryName.data(),
 1345|    556|                            path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
 1346|    556|        if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1346:12): [True: 423, False: 133]
  |  Branch (1346:35): [True: 0, False: 133]
  ------------------
 1347|    423|            return retVal;
 1348|    423|        }
 1349|    556|    }
 1350|       |    
 1351|       |    /* Load from DLL.  If we haven't attempted package load, we also haven't had any chance to
 1352|       |        try a DLL (static or setCommonData/etc)  load.
 1353|       |         If we ever have a "UDATA_ONLY_FILES", add it to the or list here.  */  
 1354|    133|    if(gDataFileAccess==UDATA_NO_FILES) {
  ------------------
  |  Branch (1354:8): [True: 0, False: 133]
  ------------------
 1355|       |#ifdef UDATA_DEBUG
 1356|       |        fprintf(stderr, "Trying common data (UDATA_NO_FILES)\n");
 1357|       |#endif
 1358|      0|        retVal = doLoadFromCommonData(isICUData,
 1359|      0|                            pkgName.data(), "", tocEntryPathSuffix, tocEntryName.data(),
 1360|      0|                            path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
 1361|      0|        if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1361:12): [True: 0, False: 0]
  |  Branch (1361:35): [True: 0, False: 0]
  ------------------
 1362|      0|            return retVal;
 1363|      0|        }
 1364|      0|    }
 1365|       |
 1366|       |    /* data not found */
 1367|    133|    if(U_SUCCESS(*pErrorCode)) {
  ------------------
  |  Branch (1367:8): [True: 133, False: 0]
  ------------------
 1368|    133|        if(U_SUCCESS(subErrorCode)) {
  ------------------
  |  Branch (1368:12): [True: 132, False: 1]
  ------------------
 1369|       |            /* file not found */
 1370|    132|            *pErrorCode=U_FILE_ACCESS_ERROR;
 1371|    132|        } else {
 1372|       |            /* entry point not found or rejected */
 1373|      1|            *pErrorCode=subErrorCode;
 1374|      1|        }
 1375|    133|    }
 1376|    133|    return retVal;
 1377|    133|}
udata.cpp:_ZL14isTimeZoneFilePKcS0_:
 1107|    556|static UBool isTimeZoneFile(const char *name, const char *type) {
 1108|    556|    return ((uprv_strcmp(type, "res") == 0) &&
  ------------------
  |  |   38|    556|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|    556|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1108:13): [True: 0, False: 556]
  ------------------
 1109|    556|            (uprv_strcmp(name, "zoneinfo64") == 0 ||
  ------------------
  |  |   38|      0|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1109:14): [True: 0, False: 0]
  ------------------
 1110|      0|             uprv_strcmp(name, "timezoneTypes") == 0 ||
  ------------------
  |  |   38|      0|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1110:14): [True: 0, False: 0]
  ------------------
 1111|      0|             uprv_strcmp(name, "windowsZones") == 0 ||
  ------------------
  |  |   38|      0|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1111:14): [True: 0, False: 0]
  ------------------
 1112|      0|             uprv_strcmp(name, "metaZones") == 0));
  ------------------
  |  |   38|      0|#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
  |  |  ------------------
  |  |  |  |  393|      0|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (1112:14): [True: 0, False: 0]
  ------------------
 1113|    556|}
udata.cpp:_ZL13checkDataItemPK10DataHeaderPFaPvPKcS4_PK9UDataInfoES2_S4_S4_P10UErrorCodeSB_:
  949|    423|{
  950|    423|    UDataMemory  *rDataMem = nullptr;          /* the new UDataMemory, to be returned.        */
  951|       |
  952|    423|    if (U_FAILURE(*fatalErr)) {
  ------------------
  |  Branch (952:9): [True: 0, False: 423]
  ------------------
  953|      0|        return nullptr;
  954|      0|    }
  955|       |
  956|    423|    if(pHeader->dataHeader.magic1==0xda &&
  ------------------
  |  Branch (956:8): [True: 423, False: 0]
  ------------------
  957|    423|        pHeader->dataHeader.magic2==0x27 &&
  ------------------
  |  Branch (957:9): [True: 423, False: 0]
  ------------------
  958|    423|        (isAcceptable==nullptr || isAcceptable(context, type, name, &pHeader->info))
  ------------------
  |  Branch (958:10): [True: 0, False: 423]
  |  Branch (958:35): [True: 423, False: 0]
  ------------------
  959|    423|    ) {
  960|    423|        rDataMem=UDataMemory_createNewInstance(fatalErr);
  ------------------
  |  |   79|    423|#define UDataMemory_createNewInstance U_ICU_ENTRY_POINT_RENAME(UDataMemory_createNewInstance)
  |  |  ------------------
  |  |  |  |  123|    423|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    423|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    423|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  961|    423|        if (U_FAILURE(*fatalErr)) {
  ------------------
  |  Branch (961:13): [True: 0, False: 423]
  ------------------
  962|      0|            return nullptr;
  963|      0|        }
  964|    423|        rDataMem->pHeader = pHeader;
  965|    423|    } else {
  966|       |        /* the data is not acceptable, look further */
  967|       |        /* If we eventually find something good, this errorcode will be */
  968|       |        /*    cleared out.                                              */
  969|      0|        *nonFatalErr=U_INVALID_FORMAT_ERROR;
  970|      0|    }
  971|    423|    return rDataMem;
  972|    423|}
udata.cpp:_ZL20doLoadFromCommonDataaPKcS0_S0_S0_S0_S0_S0_PFaPvS0_S0_PK9UDataInfoES1_P10UErrorCodeS8_:
 1042|    556|{
 1043|    556|    UDataMemory        *pEntryData;
 1044|    556|    const DataHeader   *pHeader;
 1045|    556|    UDataMemory        *pCommonData;
 1046|    556|    int32_t            commonDataIndex;
 1047|    556|    UBool              checkedExtendedICUData = false;
 1048|       |    /* try to get common data.  The loop is for platforms such as the 390 that do
 1049|       |     *  not initially load the full set of ICU data.  If the lookup of an ICU data item
 1050|       |     *  fails, the full (but slower to load) set is loaded, the and the loop repeats,
 1051|       |     *  trying the lookup again.  Once the full set of ICU data is loaded, the loop wont
 1052|       |     *  repeat because the full set will be checked the first time through.
 1053|       |     *
 1054|       |     *  The loop also handles the fallback to a .dat file if the application linked
 1055|       |     *   to the stub data library rather than a real library.
 1056|       |     */
 1057|    689|    for (commonDataIndex = isICUData ? 0 : -1;;) {
  ------------------
  |  Branch (1057:28): [True: 556, False: 0]
  ------------------
 1058|    689|        pCommonData=openCommonData(path, commonDataIndex, subErrorCode); /** search for pkg **/
 1059|       |
 1060|    689|        if(U_SUCCESS(*subErrorCode) && pCommonData!=nullptr) {
  ------------------
  |  Branch (1060:12): [True: 689, False: 0]
  |  Branch (1060:40): [True: 556, False: 133]
  ------------------
 1061|    556|            int32_t length;
 1062|       |
 1063|       |            /* look up the data piece in the common data */
 1064|    556|            pHeader=pCommonData->vFuncs->Lookup(pCommonData, tocEntryName, &length, subErrorCode);
 1065|       |#ifdef UDATA_DEBUG
 1066|       |            fprintf(stderr, "%s: pHeader=%p - %s\n", tocEntryName, (void*) pHeader, u_errorName(*subErrorCode));
 1067|       |#endif
 1068|       |
 1069|    556|            if(pHeader!=nullptr) {
  ------------------
  |  Branch (1069:16): [True: 423, False: 133]
  ------------------
 1070|    423|                pEntryData = checkDataItem(pHeader, isAcceptable, context, type, name, subErrorCode, pErrorCode);
 1071|       |#ifdef UDATA_DEBUG
 1072|       |                fprintf(stderr, "pEntryData=%p\n", (void*) pEntryData);
 1073|       |#endif
 1074|    423|                if (U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (1074:21): [True: 0, False: 423]
  ------------------
 1075|      0|                    return nullptr;
 1076|      0|                }
 1077|    423|                if (pEntryData != nullptr) {
  ------------------
  |  Branch (1077:21): [True: 423, False: 0]
  ------------------
 1078|    423|                    pEntryData->length = length;
 1079|    423|                    return pEntryData;
 1080|    423|                }
 1081|    423|            }
 1082|    556|        }
 1083|       |        // If we failed due to being out-of-memory, then stop early and report the error.
 1084|    266|        if (*subErrorCode == U_MEMORY_ALLOCATION_ERROR) {
  ------------------
  |  Branch (1084:13): [True: 0, False: 266]
  ------------------
 1085|      0|            *pErrorCode = *subErrorCode;
 1086|      0|            return nullptr;
 1087|      0|        }
 1088|       |        /* Data wasn't found.  If we were looking for an ICUData item and there is
 1089|       |         * more data available, load it and try again,
 1090|       |         * otherwise break out of this loop. */
 1091|    266|        if (!isICUData) {
  ------------------
  |  Branch (1091:13): [True: 0, False: 266]
  ------------------
 1092|      0|            return nullptr;
 1093|    266|        } else if (pCommonData != nullptr) {
  ------------------
  |  Branch (1093:20): [True: 133, False: 133]
  ------------------
 1094|    133|            ++commonDataIndex;  /* try the next data package */
 1095|    133|        } else if ((!checkedExtendedICUData) && extendICUData(subErrorCode)) {
  ------------------
  |  Branch (1095:20): [True: 133, False: 0]
  |  Branch (1095:49): [True: 0, False: 133]
  ------------------
 1096|      0|            checkedExtendedICUData = true;
 1097|       |            /* try this data package slot again: it changed from nullptr to non-nullptr */
 1098|    133|        } else {
 1099|    133|            return nullptr;
 1100|    133|        }
 1101|    266|    }
 1102|    556|}
udata.cpp:_ZL14openCommonDataPKciP10UErrorCode:
  673|    690|{
  674|    690|    UDataMemory tData;
  675|    690|    const char *pathBuffer;
  676|    690|    const char *inBasename;
  677|       |
  678|    690|    if (U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (678:9): [True: 0, False: 690]
  ------------------
  679|      0|        return nullptr;
  680|      0|    }
  681|       |
  682|    690|    UDataMemory_init(&tData);
  ------------------
  |  |   80|    690|#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init)
  |  |  ------------------
  |  |  |  |  123|    690|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    690|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    690|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  683|       |
  684|       |    /* ??????? TODO revisit this */ 
  685|    690|    if (commonDataIndex >= 0) {
  ------------------
  |  Branch (685:9): [True: 689, False: 1]
  ------------------
  686|       |        /* "mini-cache" for common ICU data */
  687|    689|        if(commonDataIndex >= UPRV_LENGTHOF(gCommonICUDataArray)) {
  ------------------
  |  |   99|    689|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  |  Branch (687:12): [True: 0, False: 689]
  ------------------
  688|      0|            return nullptr;
  689|      0|        }
  690|    689|        {
  691|    689|            Mutex lock;
  692|    689|            if(gCommonICUDataArray[commonDataIndex] != nullptr) {
  ------------------
  |  Branch (692:16): [True: 555, False: 134]
  ------------------
  693|    555|                return gCommonICUDataArray[commonDataIndex];
  694|    555|            }
  695|    134|#if !defined(ICU_DATA_DIR_WINDOWS)
  696|       |// When using the Windows system data, we expect only a single data file.
  697|    134|            int32_t i;
  698|    134|            for(i = 0; i < commonDataIndex; ++i) {
  ------------------
  |  Branch (698:24): [True: 133, False: 1]
  ------------------
  699|    133|                if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) {
  ------------------
  |  |  171|    133|#define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM,U_LIB_SUFFIX_C_NAME)
  |  |  ------------------
  |  |  |  |  178|    133|#define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(major,suff)
  |  |  |  |  ------------------
  |  |  |  |  |  |  187|    133|#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (699:20): [True: 133, False: 0]
  ------------------
  700|       |                    /* The linked-in data is already in the list. */
  701|    133|                    return nullptr;
  702|    133|                }
  703|    133|            }
  704|    134|#endif
  705|    134|        }
  706|       |
  707|       |        /* Add the linked-in data to the list. */
  708|       |        /*
  709|       |         * This is where we would check and call weakly linked partial-data-library
  710|       |         * access functions.
  711|       |         */
  712|       |        /*
  713|       |        if (uprv_getICUData_collation) {
  714|       |            setCommonICUDataPointer(uprv_getICUData_collation(), false, pErrorCode);
  715|       |        }
  716|       |        if (uprv_getICUData_conversion) {
  717|       |            setCommonICUDataPointer(uprv_getICUData_conversion(), false, pErrorCode);
  718|       |        }
  719|       |        */
  720|      1|#if !defined(ICU_DATA_DIR_WINDOWS)
  721|       |// When using the Windows system data, we expect only a single data file.
  722|      1|        setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, false, pErrorCode);
  ------------------
  |  |  171|      1|#define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM,U_LIB_SUFFIX_C_NAME)
  |  |  ------------------
  |  |  |  |  178|      1|#define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(major,suff)
  |  |  |  |  ------------------
  |  |  |  |  |  |  187|      1|#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  723|      1|        {
  724|      1|            Mutex lock;
  725|      1|            return gCommonICUDataArray[commonDataIndex];
  726|    134|        }
  727|    134|#endif
  728|    134|    }
  729|       |
  730|       |
  731|       |    /* request is NOT for ICU Data.  */
  732|       |
  733|       |    /* Find the base name portion of the supplied path.   */
  734|       |    /*   inBasename will be left pointing somewhere within the original path string.      */
  735|      1|    inBasename = findBasename(path);
  736|       |#ifdef UDATA_DEBUG
  737|       |    fprintf(stderr, "inBasename = %s\n", inBasename);
  738|       |#endif
  739|       |
  740|      1|    if(*inBasename==0) {
  ------------------
  |  Branch (740:8): [True: 0, False: 1]
  ------------------
  741|       |        /* no basename.     This will happen if the original path was a directory name,   */
  742|       |        /*    like  "a/b/c/".   (Fallback to separate files will still work.)             */
  743|       |#ifdef UDATA_DEBUG
  744|       |        fprintf(stderr, "ocd: no basename in %s, bailing.\n", path);
  745|       |#endif
  746|      0|        if (U_SUCCESS(*pErrorCode)) {
  ------------------
  |  Branch (746:13): [True: 0, False: 0]
  ------------------
  747|      0|            *pErrorCode=U_FILE_ACCESS_ERROR;
  748|      0|        }
  749|      0|        return nullptr;
  750|      0|    }
  751|       |
  752|       |   /* Is the requested common data file already open and cached?                     */
  753|       |   /*   Note that the cache is keyed by the base name only.  The rest of the path,   */
  754|       |   /*     if any, is not considered.                                                 */
  755|      1|    UDataMemory  *dataToReturn = udata_findCachedData(inBasename, *pErrorCode);
  756|      1|    if (dataToReturn != nullptr || U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (756:9): [True: 0, False: 1]
  |  Branch (756:36): [True: 0, False: 1]
  ------------------
  757|      0|        return dataToReturn;
  758|      0|    }
  759|       |
  760|       |    /* Requested item is not in the cache.
  761|       |     * Hunt it down, trying all the path locations
  762|       |     */
  763|       |
  764|      1|    UDataPathIterator iter(u_getDataDirectory(), inBasename, path, ".dat", true, pErrorCode);
  ------------------
  |  |  271|      1|#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|       |
  766|      1|    while ((UDataMemory_isLoaded(&tData)==false) && (pathBuffer = iter.next(pErrorCode)) != nullptr)
  ------------------
  |  |   81|      1|#define UDataMemory_isLoaded U_ICU_ENTRY_POINT_RENAME(UDataMemory_isLoaded)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (766:12): [True: 1, False: 0]
  |  Branch (766:53): [True: 0, False: 1]
  ------------------
  767|      0|    {
  768|       |#ifdef UDATA_DEBUG
  769|       |        fprintf(stderr, "ocd: trying path %s - ", pathBuffer);
  770|       |#endif
  771|      0|        uprv_mapFile(&tData, pathBuffer, pErrorCode);
  ------------------
  |  | 1525|      0|#define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  772|       |#ifdef UDATA_DEBUG
  773|       |        fprintf(stderr, "%s\n", UDataMemory_isLoaded(&tData)?"LOADED":"not loaded");
  774|       |#endif
  775|      0|    }
  776|      1|    if (U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (776:9): [True: 0, False: 1]
  ------------------
  777|      0|        return nullptr;
  778|      0|    }
  779|       |
  780|      1|    if (U_FAILURE(*pErrorCode)) {
  ------------------
  |  Branch (780:9): [True: 0, False: 1]
  ------------------
  781|      0|        return nullptr;
  782|      0|    }
  783|      1|    if (!UDataMemory_isLoaded(&tData)) {
  ------------------
  |  |   81|      1|#define UDataMemory_isLoaded U_ICU_ENTRY_POINT_RENAME(UDataMemory_isLoaded)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (783:9): [True: 1, False: 0]
  ------------------
  784|       |        /* no common data */
  785|      1|        *pErrorCode=U_FILE_ACCESS_ERROR;
  786|      1|        return nullptr;
  787|      1|    }
  788|       |
  789|       |    /* we have mapped a file, check its header */
  790|      0|    udata_checkCommonData(&tData, pErrorCode);
  ------------------
  |  |  884|      0|#define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonData)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  791|       |
  792|       |
  793|       |    /* Cache the UDataMemory struct for this .dat file,
  794|       |     *   so we won't need to hunt it down and map it again next time
  795|       |     *   something is needed from it.                */
  796|      0|    return udata_cacheDataItem(inBasename, &tData, pErrorCode);
  797|      1|}
udata.cpp:_ZL23setCommonICUDataPointerPKvaP10UErrorCode:
  214|      1|setCommonICUDataPointer(const void *pData, UBool /*warn*/, UErrorCode *pErrorCode) {
  215|      1|    UDataMemory tData;
  216|      1|    UDataMemory_init(&tData);
  ------------------
  |  |   80|      1|#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|      1|    UDataMemory_setData(&tData, pData);
  ------------------
  |  |   83|      1|#define UDataMemory_setData U_ICU_ENTRY_POINT_RENAME(UDataMemory_setData)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|      1|    udata_checkCommonData(&tData, pErrorCode);
  ------------------
  |  |  884|      1|#define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonData)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  219|      1|    return setCommonICUData(&tData, false, pErrorCode);
  220|      1|}
udata.cpp:_ZL20udata_findCachedDataPKcR10UErrorCode:
  306|    134|{
  307|    134|    UHashtable        *htable;
  308|    134|    UDataMemory       *retVal = nullptr;
  309|    134|    DataCacheElement  *el;
  310|    134|    const char        *baseName;
  311|       |
  312|    134|    htable = udata_getHashTable(err);
  313|    134|    if (U_FAILURE(err)) {
  ------------------
  |  Branch (313:9): [True: 1, False: 133]
  ------------------
  314|      1|        return nullptr;
  315|      1|    }
  316|       |
  317|    133|    baseName = findBasename(path);   /* Cache remembers only the base name, not the full path. */
  318|    133|    umtx_lock(nullptr);
  ------------------
  |  | 1250|    133|#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
  |  |  ------------------
  |  |  |  |  123|    133|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    133|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    133|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  319|    133|    el = static_cast<DataCacheElement*>(uhash_get(htable, baseName));
  ------------------
  |  | 1007|    133|#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get)
  |  |  ------------------
  |  |  |  |  123|    133|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    133|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    133|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  320|    133|    umtx_unlock(nullptr);
  ------------------
  |  | 1251|    133|#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
  |  |  ------------------
  |  |  |  |  123|    133|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    133|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    133|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  321|    133|    if (el != nullptr) {
  ------------------
  |  Branch (321:9): [True: 0, False: 133]
  ------------------
  322|      0|        retVal = el->item;
  323|      0|    }
  324|       |#ifdef UDATA_DEBUG
  325|       |    fprintf(stderr, "Cache: [%s] -> %p\n", baseName, (void*) retVal);
  326|       |#endif
  327|    133|    return retVal;
  328|    134|}
udata.cpp:_ZL13extendICUDataP10UErrorCode:
  811|    133|{
  812|    133|    UDataMemory   *pData;
  813|    133|    UDataMemory   copyPData;
  814|    133|    UBool         didUpdate = false;
  815|       |
  816|       |    /*
  817|       |     * There is a chance for a race condition here.
  818|       |     * Normally, ICU data is loaded from a DLL or via mmap() and
  819|       |     * setCommonICUData() will detect if the same address is set twice.
  820|       |     * If ICU is built with data loading via fread() then the address will
  821|       |     * be different each time the common data is loaded and we may add
  822|       |     * multiple copies of the data.
  823|       |     * In this case, use a mutex to prevent the race.
  824|       |     * Use a specific mutex to avoid nested locks of the global mutex.
  825|       |     */
  826|       |#if MAP_IMPLEMENTATION==MAP_STDIO
  827|       |    static UMutex extendICUDataMutex;
  828|       |    umtx_lock(&extendICUDataMutex);
  829|       |#endif
  830|    133|    if(!umtx_loadAcquire(gHaveTriedToLoadCommonData)) {
  ------------------
  |  Branch (830:8): [True: 1, False: 132]
  ------------------
  831|       |        /* See if we can explicitly open a .dat file for the ICUData. */
  832|      1|        pData = openCommonData(
  833|      1|                   U_ICUDATA_NAME,            /*  "icudt20l" , for example.          */
  ------------------
  |  |  154|      1|#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
  |  |  ------------------
  |  |  |  |  144|      1|#     define U_ICUDATA_TYPE_LETTER "l"
  |  |  ------------------
  ------------------
  834|      1|                   -1,                        /*  Pretend we're not opening ICUData  */
  835|      1|                   pErr);
  836|       |
  837|       |        /* How about if there is no pData, eh... */
  838|       |
  839|      1|       UDataMemory_init(&copyPData);
  ------------------
  |  |   80|      1|#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  840|      1|       if(pData != nullptr) {
  ------------------
  |  Branch (840:11): [True: 0, False: 1]
  ------------------
  841|      0|          UDatamemory_assign(&copyPData, pData);
  ------------------
  |  |   84|      0|#define UDatamemory_assign U_ICU_ENTRY_POINT_RENAME(UDatamemory_assign)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  842|      0|          copyPData.map = nullptr;     /* The mapping for this data is owned by the hash table */
  843|      0|          copyPData.mapAddr = nullptr; /*   which will unmap it when ICU is shut down.         */
  844|       |                                       /* CommonICUData is also unmapped when ICU is shut down.*/
  845|       |                                       /* To avoid unmapping the data twice, zero out the map  */
  846|       |                                       /*   fields in the UDataMemory that we're assigning     */
  847|       |                                       /*   to CommonICUData.                                  */
  848|       |
  849|      0|          didUpdate = /* no longer using this result */
  850|      0|              setCommonICUData(&copyPData,/*  The new common data.                                */
  851|      0|                       false,             /*  No warnings if write didn't happen                  */
  852|      0|                       pErr);             /*  setCommonICUData honors errors; NOP if error set    */
  853|      0|        }
  854|       |
  855|      1|        umtx_storeRelease(gHaveTriedToLoadCommonData, 1);
  856|      1|    }
  857|       |
  858|    133|    didUpdate = findCommonICUDataByName(U_ICUDATA_NAME, *pErr);  /* Return 'true' when a racing writes out the extended                 */
  ------------------
  |  |  154|    133|#define U_ICUDATA_NAME    "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
  |  |  ------------------
  |  |  |  |  144|    133|#     define U_ICUDATA_TYPE_LETTER "l"
  |  |  ------------------
  ------------------
  859|       |                                                          /* data after another thread has failed to see it (in openCommonData), so     */
  860|       |                                                          /* extended data can be examined.                                             */
  861|       |                                                          /* Also handles a race through here before gHaveTriedToLoadCommonData is set. */
  862|       |
  863|       |#if MAP_IMPLEMENTATION==MAP_STDIO
  864|       |    umtx_unlock(&extendICUDataMutex);
  865|       |#endif
  866|    133|    return didUpdate;               /* Return true if ICUData pointer was updated.   */
  867|       |                                    /*   (Could potentially have been done by another thread racing */
  868|       |                                    /*   us through here, but that's fine, we still return true    */
  869|       |                                    /*   so that current thread will also examine extended data.   */
  870|    133|}
udata.cpp:_ZL23findCommonICUDataByNamePKcR10UErrorCode:
  144|    133|{
  145|    133|    UBool found = false;
  146|    133|    int32_t i;
  147|       |
  148|    133|    UDataMemory  *pData = udata_findCachedData(inBasename, err);
  149|    133|    if (U_FAILURE(err) || pData == nullptr)
  ------------------
  |  Branch (149:9): [True: 1, False: 132]
  |  Branch (149:27): [True: 132, False: 0]
  ------------------
  150|    133|        return false;
  151|       |
  152|      0|    {
  153|      0|        Mutex lock;
  154|      0|        for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray); ++i) {
  ------------------
  |  |   99|      0|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  ------------------
  |  Branch (154:21): [True: 0, False: 0]
  ------------------
  155|      0|            if ((gCommonICUDataArray[i] != nullptr) && (gCommonICUDataArray[i]->pHeader == pData->pHeader)) {
  ------------------
  |  Branch (155:17): [True: 0, False: 0]
  |  Branch (155:56): [True: 0, False: 0]
  ------------------
  156|       |                /* The data pointer is already in the array. */
  157|      0|                found = true;
  158|      0|                break;
  159|      0|            }
  160|      0|        }
  161|      0|    }
  162|      0|    return found;
  163|    133|}

UDataMemory_init_78:
   28|  1.11k|U_CFUNC void UDataMemory_init(UDataMemory *This) {
   29|  1.11k|    uprv_memset(This, 0, sizeof(UDataMemory));
  ------------------
  |  |  100|  1.11k|#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
  |  |  ------------------
  |  |  |  |  393|  1.11k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
   30|  1.11k|    This->length=-1;
   31|  1.11k|}
UDatamemory_assign_78:
   34|      1|U_CFUNC void UDatamemory_assign(UDataMemory *dest, UDataMemory *source) {
   35|       |    /* UDataMemory Assignment.  Destination UDataMemory must be initialized first.  */
   36|      1|    UBool mallocedFlag = dest->heapAllocated;
   37|      1|    uprv_memcpy(dest, source, sizeof(UDataMemory));
  ------------------
  |  |   42|      1|#define uprv_memcpy(dst, src, size) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      1|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |   43|      1|    /* Suppress warnings about addresses that will never be NULL */ \
  |  |   44|      1|    _Pragma("clang diagnostic push") \
  |  |   45|      1|    _Pragma("clang diagnostic ignored \"-Waddress\"") \
  |  |   46|      1|    U_ASSERT(dst != NULL); \
  |  |  ------------------
  |  |  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   47|      1|    U_ASSERT(src != NULL); \
  |  |  ------------------
  |  |  |  |   35|      1|#   define U_ASSERT(exp) (void)0
  |  |  ------------------
  |  |   48|      1|    _Pragma("clang diagnostic pop") \
  |  |   49|      1|    U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size); \
  |  |  ------------------
  |  |  |  |  393|      1|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  |  |   50|      1|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      1|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   38|      1|    dest->heapAllocated = mallocedFlag;
   39|      1|}
UDataMemory_createNewInstance_78:
   41|    424|U_CFUNC UDataMemory *UDataMemory_createNewInstance(UErrorCode *pErr) {
   42|    424|    UDataMemory *This;
   43|       |
   44|    424|    if (U_FAILURE(*pErr)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 424]
  ------------------
   45|      0|        return nullptr;
   46|      0|    }
   47|    424|    This = (UDataMemory *)uprv_malloc(sizeof(UDataMemory));
  ------------------
  |  | 1524|    424|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|    424|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    424|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    424|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   48|    424|    if (This == nullptr) {
  ------------------
  |  Branch (48:9): [True: 0, False: 424]
  ------------------
   49|      0|        *pErr = U_MEMORY_ALLOCATION_ERROR; }
   50|    424|    else {
   51|    424|        UDataMemory_init(This);
  ------------------
  |  |   80|    424|#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init)
  |  |  ------------------
  |  |  |  |  123|    424|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    424|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    424|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   52|    424|        This->heapAllocated = true;
   53|    424|    }
   54|    424|    return This;
   55|    424|}
UDataMemory_normalizeDataPointer_78:
   59|      1|UDataMemory_normalizeDataPointer(const void *p) {
   60|       |    /* allow the data to be optionally prepended with an alignment-forcing double value */
   61|      1|    const DataHeader *pdh = (const DataHeader *)p;
   62|      1|    if(pdh==nullptr || (pdh->dataHeader.magic1==0xda && pdh->dataHeader.magic2==0x27)) {
  ------------------
  |  Branch (62:8): [True: 0, False: 1]
  |  Branch (62:25): [True: 1, False: 0]
  |  Branch (62:57): [True: 1, False: 0]
  ------------------
   63|      1|        return pdh;
   64|      1|    } else {
   65|       |#if U_PLATFORM == U_PF_OS400
   66|       |        /*
   67|       |        TODO: Fix this once the compiler implements this feature. Keep in sync with genccode.c
   68|       |
   69|       |        This is here because this platform can't currently put
   70|       |        const data into the read-only pages of an object or
   71|       |        shared library (service program). Only strings are allowed in read-only
   72|       |        pages, so we use char * strings to store the data.
   73|       |
   74|       |        In order to prevent the beginning of the data from ever matching the
   75|       |        magic numbers we must skip the initial double.
   76|       |        [grhoten 4/24/2003]
   77|       |        */
   78|       |        return (const DataHeader *)*((const void **)p+1);
   79|       |#else
   80|      0|        return (const DataHeader *)((const double *)p+1);
   81|      0|#endif
   82|      0|    }
   83|      1|}
UDataMemory_setData_78:
   86|      1|U_CFUNC void UDataMemory_setData (UDataMemory *This, const void *dataAddr) {
   87|      1|    This->pHeader = UDataMemory_normalizeDataPointer(dataAddr);
  ------------------
  |  |   82|      1|#define UDataMemory_normalizeDataPointer U_ICU_ENTRY_POINT_RENAME(UDataMemory_normalizeDataPointer)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|      1|}
udata_close_78:
   92|    251|udata_close(UDataMemory *pData) {
   93|    251|    if(pData!=nullptr) {
  ------------------
  |  Branch (93:8): [True: 251, False: 0]
  ------------------
   94|    251|        uprv_unmapFile(pData);
  ------------------
  |  | 1554|    251|#define uprv_unmapFile U_ICU_ENTRY_POINT_RENAME(uprv_unmapFile)
  |  |  ------------------
  |  |  |  |  123|    251|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    251|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    251|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|    251|        if(pData->heapAllocated ) {
  ------------------
  |  Branch (95:12): [True: 251, False: 0]
  ------------------
   96|    251|            uprv_free(pData);
  ------------------
  |  | 1503|    251|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|    251|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    251|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    251|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   97|    251|        } else {
   98|      0|            UDataMemory_init(pData);
  ------------------
  |  |   80|      0|#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|      0|        }
  100|    251|    }
  101|    251|}
udata_getMemory_78:
  104|    423|udata_getMemory(UDataMemory *pData) {
  105|    423|    if(pData!=nullptr && pData->pHeader!=nullptr) {
  ------------------
  |  Branch (105:8): [True: 423, False: 0]
  |  Branch (105:26): [True: 423, False: 0]
  ------------------
  106|    423|        return (char *)(pData->pHeader)+udata_getHeaderSize(pData->pHeader);
  ------------------
  |  |  887|    423|#define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize)
  |  |  ------------------
  |  |  |  |  123|    423|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    423|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|    423|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  107|    423|    } else {
  108|      0|        return nullptr;
  109|      0|    }
  110|    423|}
UDataMemory_isLoaded_78:
  159|      2|U_CFUNC UBool UDataMemory_isLoaded(const UDataMemory *This) {
  160|      2|    return This->pHeader != nullptr;
  161|      2|}

uenum_close_78:
   60|      1|{
   61|      1|    if (en) {
  ------------------
  |  Branch (61:9): [True: 1, False: 0]
  ------------------
   62|      1|        if (en->close != nullptr) {
  ------------------
  |  Branch (62:13): [True: 1, False: 0]
  ------------------
   63|      1|            if (en->baseContext) {
  ------------------
  |  Branch (63:17): [True: 0, False: 1]
  ------------------
   64|      0|                uprv_free(en->baseContext);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   65|      0|            }
   66|      1|            en->close(en);
   67|      1|        } else { /* this seems dangerous, but we better kill the object */
   68|      0|            uprv_free(en);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   69|      0|        }
   70|      1|    }
   71|      1|}
uenum_count_78:
   75|      1|{
   76|      1|    if (!en || U_FAILURE(*status)) {
  ------------------
  |  Branch (76:9): [True: 0, False: 1]
  |  Branch (76:16): [True: 0, False: 1]
  ------------------
   77|      0|        return -1;
   78|      0|    }
   79|      1|    if (en->count != nullptr) {
  ------------------
  |  Branch (79:9): [True: 1, False: 0]
  ------------------
   80|      1|        return en->count(en, status);
   81|      1|    } else {
   82|      0|        *status = U_UNSUPPORTED_ERROR;
   83|      0|        return -1;
   84|      0|    }
   85|      1|}
uenum_next_78:
  160|    365|{
  161|    365|    if (!en || U_FAILURE(*status)) {
  ------------------
  |  Branch (161:9): [True: 0, False: 365]
  |  Branch (161:16): [True: 0, False: 365]
  ------------------
  162|      0|        return nullptr;
  163|      0|    }
  164|    365|    if (en->next != nullptr) {
  ------------------
  |  Branch (164:9): [True: 365, False: 0]
  ------------------
  165|    365|        if (resultLength != nullptr) {
  ------------------
  |  Branch (165:13): [True: 0, False: 365]
  ------------------
  166|      0|            return en->next(en, resultLength, status);
  167|      0|        }
  168|    365|        else {
  169|    365|            int32_t dummyLength=0;
  170|    365|            return en->next(en, &dummyLength, status);
  171|    365|        }
  172|    365|    } else {
  173|      0|        *status = U_UNSUPPORTED_ERROR;
  174|      0|        return nullptr;
  175|      0|    }
  176|    365|}

uhash_open_78:
  547|      1|           UErrorCode *status) {
  548|       |
  549|      1|    return _uhash_create(keyHash, keyComp, valueComp, DEFAULT_PRIME_INDEX, status);
  ------------------
  |  |   91|      1|#define DEFAULT_PRIME_INDEX 4
  ------------------
  550|      1|}
uhash_openSize_78:
  557|      1|               UErrorCode *status) {
  558|       |
  559|       |    /* Find the smallest index i for which PRIMES[i] >= size. */
  560|      1|    int32_t i = 0;
  561|      8|    while (i<(PRIMES_LENGTH-1) && PRIMES[i]<size) {
  ------------------
  |  |   90|      8|#define PRIMES_LENGTH UPRV_LENGTHOF(PRIMES)
  |  |  ------------------
  |  |  |  |   99|      8|#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
  |  |  ------------------
  ------------------
  |  Branch (561:12): [True: 8, False: 0]
  |  Branch (561:35): [True: 7, False: 1]
  ------------------
  562|      7|        ++i;
  563|      7|    }
  564|       |
  565|      1|    return _uhash_create(keyHash, keyComp, valueComp, i, status);
  566|      1|}
uhash_setValueDeleter_78:
  643|      1|uhash_setValueDeleter(UHashtable *hash, UObjectDeleter *fn) {
  644|      1|    UObjectDeleter *result = hash->valueDeleter;
  645|      1|    hash->valueDeleter = fn;
  646|      1|    return result;
  647|      1|}
uhash_get_78:
  665|  35.0k|          const void* key) {
  666|  35.0k|    UHashTok keyholder;
  667|  35.0k|    keyholder.pointer = (void*) key;
  668|  35.0k|    return _uhash_find(hash, keyholder, hash->keyHasher(keyholder))->value.pointer;
  669|  35.0k|}
uhash_put_78:
  721|    171|          UErrorCode *status) {
  722|    171|    UHashTok keyholder, valueholder;
  723|    171|    keyholder.pointer = key;
  724|    171|    valueholder.pointer = value;
  725|    171|    return _uhash_put(hash, keyholder, valueholder,
  726|    171|                      HINT_KEY_POINTER | HINT_VALUE_POINTER,
  ------------------
  |  |  139|    171|#define HINT_KEY_POINTER   (1)
  ------------------
                                    HINT_KEY_POINTER | HINT_VALUE_POINTER,
  ------------------
  |  |  140|    171|#define HINT_VALUE_POINTER (2)
  ------------------
  727|    171|                      status).pointer;
  728|    171|}
uhash_hashChars_78:
  938|  35.1k|uhash_hashChars(const UHashTok key) {
  939|  35.1k|    const char *s = (const char *)key.pointer;
  940|  35.1k|    return s == nullptr ? 0 : static_cast<int32_t>(ustr_hashCharsN(s, static_cast<int32_t>(uprv_strlen(s))));
  ------------------
  |  | 1878|  35.1k|#define ustr_hashCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashCharsN)
  |  |  ------------------
  |  |  |  |  123|  35.1k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  35.1k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  35.1k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return s == nullptr ? 0 : static_cast<int32_t>(ustr_hashCharsN(s, static_cast<int32_t>(uprv_strlen(s))));
  ------------------
  |  |   37|  35.1k|#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
  |  |  ------------------
  |  |  |  |  393|  35.1k|#define U_STANDARD_CPP_NAMESPACE        ::
  |  |  ------------------
  ------------------
  |  Branch (940:12): [True: 0, False: 35.1k]
  ------------------
  941|  35.1k|}
uhash_compareChars_78:
 1029|  34.4k|uhash_compareChars(const UHashTok key1, const UHashTok key2) {
 1030|  34.4k|    const char *p1 = (const char*) key1.pointer;
 1031|  34.4k|    const char *p2 = (const char*) key2.pointer;
 1032|  34.4k|    if (p1 == p2) {
  ------------------
  |  Branch (1032:9): [True: 0, False: 34.4k]
  ------------------
 1033|      0|        return true;
 1034|      0|    }
 1035|  34.4k|    if (p1 == nullptr || p2 == nullptr) {
  ------------------
  |  Branch (1035:9): [True: 0, False: 34.4k]
  |  Branch (1035:26): [True: 0, False: 34.4k]
  ------------------
 1036|      0|        return false;
 1037|      0|    }
 1038|   712k|    while (*p1 != 0 && *p1 == *p2) {
  ------------------
  |  Branch (1038:12): [True: 677k, False: 34.4k]
  |  Branch (1038:24): [True: 677k, False: 0]
  ------------------
 1039|   677k|        ++p1;
 1040|   677k|        ++p2;
 1041|   677k|    }
 1042|  34.4k|    return *p1 == *p2;
 1043|  34.4k|}
uhash.cpp:_ZL13_uhash_createPFi8UElementEPFaS_S_ES3_iP10UErrorCode:
  287|      2|              UErrorCode *status) {
  288|      2|    UHashtable *result;
  289|       |
  290|      2|    if (U_FAILURE(*status)) return nullptr;
  ------------------
  |  Branch (290:9): [True: 0, False: 2]
  ------------------
  291|       |
  292|      2|    result = static_cast<UHashtable*>(uprv_malloc(sizeof(UHashtable)));
  ------------------
  |  | 1524|      2|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      2|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      2|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      2|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  293|      2|    if (result == nullptr) {
  ------------------
  |  Branch (293:9): [True: 0, False: 2]
  ------------------
  294|      0|        *status = U_MEMORY_ALLOCATION_ERROR;
  295|      0|        return nullptr;
  296|      0|    }
  297|       |
  298|      2|    _uhash_init(result, keyHash, keyComp, valueComp, primeIndex, status);
  299|      2|    result->allocated       = true;
  300|       |
  301|      2|    if (U_FAILURE(*status)) {
  ------------------
  |  Branch (301:9): [True: 0, False: 2]
  ------------------
  302|      0|        uprv_free(result);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  303|      0|        return nullptr;
  304|      0|    }
  305|       |
  306|      2|    return result;
  307|      2|}
uhash.cpp:_ZL11_uhash_initP10UHashtablePFi8UElementEPFaS1_S1_ES5_iP10UErrorCode:
  260|      2|{
  261|      2|    if (U_FAILURE(*status)) return nullptr;
  ------------------
  |  Branch (261:9): [True: 0, False: 2]
  ------------------
  262|      2|    U_ASSERT(keyHash != nullptr);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
  263|      2|    U_ASSERT(keyComp != nullptr);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
  264|       |
  265|      2|    result->keyHasher       = keyHash;
  266|      2|    result->keyComparator   = keyComp;
  267|      2|    result->valueComparator = valueComp;
  268|      2|    result->keyDeleter      = nullptr;
  269|      2|    result->valueDeleter    = nullptr;
  270|      2|    result->allocated       = false;
  271|      2|    _uhash_internalSetResizePolicy(result, U_GROW);
  272|       |
  273|      2|    _uhash_allocate(result, primeIndex, status);
  274|       |
  275|      2|    if (U_FAILURE(*status)) {
  ------------------
  |  Branch (275:9): [True: 0, False: 2]
  ------------------
  276|      0|        return nullptr;
  277|      0|    }
  278|       |
  279|      2|    return result;
  280|      2|}
uhash.cpp:_ZL15_uhash_allocateP10UHashtableiP10UErrorCode:
  217|      2|                UErrorCode *status) {
  218|       |
  219|      2|    UHashElement *p, *limit;
  220|      2|    UHashTok emptytok;
  221|       |
  222|      2|    if (U_FAILURE(*status)) return;
  ------------------
  |  Branch (222:9): [True: 0, False: 2]
  ------------------
  223|       |
  224|      2|    U_ASSERT(primeIndex >= 0 && primeIndex < PRIMES_LENGTH);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
  225|       |
  226|      2|    hash->primeIndex = static_cast<int8_t>(primeIndex);
  227|      2|    hash->length = PRIMES[primeIndex];
  228|       |
  229|      2|    p = hash->elements = static_cast<UHashElement*>(
  230|      2|        uprv_malloc(sizeof(UHashElement) * hash->length));
  ------------------
  |  | 1524|      2|#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc)
  |  |  ------------------
  |  |  |  |  123|      2|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      2|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      2|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|       |
  232|      2|    if (hash->elements == nullptr) {
  ------------------
  |  Branch (232:9): [True: 0, False: 2]
  ------------------
  233|      0|        *status = U_MEMORY_ALLOCATION_ERROR;
  234|      0|        return;
  235|      0|    }
  236|       |
  237|      2|    emptytok.pointer = nullptr; /* Only one of these two is needed */
  238|      2|    emptytok.integer = 0;    /* but we don't know which one. */
  239|       |
  240|      2|    limit = p + hash->length;
  241|  1.15k|    while (p < limit) {
  ------------------
  |  Branch (241:12): [True: 1.14k, False: 2]
  ------------------
  242|  1.14k|        p->key = emptytok;
  243|  1.14k|        p->value = emptytok;
  244|  1.14k|        p->hashcode = HASH_EMPTY;
  ------------------
  |  |  118|  1.14k|#define HASH_EMPTY      ((int32_t) HASH_DELETED + 1)
  |  |  ------------------
  |  |  |  |  117|  1.14k|#define HASH_DELETED    ((int32_t) 0x80000000)
  |  |  ------------------
  ------------------
  245|  1.14k|        ++p;
  246|  1.14k|    }
  247|       |
  248|      2|    hash->count = 0;
  249|      2|    hash->lowWaterMark = static_cast<int32_t>(hash->length * hash->lowWaterRatio);
  250|      2|    hash->highWaterMark = static_cast<int32_t>(hash->length * hash->highWaterRatio);
  251|      2|}
uhash.cpp:_ZL30_uhash_internalSetResizePolicyP10UHashtable17UHashResizePolicy:
  197|      2|_uhash_internalSetResizePolicy(UHashtable *hash, enum UHashResizePolicy policy) {
  198|      2|    U_ASSERT(hash != nullptr);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
  199|      2|    U_ASSERT(((int32_t)policy) >= 0);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
  200|      2|    U_ASSERT(((int32_t)policy) < 3);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
  201|      2|    hash->lowWaterRatio  = RESIZE_POLICY_RATIO_TABLE[policy * 2];
  202|      2|    hash->highWaterRatio = RESIZE_POLICY_RATIO_TABLE[policy * 2 + 1];
  203|      2|}
uhash.cpp:_ZL11_uhash_findPK10UHashtable8UElementi:
  339|  35.1k|            int32_t hashcode) {
  340|       |
  341|  35.1k|    int32_t firstDeleted = -1;  /* assume invalid index */
  342|  35.1k|    int32_t theIndex, startIndex;
  343|  35.1k|    int32_t jump = 0; /* lazy evaluate */
  344|  35.1k|    int32_t tableHash;
  345|  35.1k|    UHashElement *elements = hash->elements;
  346|       |
  347|  35.1k|    hashcode &= 0x7FFFFFFF; /* must be positive */
  348|  35.1k|    startIndex = theIndex = (hashcode ^ 0x4000000) % hash->length;
  349|       |
  350|  35.9k|    do {
  351|  35.9k|        tableHash = elements[theIndex].hashcode;
  352|  35.9k|        if (tableHash == hashcode) {          /* quick check */
  ------------------
  |  Branch (352:13): [True: 34.4k, False: 1.47k]
  ------------------
  353|  34.4k|            if ((*hash->keyComparator)(key, elements[theIndex].key)) {
  ------------------
  |  Branch (353:17): [True: 34.4k, False: 0]
  ------------------
  354|  34.4k|                return &(elements[theIndex]);
  355|  34.4k|            }
  356|  34.4k|        } else if (!IS_EMPTY_OR_DELETED(tableHash)) {
  ------------------
  |  |  120|  1.47k|#define IS_EMPTY_OR_DELETED(x) ((x) < 0)
  ------------------
  |  Branch (356:20): [True: 780, False: 692]
  ------------------
  357|       |            /* We have hit a slot which contains a key-value pair,
  358|       |             * but for which the hash code does not match.  Keep
  359|       |             * looking.
  360|       |             */
  361|    780|        } else if (tableHash == HASH_EMPTY) { /* empty, end o' the line */
  ------------------
  |  |  118|    692|#define HASH_EMPTY      ((int32_t) HASH_DELETED + 1)
  |  |  ------------------
  |  |  |  |  117|    692|#define HASH_DELETED    ((int32_t) 0x80000000)
  |  |  ------------------
  ------------------
  |  Branch (361:20): [True: 692, False: 0]
  ------------------
  362|    692|            break;
  363|    692|        } else if (firstDeleted < 0) { /* remember first deleted */
  ------------------
  |  Branch (363:20): [True: 0, False: 0]
  ------------------
  364|      0|            firstDeleted = theIndex;
  365|      0|        }
  366|    780|        if (jump == 0) { /* lazy compute jump */
  ------------------
  |  Branch (366:13): [True: 463, False: 317]
  ------------------
  367|       |            /* The jump value must be relatively prime to the table
  368|       |             * length.  As long as the length is prime, then any value
  369|       |             * 1..length-1 will be relatively prime to it.
  370|       |             */
  371|    463|            jump = (hashcode % (hash->length - 1)) + 1;
  372|    463|        }
  373|    780|        theIndex = (theIndex + jump) % hash->length;
  374|    780|    } while (theIndex != startIndex);
  ------------------
  |  Branch (374:14): [True: 780, False: 0]
  ------------------
  375|       |
  376|    692|    if (firstDeleted >= 0) {
  ------------------
  |  Branch (376:9): [True: 0, False: 692]
  ------------------
  377|      0|        theIndex = firstDeleted; /* reset if had deleted slot */
  378|    692|    } else if (tableHash != HASH_EMPTY) {
  ------------------
  |  |  118|    692|#define HASH_EMPTY      ((int32_t) HASH_DELETED + 1)
  |  |  ------------------
  |  |  |  |  117|    692|#define HASH_DELETED    ((int32_t) 0x80000000)
  |  |  ------------------
  ------------------
  |  Branch (378:16): [True: 0, False: 692]
  ------------------
  379|       |        /* We get to this point if the hashtable is full (no empty or
  380|       |         * deleted slots), and we've failed to find a match.  THIS
  381|       |         * WILL NEVER HAPPEN as long as uhash_put() makes sure that
  382|       |         * count is always < length.
  383|       |         */
  384|      0|        UPRV_UNREACHABLE_EXIT;
  ------------------
  |  |   68|      0|#   define UPRV_UNREACHABLE_EXIT abort()
  ------------------
  385|      0|    }
  386|    692|    return &(elements[theIndex]);
  387|    692|}
uhash.cpp:_ZL10_uhash_putP10UHashtable8UElementS1_aP10UErrorCode:
  471|    171|           UErrorCode *status) {
  472|       |
  473|       |    /* Put finds the position in the table for the new value.  If the
  474|       |     * key is already in the table, it is deleted, if there is a
  475|       |     * non-nullptr keyDeleter.  Then the key, the hash and the value are
  476|       |     * all put at the position in their respective arrays.
  477|       |     */
  478|    171|    int32_t hashcode;
  479|    171|    UHashElement* e;
  480|    171|    UHashTok emptytok;
  481|       |
  482|    171|    if (U_FAILURE(*status)) {
  ------------------
  |  Branch (482:9): [True: 0, False: 171]
  ------------------
  483|      0|        goto err;
  484|      0|    }
  485|    171|    U_ASSERT(hash != nullptr);
  ------------------
  |  |   35|    171|#   define U_ASSERT(exp) (void)0
  ------------------
  486|    171|    if ((hint & HINT_VALUE_POINTER) ?
  ------------------
  |  |  140|    171|#define HINT_VALUE_POINTER (2)
  ------------------
  |  Branch (486:9): [True: 171, False: 0]
  |  Branch (486:9): [True: 0, False: 171]
  ------------------
  487|    171|            value.pointer == nullptr :
  488|    171|            value.integer == 0 && (hint & HINT_ALLOW_ZERO) == 0) {
  ------------------
  |  |  141|      0|#define HINT_ALLOW_ZERO    (4)
  ------------------
  |  Branch (488:13): [True: 0, False: 0]
  |  Branch (488:35): [True: 0, False: 0]
  ------------------
  489|       |        /* Disallow storage of nullptr values, since nullptr is returned by
  490|       |         * get() to indicate an absent key.  Storing nullptr == removing.
  491|       |         */
  492|      0|        return _uhash_remove(hash, key);
  493|      0|    }
  494|    171|    if (hash->count > hash->highWaterMark) {
  ------------------
  |  Branch (494:9): [True: 0, False: 171]
  ------------------
  495|      0|        _uhash_rehash(hash, status);
  496|      0|        if (U_FAILURE(*status)) {
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|      0|            goto err;
  498|      0|        }
  499|      0|    }
  500|       |
  501|    171|    hashcode = (*hash->keyHasher)(key);
  502|    171|    e = _uhash_find(hash, key, hashcode);
  503|    171|    U_ASSERT(e != nullptr);
  ------------------
  |  |   35|    171|#   define U_ASSERT(exp) (void)0
  ------------------
  504|       |
  505|    171|    if (IS_EMPTY_OR_DELETED(e->hashcode)) {
  ------------------
  |  |  120|    171|#define IS_EMPTY_OR_DELETED(x) ((x) < 0)
  |  |  ------------------
  |  |  |  Branch (120:32): [True: 171, False: 0]
  |  |  ------------------
  ------------------
  506|       |        /* Important: We must never actually fill the table up.  If we
  507|       |         * do so, then _uhash_find() will return nullptr, and we'll have
  508|       |         * to check for nullptr after every call to _uhash_find().  To
  509|       |         * avoid this we make sure there is always at least one empty
  510|       |         * or deleted slot in the table.  This only is a problem if we
  511|       |         * are out of memory and rehash isn't working.
  512|       |         */
  513|    171|        ++hash->count;
  514|    171|        if (hash->count == hash->length) {
  ------------------
  |  Branch (514:13): [True: 0, False: 171]
  ------------------
  515|       |            /* Don't allow count to reach length */
  516|      0|            --hash->count;
  517|      0|            *status = U_MEMORY_ALLOCATION_ERROR;
  518|      0|            goto err;
  519|      0|        }
  520|    171|    }
  521|       |
  522|       |    /* We must in all cases handle storage properly.  If there was an
  523|       |     * old key, then it must be deleted (if the deleter != nullptr).
  524|       |     * Make hashcodes stored in table positive.
  525|       |     */
  526|    171|    return _uhash_setElement(hash, e, hashcode & 0x7FFFFFFF, key, value, hint);
  527|       |
  528|      0| err:
  529|       |    /* If the deleters are non-nullptr, this method adopts its key and/or
  530|       |     * value arguments, and we must be sure to delete the key and/or
  531|       |     * value in all cases, even upon failure.
  532|       |     */
  533|      0|    HASH_DELETE_KEY_VALUE(hash, key.pointer, value.pointer);
  ------------------
  |  |  124|      0|#define HASH_DELETE_KEY_VALUE(hash, keypointer, valuepointer) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|      0|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  |  125|      0|    if (hash->keyDeleter != nullptr && keypointer != nullptr) { \
  |  |  ------------------
  |  |  |  Branch (125:9): [True: 0, False: 0]
  |  |  |  Branch (125:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  126|      0|        (*hash->keyDeleter)(keypointer); \
  |  |  127|      0|    } \
  |  |  128|      0|    if (hash->valueDeleter != nullptr && valuepointer != nullptr) { \
  |  |  ------------------
  |  |  |  Branch (128:9): [True: 0, False: 0]
  |  |  |  Branch (128:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  129|      0|        (*hash->valueDeleter)(valuepointer); \
  |  |  130|      0|    } \
  |  |  131|      0|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|      0|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|      0|    emptytok.pointer = nullptr; emptytok.integer = 0;
  535|      0|    return emptytok;
  536|    171|}
uhash.cpp:_ZL17_uhash_setElementP10UHashtableP12UHashElementi8UElementS3_a:
  150|    171|                  UHashTok key, UHashTok value, int8_t hint) {
  151|       |
  152|    171|    UHashTok oldValue = e->value;
  153|    171|    if (hash->keyDeleter != nullptr && e->key.pointer != nullptr &&
  ------------------
  |  Branch (153:9): [True: 0, False: 171]
  |  Branch (153:40): [True: 0, False: 0]
  ------------------
  154|    171|        e->key.pointer != key.pointer) { /* Avoid double deletion */
  ------------------
  |  Branch (154:9): [True: 0, False: 0]
  ------------------
  155|      0|        (*hash->keyDeleter)(e->key.pointer);
  156|      0|    }
  157|    171|    if (hash->valueDeleter != nullptr) {
  ------------------
  |  Branch (157:9): [True: 0, False: 171]
  ------------------
  158|      0|        if (oldValue.pointer != nullptr &&
  ------------------
  |  Branch (158:13): [True: 0, False: 0]
  ------------------
  159|      0|            oldValue.pointer != value.pointer) { /* Avoid double deletion */
  ------------------
  |  Branch (159:13): [True: 0, False: 0]
  ------------------
  160|      0|            (*hash->valueDeleter)(oldValue.pointer);
  161|      0|        }
  162|      0|        oldValue.pointer = nullptr;
  163|      0|    }
  164|       |    /* Compilers should copy the UHashTok union correctly, but even if
  165|       |     * they do, memory heap tools (e.g. BoundsChecker) can get
  166|       |     * confused when a pointer is cloaked in a union and then copied.
  167|       |     * TO ALLEVIATE THIS, we use hints (based on what API the user is
  168|       |     * calling) to copy pointers when we know the user thinks
  169|       |     * something is a pointer. */
  170|    171|    if (hint & HINT_KEY_POINTER) {
  ------------------
  |  |  139|    171|#define HINT_KEY_POINTER   (1)
  ------------------
  |  Branch (170:9): [True: 171, False: 0]
  ------------------
  171|    171|        e->key.pointer = key.pointer;
  172|    171|    } else {
  173|      0|        e->key = key;
  174|      0|    }
  175|    171|    if (hint & HINT_VALUE_POINTER) {
  ------------------
  |  |  140|    171|#define HINT_VALUE_POINTER (2)
  ------------------
  |  Branch (175:9): [True: 171, False: 0]
  ------------------
  176|    171|        e->value.pointer = value.pointer;
  177|    171|    } else {
  178|      0|        e->value = value;
  179|      0|    }
  180|    171|    e->hashcode = hashcode;
  181|    171|    return oldValue;
  182|    171|}

uprv_unmapFile_78:
  252|    251|    uprv_unmapFile(UDataMemory *pData) {
  253|    251|        if(pData!=nullptr && pData->map!=nullptr) {
  ------------------
  |  Branch (253:12): [True: 251, False: 0]
  |  Branch (253:30): [True: 0, False: 251]
  ------------------
  254|      0|            size_t dataLen = (char *)pData->map - (char *)pData->mapAddr;
  255|      0|            if(munmap(pData->mapAddr, dataLen)==-1) {
  ------------------
  |  Branch (255:16): [True: 0, False: 0]
  ------------------
  256|      0|            }
  257|      0|            pData->pHeader=nullptr;
  258|      0|            pData->map=nullptr;
  259|      0|            pData->mapAddr=nullptr;
  260|      0|        }
  261|    251|    }

_ZN6icu_786UMutex8getMutexEv:
   80|      2|std::mutex *UMutex::getMutex() {
   81|      2|    std::mutex *retPtr = fMutex.load(std::memory_order_acquire);
   82|      2|    if (retPtr == nullptr) {
  ------------------
  |  Branch (82:9): [True: 2, False: 0]
  ------------------
   83|      2|        std::call_once(*pInitFlag, umtx_init);
   84|      2|        std::lock_guard<std::mutex> guard(*initMutex);
   85|      2|        retPtr = fMutex.load(std::memory_order_acquire);
   86|      2|        if (retPtr == nullptr) {
  ------------------
  |  Branch (86:13): [True: 2, False: 0]
  ------------------
   87|      2|            fMutex = new(fStorage) std::mutex();
   88|      2|            retPtr = fMutex;
   89|      2|            fListLink = gListHead;
   90|      2|            gListHead = this;
   91|      2|        }
   92|      2|    }
   93|      2|    U_ASSERT(retPtr != nullptr);
  ------------------
  |  |   35|      2|#   define U_ASSERT(exp) (void)0
  ------------------
   94|      2|    return retPtr;
   95|      2|}
umtx_lock_78:
  112|  70.7k|umtx_lock(UMutex *mutex) {
  113|  70.7k|    if (mutex == nullptr) {
  ------------------
  |  Branch (113:9): [True: 881, False: 69.8k]
  ------------------
  114|    881|        mutex = &globalMutex;
  115|    881|    }
  116|  70.7k|    mutex->lock();
  117|  70.7k|}
umtx_unlock_78:
  122|  70.7k|{
  123|  70.7k|    if (mutex == nullptr) {
  ------------------
  |  Branch (123:9): [True: 881, False: 69.8k]
  ------------------
  124|    881|        mutex = &globalMutex;
  125|    881|    }
  126|  70.7k|    mutex->unlock();
  127|  70.7k|}
_ZN6icu_7820umtx_initImplPreInitERNS_9UInitOnceE:
  145|      4|umtx_initImplPreInit(UInitOnce &uio) {
  146|      4|    std::call_once(*pInitFlag, umtx_init);
  147|      4|    std::unique_lock<std::mutex> lock(*initMutex);
  148|      4|    if (umtx_loadAcquire(uio.fState) == 0) {
  ------------------
  |  Branch (148:9): [True: 4, False: 0]
  ------------------
  149|      4|        umtx_storeRelease(uio.fState, 1);
  150|      4|        return true;      // Caller will next call the init function.
  151|      4|    } else {
  152|      0|        while (umtx_loadAcquire(uio.fState) == 1) {
  ------------------
  |  Branch (152:16): [True: 0, False: 0]
  ------------------
  153|       |            // Another thread is currently running the initialization.
  154|       |            // Wait until it completes.
  155|      0|            initCondition->wait(lock);
  156|      0|        }
  157|      0|        U_ASSERT(uio.fState == 2);
  ------------------
  |  |   35|      0|#   define U_ASSERT(exp) (void)0
  ------------------
  158|      0|        return false;
  159|      0|    }
  160|      4|}
_ZN6icu_7821umtx_initImplPostInitERNS_9UInitOnceE:
  170|      4|umtx_initImplPostInit(UInitOnce &uio) {
  171|      4|    {
  172|      4|        std::unique_lock<std::mutex> lock(*initMutex);
  173|      4|        umtx_storeRelease(uio.fState, 2);
  174|      4|    }
  175|      4|    initCondition->notify_all();
  176|      4|}
umutex.cpp:_ZN6icu_78L9umtx_initEv:
   72|      1|static void U_CALLCONV umtx_init() {
   73|      1|    initMutex = STATIC_NEW(std::mutex);
  ------------------
  |  |  144|      1|#define STATIC_NEW(type) [] () { \
  |  |  145|      1|    alignas(type) static char storage[sizeof(type)]; \
  |  |  146|      1|    return new(storage) type();} ()
  ------------------
   74|      1|    initCondition = STATIC_NEW(std::condition_variable);
  ------------------
  |  |  144|      1|#define STATIC_NEW(type) [] () { \
  |  |  145|      1|    alignas(type) static char storage[sizeof(type)]; \
  |  |  146|      1|    return new(storage) type();} ()
  ------------------
   75|      1|    ucln_common_registerCleanup(UCLN_COMMON_MUTEX, umtx_cleanup);
  ------------------
  |  |  617|      1|#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup)
  |  |  ------------------
  |  |  |  |  123|      1|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      1|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   76|      1|}

_ZN6icu_7813umtx_initOnceERNS_9UInitOnceEPFvR10UErrorCodeES3_:
  135|  54.9k|inline void umtx_initOnce(UInitOnce &uio, void (U_CALLCONV *fp)(UErrorCode &), UErrorCode &errCode) {
  136|  54.9k|    if (U_FAILURE(errCode)) {
  ------------------
  |  Branch (136:9): [True: 1, False: 54.9k]
  ------------------
  137|      1|        return;
  138|      1|    }
  139|  54.9k|    if (umtx_loadAcquire(uio.fState) != 2 && umtx_initImplPreInit(uio)) {
  ------------------
  |  Branch (139:9): [True: 3, False: 54.9k]
  |  Branch (139:46): [True: 3, False: 0]
  ------------------
  140|       |        // We run the initialization.
  141|      3|        (*fp)(errCode);
  142|      3|        uio.fErrCode = errCode;
  143|      3|        umtx_initImplPostInit(uio);
  144|  54.9k|    } else {
  145|       |        // Someone else already ran the initialization.
  146|  54.9k|        if (U_FAILURE(uio.fErrCode)) {
  ------------------
  |  Branch (146:13): [True: 0, False: 54.9k]
  ------------------
  147|      0|            errCode = uio.fErrCode;
  148|      0|        }
  149|  54.9k|    }
  150|  54.9k|}
_ZN6icu_7816umtx_loadAcquireERNSt3__16atomicIiEE:
   75|  55.6k|inline int32_t umtx_loadAcquire(u_atomic_int32_t &var) {
   76|  55.6k|    return var.load(std::memory_order_acquire);
   77|  55.6k|}
_ZN6icu_786UMutex4lockEv:
  229|  70.7k|    void lock() {
  230|  70.7k|        std::mutex *m = fMutex.load(std::memory_order_acquire);
  231|  70.7k|        if (m == nullptr) { m = getMutex(); }
  ------------------
  |  Branch (231:13): [True: 2, False: 70.7k]
  ------------------
  232|  70.7k|        m->lock();
  233|  70.7k|    }
_ZN6icu_786UMutex6unlockEv:
  234|  70.7k|    void unlock() { fMutex.load(std::memory_order_relaxed)->unlock(); }
_ZN6icu_7817umtx_storeReleaseERNSt3__16atomicIiEEi:
   79|      9|inline void umtx_storeRelease(u_atomic_int32_t &var, int32_t val) {
   80|      9|    var.store(val, std::memory_order_release);
   81|      9|}
_ZN6icu_7813umtx_initOnceERNS_9UInitOnceEPFvvE:
  123|    557|inline void umtx_initOnce(UInitOnce &uio, void (U_CALLCONV *fp)()) {
  124|    557|    if (umtx_loadAcquire(uio.fState) == 2) {
  ------------------
  |  Branch (124:9): [True: 556, False: 1]
  ------------------
  125|    556|        return;
  126|    556|    }
  127|      1|    if (umtx_initImplPreInit(uio)) {
  ------------------
  |  Branch (127:9): [True: 1, False: 0]
  ------------------
  128|      1|        (*fp)();
  129|      1|        umtx_initImplPostInit(uio);
  130|      1|    }
  131|      1|}

_ZN6icu_7814ConstChar16PtrC2EPKDs:
  229|  7.02k|ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {}
_ZN6icu_7814ConstChar16PtrD2Ev:
  237|  7.02k|ConstChar16Ptr::~ConstChar16Ptr() {
  238|  7.02k|    U_ALIASING_BARRIER(p_);
  ------------------
  |  |   35|  7.02k|#   define U_ALIASING_BARRIER(ptr) asm volatile("" : : "rm"(ptr) : "memory")
  ------------------
  239|  7.02k|}
_ZNK6icu_7814ConstChar16PtrcvPKDsEv:
  205|  7.02k|    inline operator const char16_t *() const { return get(); }
_ZNK6icu_7814ConstChar16Ptr3getEv:
  241|  7.02k|const char16_t *ConstChar16Ptr::get() const { return p_; }

_ZN6icu_7811ReplaceableC2Ev:
  243|  7.02k|inline Replaceable::Replaceable() {}

_ZN6icu_7811StringPieceC2Ev:
   71|      1|  StringPiece() : ptr_(nullptr), length_(0) { }
_ZNK6icu_7811StringPiece4dataEv:
  200|  3.89k|  const char* data() const { return ptr_; }
_ZNK6icu_7811StringPiece6lengthEv:
  212|  3.89k|  int32_t length() const { return length_; }

_ZNK6icu_7813UnicodeString13getArrayStartEv:
 4172|  6.97k|UnicodeString::getArrayStart() const {
 4173|  6.97k|  return (fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) ?
  ------------------
  |  Branch (4173:10): [True: 0, False: 6.97k]
  ------------------
 4174|  6.97k|    fUnion.fStackFields.fBuffer : fUnion.fFields.fArray;
 4175|  6.97k|}
_ZNK6icu_7813UnicodeString14hasShortLengthEv:
 4202|  6.97k|UnicodeString::hasShortLength() const {
 4203|  6.97k|  return fUnion.fFields.fLengthAndFlags>=0;
 4204|  6.97k|}
_ZNK6icu_7813UnicodeString14getShortLengthEv:
 4207|  5.87k|UnicodeString::getShortLength() const {
 4208|       |  // fLengthAndFlags must be non-negative -> short length >= 0
 4209|       |  // and arithmetic or logical shift does not matter.
 4210|  5.87k|  return fUnion.fFields.fLengthAndFlags>>kLengthShift;
 4211|  5.87k|}
_ZNK6icu_7813UnicodeString6lengthEv:
 4214|  6.97k|UnicodeString::length() const {
 4215|  6.97k|  return hasShortLength() ? getShortLength() : fUnion.fFields.fLength;
  ------------------
  |  Branch (4215:10): [True: 5.87k, False: 1.09k]
  ------------------
 4216|  6.97k|}
_ZNK6icu_7813UnicodeString7isBogusEv:
 4230|  7.02k|{ return fUnion.fFields.fLengthAndFlags & kIsBogus; }
_ZNK6icu_7813UnicodeString7isEmptyEv:
 4863|  7.02k|UnicodeString::isEmpty() const {
 4864|       |  // Arithmetic or logical right shift does not matter: only testing for 0.
 4865|  7.02k|  return (fUnion.fFields.fLengthAndFlags>>kLengthShift) == 0;
 4866|  7.02k|}
_ZN6icu_7813UnicodeString14setShortLengthEi:
 4877|  5.92k|UnicodeString::setShortLength(int32_t len) {
 4878|       |  // requires 0 <= len <= kMaxShortLength
 4879|  5.92k|  fUnion.fFields.fLengthAndFlags =
 4880|  5.92k|    static_cast<int16_t>((fUnion.fFields.fLengthAndFlags & kAllStorageFlags) | (len << kLengthShift));
 4881|  5.92k|}
_ZN6icu_7813UnicodeString9setLengthEi:
 4884|  7.02k|UnicodeString::setLength(int32_t len) {
 4885|  7.02k|  if(len <= kMaxShortLength) {
  ------------------
  |  Branch (4885:6): [True: 5.92k, False: 1.09k]
  ------------------
 4886|  5.92k|    setShortLength(len);
 4887|  5.92k|  } else {
 4888|  1.09k|    fUnion.fFields.fLengthAndFlags |= kLengthIsLarge;
 4889|  1.09k|    fUnion.fFields.fLength = len;
 4890|  1.09k|  }
 4891|  7.02k|}
_ZN6icu_7813UnicodeString8setArrayEPDsii:
 4899|  7.02k|UnicodeString::setArray(char16_t *array, int32_t len, int32_t capacity) {
 4900|  7.02k|  setLength(len);
 4901|  7.02k|  fUnion.fFields.fArray = array;
 4902|  7.02k|  fUnion.fFields.fCapacity = capacity;
 4903|  7.02k|}

converter_fuzzer.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  7.02k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  34.3M|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|   400M|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv_bld.cpp:_ZL9U_FAILURE10UErrorCode:
  737|   238k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv_bld.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  29.7k|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv_ct.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  1.34k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv_io.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  81.6k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv_io.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  40.8k|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv_lmb.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  6.90k|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv_lmb.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  14.4M|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv_u16.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|   791k|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv_u32.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|    748|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv_u8.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  1.66k|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnvhz.cpp:_ZL9U_FAILURE10UErrorCode:
  737|    238|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnvisci.cpp:_ZL9U_FAILURE10UErrorCode:
  737|   982k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnvlat1.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  1.75M|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnvmbcs.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  16.6M|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnvmbcs.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  11.5M|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
udata.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  3.18k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
udata.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|    955|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
udatamem.cpp:_ZL9U_FAILURE10UErrorCode:
  737|    424|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
uenum.cpp:_ZL9U_FAILURE10UErrorCode:
  737|    366|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
uhash.cpp:_ZL9U_FAILURE10UErrorCode:
  737|    181|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
unistr_cnv.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  20.9k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ustring.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  7.02k|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
charstr.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  11.1k|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucmndata.cpp:_ZL9U_FAILURE10UErrorCode:
  737|      2|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv2022.cpp:_ZL9U_SUCCESS10UErrorCode:
  731|  7.00M|    inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; }
ucnv2022.cpp:_ZL9U_FAILURE10UErrorCode:
  737|  17.0M|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }
ucnv_cb.cpp:_ZL9U_FAILURE10UErrorCode:
  737|   149M|    inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; }

_ZN6icu_7811ReplaceableD2Ev:
  106|  7.02k|Replaceable::~Replaceable() {}
_ZN6icu_7813UnicodeString12releaseArrayEv:
  161|  7.02k|UnicodeString::releaseArray() {
  162|  7.02k|  if((fUnion.fFields.fLengthAndFlags & kRefCounted) && removeRef() == 0) {
  ------------------
  |  Branch (162:6): [True: 0, False: 7.02k]
  |  Branch (162:56): [True: 0, False: 0]
  ------------------
  163|      0|    uprv_free(reinterpret_cast<int32_t*>(fUnion.fFields.fArray) - 1);
  ------------------
  |  | 1503|      0|#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  164|      0|  }
  165|  7.02k|}
_ZN6icu_7813UnicodeStringC2EaNS_14ConstChar16PtrEi:
  241|  7.02k|                             int32_t textLength) {
  242|  7.02k|  fUnion.fFields.fLengthAndFlags = kReadonlyAlias;
  243|  7.02k|  const char16_t *text = textPtr;
  244|  7.02k|  if(text == nullptr) {
  ------------------
  |  Branch (244:6): [True: 0, False: 7.02k]
  ------------------
  245|       |    // treat as an empty string, do not alias
  246|      0|    setToEmpty();
  247|  7.02k|  } else if(textLength < -1 ||
  ------------------
  |  Branch (247:13): [True: 0, False: 7.02k]
  ------------------
  248|  7.02k|            (textLength == -1 && !isTerminated) ||
  ------------------
  |  Branch (248:14): [True: 0, False: 7.02k]
  |  Branch (248:34): [True: 0, False: 0]
  ------------------
  249|  7.02k|            (textLength >= 0 && isTerminated && text[textLength] != 0)
  ------------------
  |  Branch (249:14): [True: 7.02k, False: 0]
  |  Branch (249:33): [True: 0, False: 7.02k]
  |  Branch (249:49): [True: 0, False: 0]
  ------------------
  250|  7.02k|  ) {
  251|      0|    setToBogus();
  252|  7.02k|  } else {
  253|  7.02k|    if(textLength == -1) {
  ------------------
  |  Branch (253:8): [True: 0, False: 7.02k]
  ------------------
  254|       |      // text is terminated, or else it would have failed the above test
  255|      0|      textLength = u_strlen(text);
  ------------------
  |  |  393|      0|#define u_strlen U_ICU_ENTRY_POINT_RENAME(u_strlen)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|      0|    }
  257|  7.02k|    setArray(const_cast<char16_t *>(text), textLength,
  258|  7.02k|             isTerminated ? textLength + 1 : textLength);
  ------------------
  |  Branch (258:14): [True: 0, False: 7.02k]
  ------------------
  259|  7.02k|  }
  260|  7.02k|}
_ZN6icu_7813UnicodeStringD2Ev:
  462|  7.02k|{
  463|       |#ifdef UNISTR_COUNT_FINAL_STRING_LENGTHS
  464|       |  // Count lengths of strings at the end of their lifetime.
  465|       |  // Useful for discussion of a desirable stack buffer size.
  466|       |  // Count the contents length, not the optional NUL terminator nor further capacity.
  467|       |  // Ignore open-buffer strings and strings which alias external storage.
  468|       |  if((fUnion.fFields.fLengthAndFlags&(kOpenGetBuffer|kReadonlyAlias|kWritableAlias)) == 0) {
  469|       |    if(hasShortLength()) {
  470|       |      umtx_atomic_inc(finalLengthCounts + getShortLength());
  471|       |    } else {
  472|       |      umtx_atomic_inc(&beyondCount);
  473|       |    }
  474|       |  }
  475|       |#endif
  476|       |
  477|  7.02k|  releaseArray();
  478|  7.02k|}

_ZNK6icu_7813UnicodeString7extractEPciP10UConverterR10UErrorCode:
  210|  7.02k|{
  211|  7.02k|    if(U_FAILURE(errorCode)) {
  ------------------
  |  Branch (211:8): [True: 0, False: 7.02k]
  ------------------
  212|      0|        return 0;
  213|      0|    }
  214|       |
  215|  7.02k|    if (isBogus() || destCapacity < 0 || (destCapacity > 0 && dest == nullptr)) {
  ------------------
  |  Branch (215:9): [True: 0, False: 7.02k]
  |  Branch (215:22): [True: 0, False: 7.02k]
  |  Branch (215:43): [True: 7.02k, False: 0]
  |  Branch (215:63): [True: 0, False: 7.02k]
  ------------------
  216|      0|        errorCode=U_ILLEGAL_ARGUMENT_ERROR;
  217|      0|        return 0;
  218|      0|    }
  219|       |
  220|       |    // nothing to do?
  221|  7.02k|    if(isEmpty()) {
  ------------------
  |  Branch (221:8): [True: 52, False: 6.97k]
  ------------------
  222|     52|        return u_terminateChars(dest, destCapacity, 0, &errorCode);
  ------------------
  |  |  406|     52|#define u_terminateChars U_ICU_ENTRY_POINT_RENAME(u_terminateChars)
  |  |  ------------------
  |  |  |  |  123|     52|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|     52|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|     52|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|     52|    }
  224|       |
  225|       |    // get the converter
  226|  6.97k|    UBool isDefaultConverter;
  227|  6.97k|    if (cnv == nullptr) {
  ------------------
  |  Branch (227:9): [True: 0, False: 6.97k]
  ------------------
  228|      0|        isDefaultConverter=true;
  229|      0|        cnv=u_getDefaultConverter(&errorCode);
  ------------------
  |  |  273|      0|#define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverter)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|      0|        if(U_FAILURE(errorCode)) {
  ------------------
  |  Branch (230:12): [True: 0, False: 0]
  ------------------
  231|      0|            return 0;
  232|      0|        }
  233|  6.97k|    } else {
  234|  6.97k|        isDefaultConverter=false;
  235|  6.97k|        ucnv_resetFromUnicode(cnv);
  ------------------
  |  |  708|  6.97k|#define ucnv_resetFromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_resetFromUnicode)
  |  |  ------------------
  |  |  |  |  123|  6.97k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  6.97k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  6.97k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|  6.97k|    }
  237|       |
  238|       |    // convert
  239|  6.97k|    int32_t len=doExtract(0, length(), dest, destCapacity, cnv, errorCode);
  240|       |
  241|       |    // release the converter
  242|  6.97k|    if(isDefaultConverter) {
  ------------------
  |  Branch (242:8): [True: 0, False: 6.97k]
  ------------------
  243|      0|        u_releaseDefaultConverter(cnv);
  ------------------
  |  |  344|      0|#define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefaultConverter)
  |  |  ------------------
  |  |  |  |  123|      0|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|      0|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|      0|    }
  245|       |
  246|  6.97k|    return len;
  247|  6.97k|}
_ZNK6icu_7813UnicodeString9doExtractEiiPciP10UConverterR10UErrorCode:
  254|  6.97k|{
  255|  6.97k|    if(U_FAILURE(errorCode)) {
  ------------------
  |  Branch (255:8): [True: 0, False: 6.97k]
  ------------------
  256|      0|        if(destCapacity!=0) {
  ------------------
  |  Branch (256:12): [True: 0, False: 0]
  ------------------
  257|      0|            *dest=0;
  258|      0|        }
  259|      0|        return 0;
  260|      0|    }
  261|       |
  262|  6.97k|    const char16_t *src=getArrayStart()+start, *srcLimit=src+length;
  263|  6.97k|    char *originalDest=dest;
  264|  6.97k|    const char *destLimit;
  265|       |
  266|  6.97k|    if(destCapacity==0) {
  ------------------
  |  Branch (266:8): [True: 0, False: 6.97k]
  ------------------
  267|      0|        destLimit=dest=nullptr;
  268|  6.97k|    } else if(destCapacity==-1) {
  ------------------
  |  Branch (268:15): [True: 0, False: 6.97k]
  ------------------
  269|       |        // Pin the limit to U_MAX_PTR if the "magic" destCapacity is used.
  270|      0|        destLimit = static_cast<char*>(U_MAX_PTR(dest));
  ------------------
  |  |  523|      0|    ((void *)(((uintptr_t)(base)+0x7fffffffu) > (uintptr_t)(base) \
  |  |  ------------------
  |  |  |  Branch (523:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  524|      0|        ? ((uintptr_t)(base)+0x7fffffffu) \
  |  |  525|      0|        : (uintptr_t)-1))
  ------------------
  271|       |        // for NUL-termination, translate into highest int32_t
  272|      0|        destCapacity=0x7fffffff;
  273|  6.97k|    } else {
  274|  6.97k|        destLimit=dest+destCapacity;
  275|  6.97k|    }
  276|       |
  277|       |    // perform the conversion
  278|  6.97k|    UErrorCode bufferStatus = U_ZERO_ERROR;
  279|  6.97k|    ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, &bufferStatus);
  ------------------
  |  |  665|  6.97k|#define ucnv_fromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode)
  |  |  ------------------
  |  |  |  |  123|  6.97k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  6.97k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  6.97k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|  6.97k|    length = static_cast<int32_t>(dest - originalDest);
  281|       |
  282|       |    // if an overflow occurs, then get the preflighting length
  283|  6.97k|    if(bufferStatus==U_BUFFER_OVERFLOW_ERROR) {
  ------------------
  |  Branch (283:8): [True: 865, False: 6.10k]
  ------------------
  284|    865|        char buffer[1024];
  285|       |
  286|    865|        destLimit=buffer+sizeof(buffer);
  287|  27.6k|        do {
  288|  27.6k|            dest=buffer;
  289|  27.6k|            bufferStatus=U_ZERO_ERROR;
  290|  27.6k|            ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, &bufferStatus);
  ------------------
  |  |  665|  27.6k|#define ucnv_fromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode)
  |  |  ------------------
  |  |  |  |  123|  27.6k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  27.6k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  27.6k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  291|  27.6k|            length += static_cast<int32_t>(dest - buffer);
  292|  27.6k|        } while(bufferStatus==U_BUFFER_OVERFLOW_ERROR);
  ------------------
  |  Branch (292:17): [True: 26.7k, False: 865]
  ------------------
  293|    865|    }
  294|  6.97k|    if (U_FAILURE(bufferStatus)) {
  ------------------
  |  Branch (294:9): [True: 0, False: 6.97k]
  ------------------
  295|      0|        errorCode = bufferStatus;
  296|      0|    }
  297|       |
  298|  6.97k|    return u_terminateChars(originalDest, destCapacity, length, &errorCode);
  ------------------
  |  |  406|  6.97k|#define u_terminateChars U_ICU_ENTRY_POINT_RENAME(u_terminateChars)
  |  |  ------------------
  |  |  |  |  123|  6.97k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  6.97k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  6.97k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  299|  6.97k|}

_ZN6icu_787UObjectD2Ev:
   94|  7.02k|UObject::~UObject() {}

u_terminateChars_78:
 1475|  7.02k|u_terminateChars(char *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) {
 1476|  7.02k|    __TERMINATE_STRING(dest, destCapacity, length, pErrorCode);
  ------------------
  |  | 1437|  7.02k|#define __TERMINATE_STRING(dest, destCapacity, length, pErrorCode) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  7.02k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  | 1438|  7.02k|    if(pErrorCode!=nullptr && U_SUCCESS(*pErrorCode)) {                    \
  |  |  ------------------
  |  |  |  Branch (1438:8): [True: 7.02k, False: 0]
  |  |  |  Branch (1438:31): [True: 7.02k, False: 0]
  |  |  ------------------
  |  | 1439|  7.02k|        /* not a public function, so no complete argument checking */   \
  |  | 1440|  7.02k|                                                                        \
  |  | 1441|  7.02k|        if(length<0) {                                                  \
  |  |  ------------------
  |  |  |  Branch (1441:12): [True: 0, False: 7.02k]
  |  |  ------------------
  |  | 1442|      0|            /* assume that the caller handles this */                   \
  |  | 1443|  7.02k|        } else if(length<destCapacity) {                                \
  |  |  ------------------
  |  |  |  Branch (1443:19): [True: 6.15k, False: 867]
  |  |  ------------------
  |  | 1444|  6.15k|            /* NUL-terminate the string, the NUL fits */                \
  |  | 1445|  6.15k|            dest[length]=0;                                             \
  |  | 1446|  6.15k|            /* unset the not-terminated warning but leave all others */ \
  |  | 1447|  6.15k|            if(*pErrorCode==U_STRING_NOT_TERMINATED_WARNING) {          \
  |  |  ------------------
  |  |  |  Branch (1447:16): [True: 0, False: 6.15k]
  |  |  ------------------
  |  | 1448|      0|                *pErrorCode=U_ZERO_ERROR;                               \
  |  | 1449|      0|            }                                                           \
  |  | 1450|  6.15k|        } else if(length==destCapacity) {                               \
  |  |  ------------------
  |  |  |  Branch (1450:19): [True: 2, False: 865]
  |  |  ------------------
  |  | 1451|      2|            /* unable to NUL-terminate, but the string itself fit - set a warning code */ \
  |  | 1452|      2|            *pErrorCode=U_STRING_NOT_TERMINATED_WARNING;                \
  |  | 1453|    865|        } else /* length>destCapacity */ {                              \
  |  | 1454|    865|            /* even the string itself did not fit - set an error code */ \
  |  | 1455|    865|            *pErrorCode=U_BUFFER_OVERFLOW_ERROR;                        \
  |  | 1456|    865|        }                                                               \
  |  | 1457|  7.02k|    } \
  |  | 1458|  7.02k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  7.02k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1477|  7.02k|    return length;
 1478|  7.02k|}
ustr_hashCharsN_78:
 1528|  35.1k|ustr_hashCharsN(const char *str, int32_t length) {
 1529|  35.1k|    STRING_HASH(uint8_t, str, length, *p);
  ------------------
  |  | 1506|  35.1k|#define STRING_HASH(TYPE, STR, STRLEN, DEREF) UPRV_BLOCK_MACRO_BEGIN { \
  |  |  ------------------
  |  |  |  |  169|  35.1k|#define UPRV_BLOCK_MACRO_BEGIN do
  |  |  ------------------
  |  | 1507|  35.1k|    uint32_t hash = 0;                        \
  |  | 1508|  35.1k|    const TYPE *p = (const TYPE*) STR;        \
  |  | 1509|  35.1k|    if (p != nullptr) {                          \
  |  |  ------------------
  |  |  |  Branch (1509:9): [True: 35.1k, False: 0]
  |  |  ------------------
  |  | 1510|  35.1k|        int32_t len = (int32_t)(STRLEN);      \
  |  | 1511|  35.1k|        int32_t inc = ((len - 32) / 32) + 1;  \
  |  | 1512|  35.1k|        const TYPE *limit = p + len;          \
  |  | 1513|   723k|        while (p<limit) {                     \
  |  |  ------------------
  |  |  |  Branch (1513:16): [True: 688k, False: 35.1k]
  |  |  ------------------
  |  | 1514|   688k|            hash = (hash * 37) + DEREF;       \
  |  | 1515|   688k|            p += inc;                         \
  |  | 1516|   688k|        }                                     \
  |  | 1517|  35.1k|    }                                         \
  |  | 1518|  35.1k|    return static_cast<int32_t>(hash);        \
  |  | 1519|  35.1k|} UPRV_BLOCK_MACRO_END
  |  |  ------------------
  |  |  |  |  178|  35.1k|#define UPRV_BLOCK_MACRO_END while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1530|  35.1k|}

LLVMFuzzerTestOneInput:
   23|  7.02k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   24|  7.02k|  UErrorCode status = U_ZERO_ERROR;
   25|  7.02k|  uint16_t rnd = 0;
   26|       |
   27|  7.02k|  if (size < 2) {
  ------------------
  |  Branch (27:7): [True: 1, False: 7.02k]
  ------------------
   28|      1|    return 0;
   29|      1|  }
   30|       |
   31|  7.02k|  rnd = *(reinterpret_cast<const uint16_t *>(data));
   32|  7.02k|  data = data + 2;
   33|  7.02k|  size = size - 2;
   34|       |
   35|  7.02k|  size_t unistr_size = size/2;
   36|  7.02k|  std::unique_ptr<char16_t[]> fuzzbuff(new char16_t[unistr_size]);
   37|  7.02k|  std::memcpy(fuzzbuff.get(), data, unistr_size * 2);
   38|       |  
   39|  7.02k|  icu::UnicodeString fuzzstr(false, fuzzbuff.get(), unistr_size);
   40|       |
   41|  7.02k|  const char* converter_name =
   42|  7.02k|      ucnv_getAvailableName(rnd % ucnv_countAvailable());
  ------------------
  |  |  670|  7.02k|#define ucnv_getAvailableName U_ICU_ENTRY_POINT_RENAME(ucnv_getAvailableName)
  |  |  ------------------
  |  |  |  |  123|  7.02k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.02k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.02k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    ucnv_getAvailableName(rnd % ucnv_countAvailable());
  ------------------
  |  |  644|  7.02k|#define ucnv_countAvailable U_ICU_ENTRY_POINT_RENAME(ucnv_countAvailable)
  |  |  ------------------
  |  |  |  |  123|  7.02k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.02k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.02k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   43|  7.02k|  deleted_unique_ptr<UConverter> converter(ucnv_open(converter_name, &status),
  ------------------
  |  |  701|  7.02k|#define ucnv_open U_ICU_ENTRY_POINT_RENAME(ucnv_open)
  |  |  ------------------
  |  |  |  |  123|  7.02k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.02k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.02k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   44|  7.02k|                                           &ucnv_close);
  ------------------
  |  |  639|  7.02k|#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
  |  |  ------------------
  |  |  |  |  123|  7.02k|#       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  7.02k|#       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  121|  7.02k|#       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   45|  7.02k|  if (U_FAILURE(status)) {
  ------------------
  |  Branch (45:7): [True: 0, False: 7.02k]
  ------------------
   46|      0|    return 0;
   47|      0|  }
   48|       |
   49|  7.02k|  static const size_t dest_buffer_size = 1024 * 1204;
   50|  7.02k|  static const std::unique_ptr<char[]> dest_buffer(new char[dest_buffer_size]);
   51|       |
   52|  7.02k|  fuzzstr.extract(dest_buffer.get(), dest_buffer_size, converter.get(), status);
   53|       |
   54|  7.02k|  return 0;
   55|  7.02k|}

_ZN14IcuEnvironmentC2Ev:
   14|      2|  IcuEnvironment() {
   15|       |    // nothing to initialize yet;
   16|      2|  }

